summaryrefslogtreecommitdiff
path: root/community/pdflib-lite/PKGBUILD
blob: 73e4a997c9559de9e6e84919650bc108f42ffa6d (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
# Maintainer: Connor Behan <connor.behan@gmail.com>
# Contributor: Olivier Mehani <shtrom-arch@ssji.net>

pkgname=pdflib-lite
_pkgnamecaps=PDFlib-Lite
pkgver=7.0.5p3
_basepkgver=${pkgver/p*/}
pkgrel=3
pkgdesc="PDF manipulation library."
url="http://www.pdflib.com"
arch=(i686 x86_64)
depends=('glibc')
provides=('pdflib')
source=(http://www.pdflib.com/binaries/PDFlib/${_basepkgver//./}/${_pkgnamecaps}-${pkgver}.tar.gz http://www.pdflib.com/fileadmin/pdflib/pdf/license/PDFlib-Lite-license.pdf)
license=(custom:pdflib-lite)

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

package() {
	cd "$srcdir"/$_pkgnamecaps-$pkgver
	make prefix="$pkgdir"/usr install

	## Copy files required by the license
	# Documentation
	mkdir -p "$pkgdir"/usr/share/pdflib-lite/doc
	cp ./doc/pdflib/* "$pkgdir"/usr/share/pdflib-lite/doc

	# License
	mkdir -p "$pkgdir"/usr/share/licenses/pdflib-lite
	cp -H ../PDFlib-Lite-license.pdf "$pkgdir"/usr/share/licenses/pdflib-lite/LICENSE.pdf

	# Examples
	make -C ./bind/pdflib clean
	cp -R ./bind/pdflib/{c,cpp,java} "$pkgdir"/usr/share/pdflib-lite
	find "$pkgdir"/usr/share/pdflib-lite \( \
		-name Makefile \
		-o -name *.dsp \
		-o -name *.dsw \
		-o -name *.sln \
		-o -name *.vcproj \
		\) -exec rm {} \;
}

md5sums=('371d332d610a8b21a542bb7a2bdaf954'
         '2f3f9cc20199aad91b33dc26cdcbbab4')