diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/gnunet |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/gnunet')
-rw-r--r-- | community/gnunet/PKGBUILD | 37 | ||||
-rw-r--r-- | community/gnunet/build-fix.patch | 21 | ||||
-rw-r--r-- | community/gnunet/gnunet.conf.d | 1 | ||||
-rw-r--r-- | community/gnunet/gnunet.rc | 40 |
4 files changed, 99 insertions, 0 deletions
diff --git a/community/gnunet/PKGBUILD b/community/gnunet/PKGBUILD new file mode 100644 index 000000000..a7117f1e3 --- /dev/null +++ b/community/gnunet/PKGBUILD @@ -0,0 +1,37 @@ +# $Id: PKGBUILD 43135 2011-03-24 08:18:05Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: wahnby <wahnby@yahoo.fr> + +pkgname=gnunet +pkgver=0.9.0pre2 +pkgrel=1 +pkgdesc="A framework for secure peer-to-peer networking" +arch=('i686' 'x86_64') +url="http://gnunet.org" +license=('GPL') +depends=('gmp' 'libgcrypt' 'libextractor' 'sqlite3' 'guile' 'curl' 'libglade' + 'adns' 'libmicrohttpd') +makedepends=('gettext' 'pkgconfig') +backup=(etc/gnunetd.conf) +options=('!libtool' '!makeflags') +source=(ftp://ftp.gnu.org/gnu/gnunet/gnunet-$pkgver.tar.gz + gnunet.rc + gnunet.conf.d + build-fix.patch) +md5sums=('a4d0fad4f6fc6b520b3b73ee54167270' + '0d62ab7f2a28af3ac082015696ee6ef3' + 'f161b46915736e4017e77ad735521453' + 'c646e634754e29004bb569873a270bf1') + +build() { + cd $srcdir/gnunet-$pkgver + unset LDFLAGS + patch -p1 <$srcdir/build-fix.patch + [ -f Makefile ] || ./configure --prefix=/usr --without-mysql + make + make DESTDIR=$pkgdir install + install -D -m0755 $srcdir/gnunet.rc $pkgdir/etc/rc.d/gnunetd + install -D -m0644 $srcdir/gnunet.conf.d $pkgdir/etc/conf.d/gnunetd + install -D -m0644 $srcdir/gnunet-$pkgver/contrib/defaults.conf $pkgdir/etc/gnunetd.conf + rm -rf $pkgdir/usr/include/libltdl $pkgdir/usr/lib/libltdl.* $pkgdir/usr/include/ltdl.h +} diff --git a/community/gnunet/build-fix.patch b/community/gnunet/build-fix.patch new file mode 100644 index 000000000..2ca902fcd --- /dev/null +++ b/community/gnunet/build-fix.patch @@ -0,0 +1,21 @@ +diff -wbBur gnunet-0.9.0pre2/src/transport/plugin_transport_http.c gnunet-0.9.0pre2.my/src/transport/plugin_transport_http.c +--- gnunet-0.9.0pre2/src/transport/plugin_transport_http.c 2010-12-23 09:37:50.000000000 +0000 ++++ gnunet-0.9.0pre2.my/src/transport/plugin_transport_http.c 2011-03-24 07:59:13.000000000 +0000 +@@ -1077,7 +1077,7 @@ + + conn_info = MHD_get_connection_info(mhd_connection, MHD_CONNECTION_INFO_CLIENT_ADDRESS ); + /* Incoming IPv4 connection */ +- if ( AF_INET == conn_info->client_addr->sin_family) ++ if ( AF_INET == ((struct sockaddr_in*)(conn_info->client_addr))->sin_family) + { + addrin = conn_info->client_addr; + inet_ntop(addrin->sin_family, &(addrin->sin_addr),address,INET_ADDRSTRLEN); +@@ -1087,7 +1087,7 @@ + addr_len = sizeof(struct IPv4HttpAddress); + } + /* Incoming IPv6 connection */ +- if ( AF_INET6 == conn_info->client_addr->sin_family) ++ if ( AF_INET6 == ((struct sockaddr_in6*)(conn_info->client_addr))->sin6_family) + { + addrin6 = (struct sockaddr_in6 *) conn_info->client_addr; + inet_ntop(addrin6->sin6_family, &(addrin6->sin6_addr),address,INET6_ADDRSTRLEN); diff --git a/community/gnunet/gnunet.conf.d b/community/gnunet/gnunet.conf.d new file mode 100644 index 000000000..f10a322ce --- /dev/null +++ b/community/gnunet/gnunet.conf.d @@ -0,0 +1 @@ +GNUNETD_USER=nobody diff --git a/community/gnunet/gnunet.rc b/community/gnunet/gnunet.rc new file mode 100644 index 000000000..34c7c5fe1 --- /dev/null +++ b/community/gnunet/gnunet.rc @@ -0,0 +1,40 @@ +#!/bin/bash + +GNUNETD_USER=nobody + +. /etc/conf.d/gnunetd +. /etc/rc.conf +. /etc/rc.d/functions + +PID=$(pidof -o %PPID /usr/bin/gnunetd) +case "$1" in + start) + stat_busy "Starting gnunetd" + [ -z "$PID" ] && /usr/bin/gnunetd -c /etc/gnunetd.conf -u $GNUNETD_USER 1>/dev/null 2>/dev/null & + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon gnunetd + stat_done + fi + ;; + stop) + stat_busy "Stopping gnunetd" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon gnunetd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac +exit 0 |