# Contributor: xrs # Maintainer: xrs pkgname=gnunet pkgver=0.19.4 pkgrel=0 pkgdesc="A framework for secure and privacy enhancing peer-to-peer networking" url="https://gnunet.org" # ppc64le, s390x, and riscv64 blocked by luatex -> texlive arch="all !s390x !ppc64le !riscv64" license="AGPL-3.0-only" depends="gnutls-utils bash which iptables coreutils runit" depends_dev="libgpg-error-dev libgcrypt-dev nettle-dev unbound-dev gnutls-dev curl-dev libmicrohttpd-dev openssl-dev>3 libunistring-dev libidn2-dev nss-dev sqlite-dev zlib-dev miniupnpc-dev gmp-dev gettext openjpeg-dev jansson-dev libsodium-dev" makedepends="$depends_dev autoconf automake libtool gettext-dev python3 texlive texlive-luatex py3-sphinx py3-sphinx_rtd_theme" install="$pkgname.pre-install $pkgname.post-install" pkgusers="gnunet" pkggroups="gnunet gnunetdns" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc" options="!check suid" # No check because The GNUnet project lacks a good CI at the moment. source="https://ftpmirror.gnu.org/gnu/gnunet/gnunet-$pkgver.tar.gz $pkgname-system.conf $pkgname-system-services.initd $pkgname-user-services.initd setup-$pkgname-user " build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-poisoning \ --enable-logging=verbose make } check() { make DESTDIR="$pkgdir" check } package() { make DESTDIR="$pkgdir" -j1 install # Using more CPUs generates CI-errors. libexecdir=$pkgdir/usr/lib/gnunet/libexec/ # Limit access to critical gnunet-helper-dns to group "gnunetdns" chgrp gnunetdns $libexecdir/gnunet-helper-dns chgrp gnunetdns $libexecdir/gnunet-service-dns # Limit access to certain SUID binaries by group "gnunet" chgrp gnunet $libexecdir/gnunet-helper-exit chgrp gnunet $libexecdir/gnunet-helper-vpn chgrp gnunet $libexecdir/gnunet-helper-nat-client chgrp gnunet $libexecdir/gnunet-helper-nat-server chmod u+s $libexecdir/gnunet-helper-exit chmod u+s $libexecdir/gnunet-helper-vpn chmod 2750 $libexecdir/gnunet-helper-dns chmod 2700 $libexecdir/gnunet-service-dns chmod u+s $libexecdir/gnunet-helper-nat-client chmod u+s $libexecdir/gnunet-helper-nat-server install -m644 -D $srcdir/$pkgname-system.conf \ $pkgdir/etc/$pkgname.conf install -m755 -D $srcdir/$pkgname-system-services.initd \ $pkgdir/etc/init.d/$pkgname-system-services install -m755 -D $srcdir/$pkgname-user-services.initd \ $pkgdir/etc/init.d/$pkgname-user-services install -m755 -D $srcdir/setup-$pkgname-user \ $pkgdir/usr/bin/setup-$pkgname-user install -dm0755 -o $pkgusers \ $pkgdir/var/run/$pkgname } dev() { default_dev # dev() will move gnunet-config from $pkg to $pkg-dev, but it's an # intended part of $pkg. mv $subpkgdir/usr/bin/gnunet-config $pkgdir/usr/bin/ } sha512sums=" c994269e009c6a97860e1903e87ab08b6f79a8f5bb7c27261020e90d162f81d908fe42173969331f3cada2086df8a719caa62c46342d59d46a2b2dd2fb71efa1 gnunet-0.19.4.tar.gz 0768a167567c7f324cb8ac38d7260569d2c066fbf8ebe1ccc8e78abea319eff11e4162b5e86b97a2fb8d652681c50f689522f0e9283f7d26873c19e2e57b3f77 gnunet-system.conf 24d230b077c7a47a116ac428c411e0fc62b9c019ac97f95d27a0e57112d554734d9b9bfd1e0b22366b387074b621f98d11fbf87f2c6fbafcc2888acda630b54d gnunet-system-services.initd 8daf862f7c81bd5b143a05f786c4edce76c91d4d226903288a4d2d88898b9b7ba017cf683a20d918b9ad93aff5f391eb5f928843a2fcd35e6e48f3a611dc9d8d gnunet-user-services.initd 66aec826e085e862abc1111aadeee9f1d5bb85a6aa8ccd08e3af1863e460c4fe0f0fdcf7677c14f0d2f4e4355fefba20878ed41553528c005b206941f1966faf setup-gnunet-user "