summaryrefslogtreecommitdiff
path: root/libre/openexr/PKGBUILD
blob: 334326e07ae2ed90f6283c3e8c937d5ba47090be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# $Id: PKGBUILD 238700 2015-05-08 16:56:07Z tpowa $
# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>

pkgname=openexr
_pkgname=$pkgname-libre
pkgver=2.2.0
pkgrel=2.parabola1
pkgdesc="An high dynamic-range image file format library, without embedded nonfree fonts in the documentation"
url="http://www.$pkgname.com/"
arch=('i686' 'x86_64' 'mips64el')
license=('BSD')
depends=('zlib' 'ilmbase')
makedepends=('unoconv')
replaces=("$_pkgname")
conflicts=("$_pkgname")
mksource=("http://download.savannah.nongnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"
          "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/InterpretingDeepPixels.docx"
          "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/MultiViewOpenEXR.odt"
          "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/OpenEXRFileLayout.odt"
          "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/ReadingAndWritingImageFiles.odt"
          "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/TechnicalIntroduction.odt")
source=("https://repo.parabola.nu/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
noextract=(InterpretingDeepPixels.docx MultiViewOpenEXR.odt OpenEXRFileLayout.odt ReadingAndWritingImageFiles.odt TechnicalIntroduction.odt)

mksource() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # remove documentation with embedded nonfree fonts
  rm -rv "doc/"{InterpretingDeepPixels,MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction,TheoryDeepPixels}.pdf

  # add source documentation
  install -m644 -v "${srcdir}/"{InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt} doc

  # convert source documentation to pdf format and clean source code
  cd doc
  unoconv -v -f pdf {InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt}
  rm -rv "${srcdir}/"{_rels,Configurations2,customXml,docProps,META-INF,ObjBFFFDCA{1,3,4,5,7},Object\ 1,ObjectReplacements,Pictures,Thumbnails,word}
}

prepare() {
  # remove TheoryDeepPixels.pdf reference
  sed -i '\|TheoryDeepPixels[.]pdf|d
          \|InterpretingDeepPixels[.]pdf| s| [\]||
         ' "${srcdir}/${pkgname}-${pkgver}/doc/Makefile."{am,in}
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -m644 "doc/"{InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt} "${pkgdir}/usr/share/doc/OpenEXR-${pkgver}"
}
mkmd5sums=('b64e931c82aa3790329c21418373db4e'
           'a59a8516d9dbb76755cb258d18cf4e72'
           '0b0b41269d6a3ee1a7090067cc89895f'
           '6889a150ab9f2f35fbc9835373dd3c34'
           'ef6912faf2ab7516678bd0fa56b832f8'
           '232a6be90fd36ce49e213492a60d335d')
md5sums=('0c25d11578b23e9f5b12a3071187b171')