aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-09-20 09:00:16 +0200
committert3sserakt <t3ss@posteo.de>2021-09-20 11:10:54 +0200
commitb97b260a0461401b317958002b472ff7ed29fb68 (patch)
tree0681d8e7e91626cdcd22f5724557e39153b45306 /contrib
parentd5df403e64bbde52c5436165eee5231a1b2f876b (diff)
parent48896731e966376ec6f256e175e0d12cd17afa42 (diff)
downloadgnunet-b97b260a0461401b317958002b472ff7ed29fb68.tar.gz
gnunet-b97b260a0461401b317958002b472ff7ed29fb68.zip
Merge branch 'master' of ssh://git.gnunet.org/gnunet
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Makefile.am4
-rw-r--r--contrib/gnunet.m472
-rw-r--r--contrib/services/systemd/tmpfiles-gnunet.conf16
-rw-r--r--contrib/xdg-scheme-handler/README.md8
-rw-r--r--contrib/xdg-scheme-handler/gnunet-uri.desktop9
5 files changed, 101 insertions, 8 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index f42fb684d..150e47ff0 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -53,6 +53,7 @@ EXTRA_DIST = \
53 conf/gnunet/gnunet-user.conf \ 53 conf/gnunet/gnunet-user.conf \
54 conf/nss/nssswitch.conf \ 54 conf/nss/nssswitch.conf \
55 conf/wireshark/wireshark.lua \ 55 conf/wireshark/wireshark.lua \
56 gnunet.m4 \
56 $(PACKAGES_FILES) \ 57 $(PACKAGES_FILES) \
57 $(INITD_FILES) \ 58 $(INITD_FILES) \
58 Makefile.inc \ 59 Makefile.inc \
@@ -77,3 +78,6 @@ test_gnunet_prefix_LDADD = \
77 $(LTLIBICONV) \ 78 $(LTLIBICONV) \
78 $(GN_LIBINTL) \ 79 $(GN_LIBINTL) \
79 $(LIBLTDL) -lunistring $(XLIB) 80 $(LIBLTDL) -lunistring $(XLIB)
81
82aclocaldir = $(datadir)/aclocal
83aclocal_DATA = gnunet.m4
diff --git a/contrib/gnunet.m4 b/contrib/gnunet.m4
new file mode 100644
index 000000000..6d9332db3
--- /dev/null
+++ b/contrib/gnunet.m4
@@ -0,0 +1,72 @@
1# Autoconf macro for working with GNUnet
2# This file is in the public domain.
3#
4# AM_PATH_GNUNET([MINIMUM-VERSION = 0.15.3, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]]])
5# Find the GNUnet installation, either automatically or through the
6# --with-gnunet-prefix flag
7#
8# This macro runs the pkg-config and, if needed, the gnunet-config tool
9# provided by GNUnet itself.
10#
11# The gnunet-config tool can be overridden by setting the GNUNET_CONFIG
12# variable before executing the configure script.
13#
14# The variables GNUNET_CFLAGS and GNUNET_LIBS will be set to appropriate
15# values and are made available to Automake.
16AC_DEFUN([AM_PATH_GNUNET],
17[AC_ARG_WITH([gnunet-prefix],
18 [AS_HELP_STRING([--with-gnunet-prefix=PATH],
19 [PATH to the GNUnet installation])],
20 [gnunet_prefix="$withval"],
21 [gnunet_prefix=""])
22 AC_ARG_ENABLE([debug-log],
23 [AS_HELP_STRING([--disable-debug-log],
24 [Disable all DEBUG-level logging])],
25 [],
26 [enable_debug_log=yes])
27 AC_ARG_VAR([GNUNET_CONFIG],[The gnunet-config tool])
28 min_gnunet_version=m4_if([$1], ,0.15.3,$1)
29 # Make sure the specified version is at least the version with
30 # the features required to use this macro
31 AS_VERSION_COMPARE([$min_gnunet_version],[0.15.3],
32 [AC_MSG_WARN([The specified GNUnet version $min_gnunet_version is too old.])
33 AC_MSG_WARN([The minimum version has been set to 0.15.3])
34 min_gnunet_version="0.15.3"])
35 AS_IF([test "x${GNUNET_CONFIG+set}" != "xset"],
36 [PKG_CHECK_MODULES([GNUNET],[gnunetutil >= $min_gnunet_version],
37 [gnunet_pkgconfig=yes],[gnunet_pkgconfig=no])
38 AS_IF([test "x$gnunet_pkgconfig" = "xno" && test "x$gnunet_prefix" != "x"],
39 [gnunet_PATH="$PATH"
40 AS_IF([test "x$prefix" != "xNONE"],
41 [gnunet_PATH="$prefix/bin${PATH_SEPARATOR}$prefix/usr/bin"])
42 AC_PATH_PROG([GNUNET_CONFIG],[gnunet-config],[no],[$gnunet_PATH])
43 AS_UNSET([gnunet_PATH])],
44 [GNUNET_CONFIG="pkg-config gnunetutil"])])
45 AC_MSG_CHECKING([if GNUnet version is >= $min_gnunet_version])
46 gnunet_result=no
47 AS_IF([test "x$GNUNET_CONFIG" != "xno" && test -n "$GNUNET_CONFIG"],
48 [gnunet_version=`$GNUNET_CONFIG --version | tr ' ' '\n' | sed -n '2p'`
49 AS_VERSION_COMPARE([$gnunet_version],[$min_gnunet_version],
50 [gnunet_result=no],
51 [gnunet_result=yes],
52 [gnunet_result=yes])
53 AS_UNSET([gnunet_version])])
54 AS_IF([test "x$gnunet_result" != "xyes"],
55 [AC_MSG_RESULT([no])
56 m4_if([$3], ,:,[$3])],
57 [AC_MSG_RESULT([yes])
58 m4_if([$2], ,:,[$2])
59 AC_CHECK_HEADERS([sys/socket.h netinet/in.h byteswap.h])
60 AS_IF([test "x${GNUNET_CFLAGS+set}" != "xset"],
61 [GNUNET_CFLAGS=`$GNUNET_CONFIG --cflags`
62 AC_SUBST([GNUNET_CFLAGS])])
63 AS_IF([test "x${GNUNET_LIBS+set}" != "xset"],
64 [GNUNET_LIBS=`$GNUNET_CONFIG --libs`
65 AC_SUBST([GNUNET_LIBS])])
66 AS_IF([test "x$enable_debug_log" = "xno"],
67 [AC_DEFINE([GNUNET_EXTRA_LOGGING],
68 [0],
69 [0 if debug messages should be culled])])])
70 AS_UNSET([gnunet_result])
71 AS_UNSET([min_gnunet_version])
72])
diff --git a/contrib/services/systemd/tmpfiles-gnunet.conf b/contrib/services/systemd/tmpfiles-gnunet.conf
index ffffa3284..251b475c9 100644
--- a/contrib/services/systemd/tmpfiles-gnunet.conf
+++ b/contrib/services/systemd/tmpfiles-gnunet.conf
@@ -1,10 +1,10 @@
1# Typically placed into /usr/lib/tmpfiles.d/gnunet.conf 1# Typically placed into /usr/lib/tmpfiles.d/gnunet.conf
2d /var/lib/gnunet 0700 gnunet gnunet - - 2d /var/lib/gnunet 0700 gnunet gnunet - -
3z /usr/lib/gnunet/gnunet-helper-dns 4750 root gnunetdns - - 3z /usr/lib/gnunet/libexec/gnunet-helper-dns 4750 root gnunetdns - -
4z /usr/lib/gnunet/gnunet-service-dns 2750 gnunet gnunetdns - - 4z /usr/lib/gnunet/libexec/gnunet-service-dns 2750 gnunet gnunetdns - -
5z /usr/lib/gnunet/libexec/gnunet-helper-vpn 4750 root root - - 5z /usr/lib/gnunet/libexec/gnunet-helper-vpn 4755 root root - -
6z /usr/lib/gnunet/libexec/gnunet-helper-transport-wlan 4750 root root - - 6z /usr/lib/gnunet/libexec/gnunet-helper-transport-wlan 4755 root root - -
7z /usr/lib/gnunet/libexec/gnunet-helper-transport-bluetooth 4750 root root - - 7z /usr/lib/gnunet/libexec/gnunet-helper-transport-bluetooth 4755 root root - -
8z /usr/lib/gnunet/libexec/gnunet-helper-exit 4750 root root - - 8z /usr/lib/gnunet/libexec/gnunet-helper-exit 4755 root root - -
9z /usr/lib/gnunet/libexec/gnunet-helper-nat-server 4750 root root - - 9z /usr/lib/gnunet/libexec/gnunet-helper-nat-server 4755 root root - -
10z /usr/lib/gnunet/libexec/gnunet-helper-nat-client 4750 root root - - 10z /usr/lib/gnunet/libexec/gnunet-helper-nat-client 4755 root root - -
diff --git a/contrib/xdg-scheme-handler/README.md b/contrib/xdg-scheme-handler/README.md
new file mode 100644
index 000000000..919ae37f8
--- /dev/null
+++ b/contrib/xdg-scheme-handler/README.md
@@ -0,0 +1,8 @@
1XDG Scheme Handler for GNUnet URIs
2==================================
3
4To register the `gnunet://` URI scheme, launch the following commands from this
5directory as a privileged user:
6
7 install -Dm644 gnunet-uri.desktop /usr/share/applications/gnunet-uri.desktop
8 update-mime-database /usr/share/applications/
diff --git a/contrib/xdg-scheme-handler/gnunet-uri.desktop b/contrib/xdg-scheme-handler/gnunet-uri.desktop
new file mode 100644
index 000000000..4f847d20f
--- /dev/null
+++ b/contrib/xdg-scheme-handler/gnunet-uri.desktop
@@ -0,0 +1,9 @@
1[Desktop Entry]
2Name=GNUnet URI
3Exec=gnunet-uri %u
4GenericName=URI handler for the GNUnet network
5Icon=gnunet
6Type=Application
7Terminal=false
8NoDisplay=true
9MimeType=x-scheme-handler/gnunet;