From 0174f5578fd28a78c48e99e1730fdae27c0fdb1b Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Sat, 16 Feb 2013 00:18:10 -0500 Subject: Adding packages to pcr --- pcr/miniupnpd/PKGBUILD | 49 +++++++++++++++++ pcr/miniupnpd/miniupnpd.init | 51 +++++++++++++++++ pcr/miniupnpd/miniupnpd.systemd | 12 ++++ pcr/monkeysphere/PKGBUILD | 22 ++++++++ pcr/monkeysphere/monkeysphere.install | 43 +++++++++++++++ pcr/netatalk/PKGBUILD | 43 +++++++++++++++ pcr/netatalk/netatalk.changelog | 101 ++++++++++++++++++++++++++++++++++ pcr/netatalk/netatalk.install | 20 +++++++ pcr/olsrd/PKGBUILD | 31 +++++++++++ pcr/olsrd/olsrd.install | 21 +++++++ pcr/olsrd/rc.d.olsrd | 36 ++++++++++++ pcr/openswan/PKGBUILD | 46 ++++++++++++++++ pcr/openswan/compile.patch | 11 ++++ pcr/openswan/openswan.rc.d | 43 +++++++++++++++ 14 files changed, 529 insertions(+) create mode 100644 pcr/miniupnpd/PKGBUILD create mode 100644 pcr/miniupnpd/miniupnpd.init create mode 100644 pcr/miniupnpd/miniupnpd.systemd create mode 100644 pcr/monkeysphere/PKGBUILD create mode 100644 pcr/monkeysphere/monkeysphere.install create mode 100644 pcr/netatalk/PKGBUILD create mode 100644 pcr/netatalk/netatalk.changelog create mode 100644 pcr/netatalk/netatalk.install create mode 100644 pcr/olsrd/PKGBUILD create mode 100755 pcr/olsrd/olsrd.install create mode 100755 pcr/olsrd/rc.d.olsrd create mode 100644 pcr/openswan/PKGBUILD create mode 100644 pcr/openswan/compile.patch create mode 100755 pcr/openswan/openswan.rc.d diff --git a/pcr/miniupnpd/PKGBUILD b/pcr/miniupnpd/PKGBUILD new file mode 100644 index 000000000..30108d4d5 --- /dev/null +++ b/pcr/miniupnpd/PKGBUILD @@ -0,0 +1,49 @@ +# $Id$ +# Maintainer: None +pkgname=miniupnpd +pkgver=1.7.20121005 +pkgrel=4 +pkgdesc="Lightweight UPnP IGD daemon" +arch=('i686' 'x86_64' 'mips64el') +url="http://miniupnp.free.fr" +license=('BSD') +backup=(etc/miniupnpd/miniupnpd.conf) +depends=('libnfnetlink') +source=("http://miniupnp.free.fr/files/$pkgname-$pkgver.tar.gz" miniupnpd.init miniupnpd.systemd) +sha1sums=('4579c4711a8455bf455f3757ac9ce0dc40088901' + 'c84031d7af122c5bede8609bcfa80bc31f2a5e61' + '9cf48feb98dadee8a566b2dc7811a95020ad3895') + +_ipt_arch_ver=$(pacman -Ss iptables | awk '/\/iptables/ { print $2 }') +depends+=("iptables=$_ipt_arch_ver") + +build() { + ipt_upstream_ver=iptables-${_ipt_arch_ver%%-*} + if [ ! -d $ipt_upstream_ver ]; then + curl -O "http://www.iptables.org/projects/iptables/files/${ipt_upstream_ver}.tar.bz2" + bsdtar -jxvf $ipt_upstream_ver.tar.bz2 + fi + + cd "$srcdir/$ipt_upstream_ver" + ./configure --enable-static + make + + cd "$srcdir/$pkgname-$pkgver" + make -f Makefile.linux config.h + IPTABLESPATH="$srcdir/$ipt_upstream_ver" make -f Makefile.linux +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + mkdir -p "$pkgdir/usr/share/man/man8" + make PREFIX="$pkgdir/" -f Makefile.linux install + rm -r "${pkgdir}/etc/init.d" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm755 "${srcdir}/miniupnpd.init" "${pkgdir}/etc/rc.d/miniupnpd" + install -Dm644 "${srcdir}/miniupnpd.systemd" "${pkgdir}/usr/lib/systemd/system/miniupnpd.service" + sed -i 's:/sbin/iptables:/usr/sbin/iptables: + s:eth0:"`cat /etc/miniupnpd/miniupnpd.conf | '"awk -F= '/^ext_ifname/ { print \$2 }'"'`":' "${pkgdir}"/etc/miniupnpd/*.sh + sed -i -e "s/^uuid=[-0-9a-f]*/uuid=00000000-0000-0000-0000-000000000000/ + s/make genuuid/uuidgen/" "${pkgdir}/etc/miniupnpd/miniupnpd.conf" +} + diff --git a/pcr/miniupnpd/miniupnpd.init b/pcr/miniupnpd/miniupnpd.init new file mode 100644 index 000000000..e09ac3ade --- /dev/null +++ b/pcr/miniupnpd/miniupnpd.init @@ -0,0 +1,51 @@ +#!/bin/sh + +MINIUPNPD=/usr/sbin/miniupnpd +ARGS='-f /etc/miniupnpd/miniupnpd.conf' +PIDFILE='/var/run/miniupnpd.pid' +IPTABLES_CREATE=/etc/miniupnpd/iptables_init.sh +IPTABLES_REMOVE=/etc/miniupnpd/iptables_removeall.sh + +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting MiniUPNPd" + + if ! pidof -o %PPID $MINIUPNPD &> /dev/null; then + rm -f "$PIDFILE" + fi + + $IPTABLES_CREATE > /dev/null 2>&1 + + PID="$(cat "$PIDFILE" 2> /dev/null)" + + if [ -z "$PID" ] && $MINIUPNPD $ARGS; then + add_daemon miniupnpd + stat_done + else + stat_fail + fi + ;; + stop) + stat_busy "Stopping MiniUPNPd" + PID="$(cat "$PIDFILE" 2> /dev/null)" + if [ -n "$PID" ] && kill "$PID" &> /dev/null; then + rm -f "$PIDFILE" + rm_daemon miniupnpd + stat_done + else + stat_fail + fi + ;; + restart) + "$0" stop + sleep 1 + "$0" start + ;; + *) + echo "Usage: /etc/rc.d/miniupnpd {start|stop|restart}" + exit 2 + ;; +esac +exit 0 diff --git a/pcr/miniupnpd/miniupnpd.systemd b/pcr/miniupnpd/miniupnpd.systemd new file mode 100644 index 000000000..4c5aa77cc --- /dev/null +++ b/pcr/miniupnpd/miniupnpd.systemd @@ -0,0 +1,12 @@ +[Unit] +Description=Lightweight UPnP IGD daemon + +[Service] +ExecStartPre=/etc/miniupnpd/iptables_init.sh +ExecStart=/usr/sbin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf -d +ExecStopPost=/etc/miniupnpd/iptables_removeall.sh +PIDFile=/var/run/miniupnpd.pid +StandardOutput=null + +[Install] +WantedBy=network.target diff --git a/pcr/monkeysphere/PKGBUILD b/pcr/monkeysphere/PKGBUILD new file mode 100644 index 000000000..d274631eb --- /dev/null +++ b/pcr/monkeysphere/PKGBUILD @@ -0,0 +1,22 @@ +# Contributor: fauno +# Based on monkeysphere-git from +# Contributor: Olivier Mehani +# $Id: PKGBUILD 264 2010-11-10 00:57:53Z shtrom $ +pkgname=monkeysphere +pkgver=0.35 +pkgrel=4 +pkgdesc="Leverage the OpenPGP web of trust for OpenSSH and Web authentication" +arch=('any') +url="http://web.monkeysphere.info/" +license=('GPL3') +depends=('gnupg' 'lockfile-progs' 'perl-crypt-openssl-rsa' 'perl-digest-sha1') +source=(http://archive.monkeysphere.info/debian/pool/${pkgname}/m/${pkgname}/${pkgname}_${pkgver}.orig.tar.gz) +install=monkeysphere.install +md5sums=('481ac14c9fdef0ccd1944c593bd4f517') + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install + mkdir -p $pkgdir/var/lib/monkeysphere +} diff --git a/pcr/monkeysphere/monkeysphere.install b/pcr/monkeysphere/monkeysphere.install new file mode 100644 index 000000000..2013f9f41 --- /dev/null +++ b/pcr/monkeysphere/monkeysphere.install @@ -0,0 +1,43 @@ +#!/bin/sh +# $Id: monkeysphere.install 264 2010-11-10 00:57:53Z shtrom $ +# vim:set ts=2 sw=2 et: + +# arg 1: the new package version +pre_install() { + /bin/true +} + +# arg 1: the new package version +post_install() { + echo ">>> Creating monkeysphere user and group and setting permissions..." + getent group monkeysphere >/dev/null || usr/sbin/groupadd monkeysphere + getent passwd monkeysphere >/dev/null || usr/sbin/useradd -c 'Monkeysphere WoT server identification tool' -g monkeysphere -d '/var/lib/monkeysphere' -s /bin/bash monkeysphere + +# Should be root:root for sshd to work + chown root:root /var/lib/monkeysphere +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + /bin/true +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { +# Should be root:root for sshd to work + chown root:root /var/lib/monkeysphere +} + +# arg 1: the old package version +pre_remove() { + usr/sbin/userdel monkeysphere &>/dev/null + (getent group monkeysphere >/dev/null && usr/sbin/groupdel monkeysphere &>/dev/null) || /bin/true +} + +# arg 1: the old package version +post_remove() { + /bin/true +} + diff --git a/pcr/netatalk/PKGBUILD b/pcr/netatalk/PKGBUILD new file mode 100644 index 000000000..e3d5b265e --- /dev/null +++ b/pcr/netatalk/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: SJ_UnderWater +# Based on netatalk package : +# Maintainer: Dominik Dingel +# Contributor: William Udovich +# Contributor: Farhan Yousaf + +pkgname=netatalk +pkgver=3.0.2 +pkgrel=1 +pkgdesc='A kernel-level implementation of AFP services' +arch=('i686' 'x86_64' 'mips64el') +url='http://netatalk.sourceforge.net' +license=('GPL') +depends=('avahi>=0.6' 'libldap' 'libgcrypt>=1.2.3' 'libevent') +replaces=('netatalk-git' 'netatalk2') +backup=('etc/afp.conf' + 'etc/extmap.conf') +options=('!libtool') +install=$pkgname.install +changelog=$pkgname.changelog +source=(http://iweb.dl.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2) +md5sums=('b5f1c2c4b3a5e64f5bca219415aa1c75') + +build() { + cd $pkgname-$pkgver + msg2 'Fixing...' + sed -i -e 's:AC_CONFIG_SUBDIRS:#AC_CONFIG_SUBDIRS:' -e 's/x"linux/x"generic/' macros/netatalk.m4 + sed -i 's:/lib:/usr/lib:' distrib/initscripts/Makefile.{am,in} + sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' {configure.ac,libevent/configure.in} + cp /usr/share/automake*/missing . + autoreconf -i >/dev/null + msg2 'Configuring...' + CFLAGS="-Wno-unused-result" ./configure --prefix=/usr --localstatedir=/var/state --sysconfdir=/etc --with-init-style=systemd \ + --with-cracklib --with-cnid-cdb-backend --enable-pgp-uam --with-libevent=no + sed -i -e s/-Ino// -e s/-Lno// etc/netatalk/Makefile + msg2 'Making...' + make >/dev/null +} +package() { + cd $pkgname-$pkgver + msg2 'Building...' + make DESTDIR="$pkgdir" install >/dev/null +} diff --git a/pcr/netatalk/netatalk.changelog b/pcr/netatalk/netatalk.changelog new file mode 100644 index 000000000..b1ada018b --- /dev/null +++ b/pcr/netatalk/netatalk.changelog @@ -0,0 +1,101 @@ +2012-10-08 SJ_UnderWater + + * 3.0.1-3 : + moved systemd from /etc + better rc.d install test + +2012-10-05 SJ_UnderWater + + * 3.0.1-2 : + removed rc.d references + +2012-10-04 SJ_UnderWater + + * 3.0.1-1 : + new version + moved to systemd + moved state to /var/db + +2012-07-14 SJ_UnderWater + + * 3.0-3 : + moved localstate dir + to /etc for historical + reasons + +2012-07-12 SJ_UnderWater + + * 3.0-2 : + disable bundled libevent + +2012-07-11 SJ_UnderWater + + * 3.0-1 : + updated to new release + DDP moved to new pkg + +2012-06-12 SJ_UnderWater + + * 2.2.3-4 : + added kill timing + +2012-06-04 SJ_UnderWater + + * 2.2.3-3 : + removed conflicting files + +2012-06-02 SJ_UnderWater + + * 2.2.3-2 : + Missing UAM links + +2012-05-29 SJ_UnderWater + + * 2.2.3-1 : + updated package version + allowing headers and m4 + +2012-05-01 SJ_UnderWater + + * 2.2.2-6 : + moved to .rc files + refactored PKGBUILD + install rc.d files + +2012-04-25 SJ_UnderWater + + * 2.2.2-5 : + init rebuild + fix dep check + fix get_pid + function relocation + +2012-04-21 SJ_UnderWater + + * 2.2.2-4 : + moved to package() + added backup + split backup + moved depends + +2012-04-08 SJ_UnderWater + + * 2.2.2-3 : + fixed extra dependencies + FHS compliance + NAMCAP checking + moved cups to optdepends + +2012-04-07 SJ_UnderWater + + * 2.2.2-2 : + added Install + changed "conflicts" with "replace" + cleaned up PKGBUILD + + * 2.2.2-1 : + added ChangeLog. + moved to split package format + bidirectional dependency-checking + moved to release package format + PKGBUILD compliance diff --git a/pcr/netatalk/netatalk.install b/pcr/netatalk/netatalk.install new file mode 100644 index 000000000..629586531 --- /dev/null +++ b/pcr/netatalk/netatalk.install @@ -0,0 +1,20 @@ +post_install() { + post_upgrade +} +post_upgrade() { + if [ -f /etc/rc.conf ] && [ "`grep -E '(cnid|atalkd|afpd)' /etc/rc.conf`" ];then + echo '>>> Detected old netatalk daemon entries in'; + echo '>>> /etc/rc.conf, please replace these with'; + echo '>>> "netatalk" before restarting!'; + else echo '>>> Add "netatalk" to your DAEMONS list';fi + echo '>>>'; + if [ -f /etc/avahi/services/adisk.service ] || + [ -f /etc/avahi/services/afpd.service ];then + echo '>>> Detected old netatalk service files in'; + echo '>>> /etc/avahi/services, please delete these'; + echo '>>> before restarting!';fi + if [ -f /opt/netatalk/afp_signature.conf ] || + [ -f /opt/netatalk/afp_voluuid.conf ]; then + echo '>>> Found *.conf in /opt/netatalk, please'; + echo '>>> migrate these to /etc/netatalk before restarting';fi +} diff --git a/pcr/olsrd/PKGBUILD b/pcr/olsrd/PKGBUILD new file mode 100644 index 000000000..668e39cea --- /dev/null +++ b/pcr/olsrd/PKGBUILD @@ -0,0 +1,31 @@ +# Contributor: William Rea +# Maintainer: Claudio Pisa +pkgname=olsrd +pkgver=0.6.1 +pkgrel=2 +pkgdesc="OLSR routing daemon (RFC 3626)" +arch=(i686 x86_64 ppc mips64el) +url="http://www.olsr.org" +license=('BSD') +depends=('glibc') +makedepends=('bison') +backup=etc/olsrd.conf +install=olsrd.install +source=(http://www.olsr.org/releases/0.6/${pkgname}-${pkgver}.tar.bz2 rc.d.olsrd) +md5sums=('a75fc9b6252df5b5f49f13418fafeff1' 'bc3e393e0179ffff0a6d6c9d6a5c4b60') + +build() { + cd $srcdir/$pkgname-$pkgver + + CFLAGS+=" -fPIC " \ + make OS=linux build_all +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install_all + + install -D -m755 $srcdir/rc.d.olsrd $pkgdir/etc/rc.d/olsrd + install -D -m644 license.txt $pkgdir/usr/share/licenses/olsrd/LICENSE +} + diff --git a/pcr/olsrd/olsrd.install b/pcr/olsrd/olsrd.install new file mode 100755 index 000000000..f49372538 --- /dev/null +++ b/pcr/olsrd/olsrd.install @@ -0,0 +1,21 @@ +post_install() { +echo "--------------------------------------------------------------------" +echo " Remember to edit /etc/olsrd.conf to match your network settings." +echo "--------------------------------------------------------------------" +/bin/true +} + +post_upgrade() { +/bin/true +} + +pre_remove() { +/etc/rc.d/olsrd stop +/bin/true +} + +op=$1 +shift + +$op "$@" + diff --git a/pcr/olsrd/rc.d.olsrd b/pcr/olsrd/rc.d.olsrd new file mode 100755 index 000000000..d257e22ef --- /dev/null +++ b/pcr/olsrd/rc.d.olsrd @@ -0,0 +1,36 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/olsrd` +case "$1" in + start) + stat_busy "Starting OLSR Daemon" + [ -z "$PID" ] && /usr/sbin/olsrd -d 0 &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon olsrd + stat_done + fi + ;; + stop) + stat_busy "Stopping OLSR Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon olsrd + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 + diff --git a/pcr/openswan/PKGBUILD b/pcr/openswan/PKGBUILD new file mode 100644 index 000000000..bae970025 --- /dev/null +++ b/pcr/openswan/PKGBUILD @@ -0,0 +1,46 @@ +# Contributor: Jan Fader +pkgname=openswan +pkgver=2.6.36 +pkgrel=2 +pkgdesc="Open Source implementation of IPsec for the Linux operating system" +url="http://www.openswan.org" +license=('GPL' 'custom') +arch=('i686' 'x86_64' 'mips64el') +depends=('iproute' 'gmp' 'perl') +backup=(etc/ipsec.conf \ + etc/ipsec.d/policies/{block,clear,clear-or-private,private,private-or-clear}) +source=(http://www.openswan.org/download/openswan-$pkgver.tar.gz + openswan.rc.d + compile.patch) + +build() { + # Create /etc/rc.d for init script, and license directory + mkdir -p $pkgdir/{etc/rc.d,usr/share/licenses/openswan} + + cd $srcdir/openswan-$pkgver + patch -p1 -i $srcdir/compile.patch + + # Change install paths to Arch defaults + sed -i 's|/usr/local|/usr|;s|libexec/ipsec|lib/openswan|' Makefile.inc + + make USE_XAUTH=true USE_OBJDIR=true programs +} + +package(){ + cd $srcdir/openswan-$pkgver + make DESTDIR=$pkgdir install + + # Change permissions in /var + chmod 755 $pkgdir/var/run/pluto + + # Copy License + cp LICENSE $pkgdir/usr/share/licenses/openswan + + # Install init script + install -Dm755 ../openswan.rc.d $pkgdir/etc/rc.d/openswan + # fix manpages + mv $pkgdir/usr/man $pkgdir/usr/share/ +} +md5sums=('b3a1733493520bb18729633b62ef8247' + '543d84162761b9cc9ec319e938c4dd2a' + '5540437bb334873da646e21ac9caa963') diff --git a/pcr/openswan/compile.patch b/pcr/openswan/compile.patch new file mode 100644 index 000000000..8ddff67f2 --- /dev/null +++ b/pcr/openswan/compile.patch @@ -0,0 +1,11 @@ +--- openswan-2.6.23/Makefile 2009-09-09 02:42:54.000000000 +0200 ++++ Makefile 2009-12-30 10:13:53.000000000 +0100 +@@ -12,6 +12,8 @@ + # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + # for more details. + # ++CFLAGS=-fno-strict-aliasing ++CXXFLAGS=-fno-strict-aliasing + + + OPENSWANSRCDIR?=$(shell pwd) diff --git a/pcr/openswan/openswan.rc.d b/pcr/openswan/openswan.rc.d new file mode 100755 index 000000000..30bd0d56e --- /dev/null +++ b/pcr/openswan/openswan.rc.d @@ -0,0 +1,43 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting Openswan IPsec" + /etc/rc.d/ipsec --start + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + add_daemon openswan + fi + ;; + stop) + stat_busy "Stopping Openswan IPsec" + /etc/rc.d/ipsec --stop + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + rm_daemon openswan + fi + ;; + restart) + stat_busy "Restarting Openswan IPsec" + /etc/rc.d/ipsec --restart + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + add_daemon openswan + fi + ;; + status) + /etc/rc.d/ipsec --status + ;; + *) + echo "usage: $0 {start|stop|restart|status}" +esac + -- cgit v1.2.3-2-g168b