aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/open-isns/APKBUILD50
-rw-r--r--main/open-isns/libressl.patch11
-rw-r--r--main/open-isns/musl-fixes.patch21
3 files changed, 82 insertions, 0 deletions
diff --git a/main/open-isns/APKBUILD b/main/open-isns/APKBUILD
new file mode 100644
index 0000000000..caef7a854e
--- /dev/null
+++ b/main/open-isns/APKBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=open-isns
+pkgver=0.97
+pkgrel=0
+pkgdesc="iSNS server and client for Linux"
+url="https://github.com/open-iscsi/open-isns"
+arch="all"
+license="LGPL2"
+makedepends="autoconf automake libressl-dev musl-dev"
+options="!check"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lib"
+source="$pkgname-$pkgver.tar.gz::https://github.com/open-iscsi/open-isns/archive/v$pkgver.tar.gz
+ libressl.patch
+ musl-fixes.patch
+ "
+builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$builddir"
+ default_prepare
+ autoconf && autoheader
+}
+
+build() {
+ cd "$builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-shared
+ make all
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" install_hdrs
+ make DESTDIR="$pkgdir" install_lib
+ rm -rf "$pkgdir"/usr/lib/systemd
+}
+
+lib() {
+ cd "$builddir"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr
+}
+
+sha512sums="78c934162d5a1d093bccd49449d4ef369b896d34309d76b4963d643a699640617c4fe064388c481c35b9be26e012f19713f3aad378af9ad88fa94c3d300e919d open-isns-0.97.tar.gz
+3a01a78c19114801ce4d80568eca158615f338a27133eb7639258ebb9114afa66cbbf0c0d871f00b7e85a4903f1c2444866daaccc3e3b187d0d4d47d7e86adc2 libressl.patch
+14eb43b8659c4c917fb35f2e33bffb90c7288555c3feb1ba4afd502c3e509bb44d0ad91b6c4ef09c68cd30eb812df11440a1c28720ee9be8cf4af6c0d8d6dc8d musl-fixes.patch"
diff --git a/main/open-isns/libressl.patch b/main/open-isns/libressl.patch
new file mode 100644
index 0000000000..f2137997cc
--- /dev/null
+++ b/main/open-isns/libressl.patch
@@ -0,0 +1,11 @@
+--- a/pki.c.orig
++++ b/pki.c
+@@ -30,7 +30,7 @@
+ #endif
+ /* OpenSSL 1.1 made a lot of structures opaque, so we need to
+ * define the 1.1 wrappers in previous versions. */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #define EVP_PKEY_base_id(o) ((o)->type)
+ #define EVP_PKEY_get0_DSA(o) ((o)->pkey.dsa)
+ static EVP_MD_CTX *EVP_MD_CTX_new(void)
diff --git a/main/open-isns/musl-fixes.patch b/main/open-isns/musl-fixes.patch
new file mode 100644
index 0000000000..1cd5d13f26
--- /dev/null
+++ b/main/open-isns/musl-fixes.patch
@@ -0,0 +1,21 @@
+--- a/include/libisns/util.h
++++ b/include/libisns/util.h
+@@ -100,7 +100,7 @@
+ * There's no htonll yet
+ */
+ #ifndef htonll
+-# ifdef __GLIBC__
++# ifdef __linux__
+ # include <endian.h>
+ # include <byteswap.h>
+ # if __BYTE_ORDER == __BIG_ENDIAN
+--- a/include/libisns/isns.h
++++ b/include/libisns/isns.h
+@@ -13,6 +13,7 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <stdio.h>
++#include <time.h>
+
+ #include <libisns/isns-proto.h>
+ #include <libisns/types.h>