aboutsummaryrefslogtreecommitdiffstats
path: root/testing/uthash/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-24 19:40:40 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-25 01:41:23 +0100
commit08d710407f8e4ae2a0ac08734414124f35aa1948 (patch)
treebb461c74d33fdcdcefc243abb20733b5590d2c23 /testing/uthash/APKBUILD
parent3f163cef392eb53080f97ca5f304f6c0d2faabc0 (diff)
downloadaports-08d710407f8e4ae2a0ac08734414124f35aa1948.tar.gz
aports-08d710407f8e4ae2a0ac08734414124f35aa1948.tar.bz2
aports-08d710407f8e4ae2a0ac08734414124f35aa1948.tar.xz
testing/uthash: new aport
http://troydhanson.github.io/uthash/ C macros for hash tables and more
Diffstat (limited to 'testing/uthash/APKBUILD')
-rw-r--r--testing/uthash/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/uthash/APKBUILD b/testing/uthash/APKBUILD
new file mode 100644
index 0000000000..04493d72d9
--- /dev/null
+++ b/testing/uthash/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=uthash
+pkgver=2.0.2
+_sover=0 # based on Fedora package
+pkgrel=0
+pkgdesc="C macros for hash tables and more"
+url="http://troydhanson.github.io/uthash/"
+arch="all"
+license="BSD"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+checkdepends="perl"
+subpackages="$pkgname-dev libut"
+source="$pkgname-$pkgver.tar.gz::https://github.com/troydhanson/$pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ CFLAGS="$CFLAGS -fPIC" make -C libut
+ gcc -shared $CFLAGS $LDFLAGS -Wl,-soname,libut.so.$_sover \
+ -o libut/libut.so.$_sover libut/*.o
+}
+
+check() {
+ cd "$builddir"
+
+ make -C tests
+ make -C tests/threads
+ make -C libut/tests
+}
+
+package() {
+ cd "$builddir"
+
+ mkdir -p "$pkgdir"/usr/include \
+ "$pkgdir"/usr/lib
+
+ install -m 0644 src/*.h "$pkgdir"/usr/include/
+
+ install -m 0644 libut/libut.a "$pkgdir"/usr/lib/
+ install -D -m 0755 libut/libut.so.$_sover "$pkgdir"/usr/lib/
+ ln -s libut.so.$_sover "$pkgdir"/usr/lib/libut.so
+}
+
+libut() {
+ pkgdesc="Library-implementation of utvector"
+
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libut.so* "$subpkgdir"/usr/lib/
+}
+
+sha512sums="0c2e686eb5a1d6a03a6fa1d42e803fca4e9b60b2d965c635a5a33d487c8d115f1f8155ff99a0e1874b69f6b66c04ea7d8866472a39abe5d1a23ae73f6fa956d7 uthash-2.0.2.tar.gz"