archrelease: copy trunk to staging-x86_64
[arch-packages.git] / djvulibre / repos / extra-x86_64 / PKGBUILD
blob486c2c827401bd2dd85afe938fcc1203552aaa04
1 # Maintainer: Gaetan Bisson <bisson@archlinux.org>
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
3 # Contributor: mgushee
5 pkgname=djvulibre
6 pkgver=3.5.28
7 pkgrel=4
8 pkgdesc="Suite to create, manipulate and view DjVu ('déjà vu') documents"
9 url='http://djvu.sourceforge.net/'
10 arch=('x86_64')
11 license=('GPL2')
12 makedepends=('librsvg')
13 depends=('libtiff' 'hicolor-icon-theme')
14 source=(https://downloads.sourceforge.net/project/djvu/DjVuLibre/$pkgver/djvulibre-$pkgver.tar.gz
15         djvulibre-check-image-size.patch
16         djvulibre-check-input-pool.patch
17         djvulibre-djvuport-stack-overflow.patch
18         djvulibre-integer-overflow.patch
19         djvulibre-unsigned-short-overflow.patch)
20 sha256sums=('fcd009ea7654fde5a83600eb80757bd3a76998e47d13c66b54c8db849f8f2edc'
21             '5cd3bdedc9ba82af541e1fc0bb6fabdc77c7fc43ee6bd15f9c7cca9d39d53c82'
22             'd938cb05ac37b2f3f9602de6d148307e4164ee8a6f89fb6d81d5ed100fbc368b'
23             '73e476cdb8af46bf94b208b9170679aaba165d54247d435e6a58e874ae85109c'
24             '9e6d8b94d922ba382702ec4f878c06293eb546827e40a7de5221cb21c52d3d23'
25             '7ea0926757adaaff61b5622b2ee88d4af55fec5235183828337005852118f97f')
27 prepare() {
28 # Security fixed from Fedora
29   for _patch in djvulibre*.patch; do
30     patch -d $pkgname-$pkgver -p1 < $_patch
31   done
34 build() {
35         cd ${pkgname}-${pkgver}
36         ./configure --prefix=/usr --disable-desktopfiles
37         make
40 package() {
41         cd ${pkgname}-${pkgver}
42         make DESTDIR="${pkgdir}" install
43         for sz in 22 32 48 64; do
44                 install -Dm644 desktopfiles/prebuilt-hi${sz}-djvu.png "${pkgdir}/usr/share/icons/hicolor/${sz}x${sz}/mimetypes/image-vnd.djvu.mime.png"
45         done