summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a6ac839a08a22509a05265008f332d47b89a8177 (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
# Maintainer: Sam S <smls75@gmail.com>
# Contributor: Miguel Revilla <yo@miguelrevilla.com>
# Contributor: josephgbr <rafael.f.f1@gmail.com>
# Contributor: Eric BĂ©langer <eric@archlinux.org>
# Contributor: Joost Bremmer <toost dot b at gmail dot com>

pkgname=(libtiff3 libtiff4)
pkgver=3.9.7
pkgrel=4
arch=('i686' 'x86_64')
url="http://www.remotesensing.org/libtiff/"
license=('custom')
depends=('libjpeg' 'zlib' 'libtiff')
makedepends=('freeglut')
optdepends=('freeglut: for using tiffgt')
source=("http://download.osgeo.org/libtiff/tiff-$pkgver.tar.gz")
sha256sums=('f5d64dd4ce61c55f5e9f6dc3920fbe5a41e02c2e607da7117a35eb5c320cef6a')

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

check() {
    cd tiff-$pkgver
    make check
}

package_libtiff3() {
    pkgdesc="Library for manipulation of TIFF images (legacy version, provides libtiff.so.3)"
    
    cd tiff-$pkgver
    make DESTDIR="$pkgdir" install
    install -D -m644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
    
    # Remove files which are already installed by the libtiff package
    rm -f  "$pkgdir"/usr/lib/libtiff{,xx}.{a,so}
    rm -rf "$pkgdir"/usr/bin
    rm -rf "$pkgdir"/usr/include
    rm -rf "$pkgdir"/usr/share/man
    rm -rf "$pkgdir"/usr/share/doc
}

package_libtiff4() {
    pkgdesc="Library for manipulation of TIFF images (legacy version, provides libtiff.so.4)"
    depends+=('libtiff3')
    
    # see http://www.asmail.be/msg0055009514.html
    install -d "$pkgdir"/usr/lib
    ln -sf libtiff.so.$pkgver   "$pkgdir"/usr/lib/libtiff.so.4
    ln -sf libtiffxx.so.$pkgver "$pkgdir"/usr/lib/libtiffxx.so.4
}