Mail archive
alpine-aports

[alpine-aports] [PATCH 1/2] testing/libcypher-parser: new aport

From: Chris Leishman <chris_at_leishman.org>
Date: Fri, 29 Jul 2016 15:24:59 +0200

https://github.com/cleishm/libcypher-parser
Parsing library for the Cypher query language
---
 testing/libcypher-parser/APKBUILD | 70 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 testing/libcypher-parser/APKBUILD
diff --git a/testing/libcypher-parser/APKBUILD b/testing/libcypher-parser/APKBUILD
new file mode 100644
index 0000000..5339894
--- /dev/null
+++ b/testing/libcypher-parser/APKBUILD
_at_@ -0,0 +1,70 @@
+# Contributor: Chris Leishman <chris_at_leishman.org>
+# Maintainer: Chris Leishman <chris_at_leishman.org>
+pkgname=libcypher-parser
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="Parsing library for the Cypher query language"
+url="https://github.com/cleishm/libcypher-parser"
+arch="all"
+license="ASL 2.0"
+depends=""
+depends_dev=""
+makedepends="$depends_dev automake autoconf libtool check-dev doxygen pkgconfig"
+install=""
+subpackages="$pkgname-dev $pkgname-doc cypher-lint cypher-lint-doc"
+source="https://github.com/cleishm/libcypher-parser/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/"$pkgname-$pkgver"
+build() {
+    cd "$_builddir"
+    ./configure \
+            --prefix=/usr \
+            || return 1
+    make || return 1
+    make check || return 1
+    make doc || return 1
+}
+
+package() {
+    cd "$_builddir"
+    make DESTDIR="$pkgdir" install || return 1
+    mkdir -p "$pkgdir"/usr/share/doc/libcypher-parser
+    mv doc/html/* "$pkgdir"/usr/share/doc/libcypher-parser/
+}
+
+doc() {
+    depends="$depends_doc"
+    pkgdesc="$pkgdesc (documentation)"
+    arch=${arch_doc:-"noarch"}
+    install_if="docs $pkgname=$pkgver-r$pkgrel"
+
+    if [ "X$subpkgname" = "Xlibcypher-parser-doc" ]; then
+        mkdir -p "$subpkgdir"/usr/share
+        mv "$pkgdir"/usr/share/doc "$subpkgdir"/usr/share/
+    elif [ "X$subpkgname" = "Xcypher-lint-doc" ]; then
+        mkdir -p "$subpkgdir"/usr/share
+        mv "$pkgdir"/usr/share/man "$subpkgdir"/usr/share/
+        find "$subpkgdir"/usr/share/man/ -type f | xargs gzip -9
+    else
+        die "Unknown doc package $pkgname"
+    fi
+
+    # remove if empty, ignore error (not empty)
+    rmdir "$pkgdir"/usr/share "$pkgdir"/usr 2>/dev/null
+    return 0
+}
+
+lint() {
+    pkgdesc="Lint tool for the Cypher query language"
+
+    mkdir -p "$subpkgdir"/usr
+    mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+
+    # remove if empty, ignore error (not empty)
+    rmdir "$pkgdir"/usr/bin "$pkgdir"/usr 2>/dev/null
+    return 0
+}
+
+md5sums="f57255533ee103af66c16878b56e7943  libcypher-parser-0.4.0.tar.gz"
+sha256sums="6aace038b74e2d1b0a95a88e8b1f7c89364235cf57c70ec7e358d1ff648d09a2  libcypher-parser-0.4.0.tar.gz"
+sha512sums="1cb034c45e44c98f67422a155c54bcc01d7a8ed3dd7cf81dc10a1b380d15eba11c7d3cfc7e837926d84a501547275af6868a45da42d2535992fe648d2df8ad16  libcypher-parser-0.4.0.tar.gz"
-- 
2.9.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Jul 29 2016 - 15:24:59 GMT