Mail archive
alpine-aports

[alpine-aports] [PATCH 2/2] testing/libneo4j-client: new aport

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

https://github.com/cleishm/libneo4j-client
Client library and CLI for the Neo4j graph database
---
 testing/libneo4j-client/APKBUILD             | 74 ++++++++++++++++++++++++++++
 testing/libneo4j-client/fortify_compat.patch | 31 ++++++++++++
 2 files changed, 105 insertions(+)
 create mode 100644 testing/libneo4j-client/APKBUILD
 create mode 100644 testing/libneo4j-client/fortify_compat.patch
diff --git a/testing/libneo4j-client/APKBUILD b/testing/libneo4j-client/APKBUILD
new file mode 100644
index 0000000..56aa5c0
--- /dev/null
+++ b/testing/libneo4j-client/APKBUILD
_at_@ -0,0 +1,74 @@
+# Contributor: Chris Leishman <chris_at_leishman.org>
+# Maintainer: Chris Leishman <chris_at_leishman.org>
+pkgname=libneo4j-client
+pkgver=1.1.0
+pkgrel=0
+pkgdesc="Client library for the Neo4j graph database"
+url="https://github.com/cleishm/libneo4j-client"
+arch="all"
+license="ASL 2.0"
+depends="openssl"
+depends_dev="openssl-dev"
+makedepends="$depends_dev automake autoconf libtool check-dev doxygen pkgconfig fts fts-dev libedit-dev libcypher-parser-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc neo4j-client neo4j-client-doc"
+source="https://github.com/cleishm/libneo4j-client/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz fortify_compat.patch"
+
+_builddir="$srcdir"/"$pkgname-$pkgver"
+build() {
+    cd "$_builddir"
+    ./configure \
+            --prefix=/usr \
+            || return 1
+    make || return 1
+    make LIBS="-lfts" check || return 1
+    make doc || return 1
+}
+
+package() {
+    cd "$_builddir"
+    make DESTDIR="$pkgdir" install || return 1
+    mkdir -p "$pkgdir"/usr/share/doc/libneo4j-client
+    mv doc/html/* "$pkgdir"/usr/share/doc/libneo4j-client/
+}
+
+doc() {
+    depends="$depends_doc"
+    pkgdesc="$pkgdesc (documentation)"
+    arch=${arch_doc:-"noarch"}
+    install_if="docs $pkgname=$pkgver-r$pkgrel"
+
+    if [ "X$subpkgname" = "Xlibneo4j-client-doc" ]; then
+        mkdir -p "$subpkgdir"/usr/share
+        mv "$pkgdir"/usr/share/doc "$subpkgdir"/usr/share/
+    elif [ "X$subpkgname" = "Xneo4j-client-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
+}
+
+client() {
+    depends="libedit libcypher-parser"
+    pkgdesc="Command line shell for Neo4j"
+
+    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="e9d17aa10a44df5f0b030fd129b576fa  libneo4j-client-1.1.0.tar.gz
+9d51c9b8826337a2c82767fc21fa576d  fortify_compat.patch"
+sha256sums="486ca50519e7377d356a14f1f061fa331301ac10b41ddca08f3bff87a11b82a5  libneo4j-client-1.1.0.tar.gz
+39126e82e1c7d56cdd3786e070c64aeb43fe54d0b6878c020c8804006f00700f  fortify_compat.patch"
+sha512sums="5bf06f019fb71939b65d2b2a83ee3f2597a1b9ca171307834ea93cd394502e5506863cc21268477ed2f7231579f35faa203d19bd4c909a5cc60e5deda5d0766d  libneo4j-client-1.1.0.tar.gz
+eeb15d3580b175da31b97adcf133bdb206fc6ec44244c341f638d9356e5845dc4d3c3521d08f774d45cf73d56ad00631d07a04afbf060e01d412ea0de0cb96cc  fortify_compat.patch"
diff --git a/testing/libneo4j-client/fortify_compat.patch b/testing/libneo4j-client/fortify_compat.patch
new file mode 100644
index 0000000..528b698
--- /dev/null
+++ b/testing/libneo4j-client/fortify_compat.patch
_at_@ -0,0 +1,31 @@
+diff --git a/src/lib/posix_iostream.c b/src/lib/posix_iostream.c
+index 3f78f6d..3d9876e 100644
+--- a/src/lib/posix_iostream.c
++++ b/src/lib/posix_iostream.c
+_at_@ -37,7 +37,7 @@ static ssize_t posix_write(neo4j_iostream_t *self,
+ static ssize_t posix_writev(neo4j_iostream_t *self,
+         const struct iovec *iov, unsigned int iovcnt);
+ static int posix_flush(neo4j_iostream_t *self);
+-static int posix_close(neo4j_iostream_t *self);
++static int neo4j_posix_close(neo4j_iostream_t *self);
+ 
+ 
+ neo4j_iostream_t *neo4j_posix_iostream(int fd)
+_at_@ -58,7 +58,7 @@ neo4j_iostream_t *neo4j_posix_iostream(int fd)
+     iostream->write = posix_write;
+     iostream->writev = posix_writev;
+     iostream->flush = posix_flush;
+-    iostream->close = posix_close;
++    iostream->close = neo4j_posix_close;
+     return iostream;
+ }
+ 
+_at_@ -131,7 +131,7 @@ int posix_flush(neo4j_iostream_t *self)
+ }
+ 
+ 
+-int posix_close(neo4j_iostream_t *self)
++int neo4j_posix_close(neo4j_iostream_t *self)
+ {
+     struct posix_iostream *ios = container_of(self,
+             struct posix_iostream, _iostream);
-- 
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:25:00 GMT