gnunet-fuse: add package
authorDaniel Golle <daniel@makrotopia.org>
Thu, 28 Feb 2019 18:57:44 +0000 (19:57 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 28 Feb 2019 18:58:26 +0000 (19:58 +0100)
GNUnet component to mount GNUnet filesystems via FUSE

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
net/gnunet-fuse/Makefile [new file with mode: 0644]
net/gnunet-fuse/patches/001-musl-compat.patch [new file with mode: 0644]

diff --git a/net/gnunet-fuse/Makefile b/net/gnunet-fuse/Makefile
new file mode 100644 (file)
index 0000000..6d67796
--- /dev/null
@@ -0,0 +1,40 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gnunet-fuse
+
+PKG_VERSION:=0.11.0
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/gnunet
+PKG_HASH:=4ddf258336c9ce111fe71372aad0bfd792311f6d92753c29293b2cca1fe3bf16
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=gettext-version
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/gnunet-fuse
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=GNUnet filesystem mount via FUSE
+  URL:=https://www.gnunet.org/
+  DEPENDS:=gnunet +gnunet-fs +libfuse
+endef
+
+CONFIGURE_ARGS+= \
+       --with-libiconv-prefix="$(ICONV_PREFIX)" \
+       --with-libintl-prefix="$(INTL_PREFIX)" \
+       --with-gnunet="$(STAGING_DIR)/usr"
+
+define Package/gnunet-fuse/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-fuse $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,gnunet-fuse))
diff --git a/net/gnunet-fuse/patches/001-musl-compat.patch b/net/gnunet-fuse/patches/001-musl-compat.patch
new file mode 100644 (file)
index 0000000..daa65d1
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/src/fuse/mutex.c
++++ b/src/fuse/mutex.c
+@@ -71,8 +71,13 @@ GNUNET_mutex_create (int isRecursive)
+   if (isRecursive)
+     {
+ #if LINUX
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+       GNUNET_assert (0 == pthread_mutexattr_setkind_np
+                    (&attr, PTHREAD_MUTEX_RECURSIVE_NP));
++#else
++      GNUNET_assert (0 == pthread_mutexattr_settype
++                   (&attr, PTHREAD_MUTEX_RECURSIVE));
++#endif
+ #elif SOMEBSD || GNUNET_freeBSD || GNUNET_freeBSD5
+       GNUNET_assert (0 == pthread_mutexattr_setkind_np
+                    (&attr, PTHREAD_MUTEX_RECURSIVE));
+@@ -84,11 +89,16 @@ GNUNET_mutex_create (int isRecursive)
+   else
+     {
+ #if LINUX
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+       GNUNET_assert (0 == pthread_mutexattr_setkind_np
+                    (&attr, PTHREAD_MUTEX_ERRORCHECK_NP));
+ #else
+       GNUNET_assert (0 == pthread_mutexattr_settype
+                    (&attr, PTHREAD_MUTEX_ERRORCHECK));
++#endif
++#else
++      GNUNET_assert (0 == pthread_mutexattr_settype
++                   (&attr, PTHREAD_MUTEX_ERRORCHECK));
+ #endif
+     }
+   mut = GNUNET_new (struct GNUNET_Mutex);