aboutsummaryrefslogtreecommitdiffstats
path: root/community/libspectre/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/libspectre/APKBUILD')
-rw-r--r--community/libspectre/APKBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/community/libspectre/APKBUILD b/community/libspectre/APKBUILD
new file mode 100644
index 0000000000..c2f073de96
--- /dev/null
+++ b/community/libspectre/APKBUILD
@@ -0,0 +1,61 @@
+# Contributor: Andrew Hills <ahills@ednos.net>
+# Contributor: Jean-Louis Fuchs <ganwell@fangorn.ch>
+# Maintainer: Jean-Louis Fuchs <ganwell@fangorn.ch>
+pkgname=libspectre
+pkgver=0.2.8
+pkgrel=1
+pkgdesc="A small library for rendering Postscript documents"
+url="http://www.freedesktop.org/wiki/Software/libspectre"
+arch="all"
+license="GPL2"
+# file, cairo-dev for tests only
+makedepends="ghostscript-dev doxygen graphviz cairo-dev file"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://libspectre.freedesktop.org/releases/$pkgname-$pkgver.tar.gz
+ test.ps"
+
+builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ update_config_sub | true
+ default_prepare
+}
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var
+ make
+ make doc
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+doc() {
+ mkdir -m 0755 -p "$subpkgdir"/usr/share/doc/libspectre
+ install -m 0644 "$builddir"/doc/html/* "$subpkgdir"/usr/share/doc/libspectre/
+}
+
+check() {
+ cd "$builddir/test"
+ make
+ mkdir work
+ ./parser-test "$srcdir/test.ps" work
+ ./spectre-test "$srcdir/test.ps" work
+ file work/output.ps | grep -q "PostScript document text conforming DSC level 3.0, Level 2"
+ file work/output.pdf | grep -q "PDF document, version 1.5"
+ file work/document.png | grep -q "PNG image data"
+ rm -r work
+}
+
+sha512sums="ebbe7f6adcbc7f7d6af61f24e23b114116c878755dbe90f1163546c1284a005b4d539be01986c1f940611e84141ca19768b8effc2abf1013606da7c93547da86 libspectre-0.2.8.tar.gz
+c5148d38da69ebd125f66bb92204f2c7c79797d60a137d431122792c4e4cdcdb3a6a20cfadadd2821536449b1d638258f4596e43154e1ad2307bffa97af4908b test.ps"