aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-06-08 09:38:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-06-08 09:38:43 +0000
commit624542a224fe696937ec40e41c7771b03b34b20d (patch)
tree2537a0fd25c7ecbdf1bbea7c7bd3ba4547d5cf82
parent9230ae9e6afd745a1e55174ab26635671f62be07 (diff)
parentd47f73ead07e2abe6fa462b2ef2e52f8d53f9274 (diff)
downloadaports-624542a224fe696937ec40e41c7771b03b34b20d.tar.bz2
aports-624542a224fe696937ec40e41c7771b03b34b20d.tar.xz
Merge git://github.com/Barthalion/aports
2 new aports, 3 upgrades. Fix ipv6 support in ufw later
-rw-r--r--testing/gitolite/APKBUILD57
-rw-r--r--testing/gitolite/configuration.patch27
-rw-r--r--testing/libtorrent/APKBUILD6
-rw-r--r--testing/rtorrent/APKBUILD8
-rw-r--r--testing/ufw/APKBUILD28
-rw-r--r--testing/ufw/ufw.initd137
-rw-r--r--testing/vnstat/APKBUILD30
-rw-r--r--testing/vnstat/vnstatd.initd37
8 files changed, 256 insertions, 74 deletions
diff --git a/testing/gitolite/APKBUILD b/testing/gitolite/APKBUILD
index 673f0d6bd8..3a4eab3f99 100644
--- a/testing/gitolite/APKBUILD
+++ b/testing/gitolite/APKBUILD
@@ -1,47 +1,24 @@
+# Maintainer: Bartłomiej Pioteowski <nospam@bpiotrowski.pl>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer:
+
pkgname=gitolite
-pkgver=2.1
+pkgver=3.03
pkgrel=0
-pkgdesc="A centralized git server, with very fine-grained access control and many powerful features."
-url="http://github.com/sitaramc/gitolite"
-arch="noarch"
-license="GPL2"
-depends="git perl"
-depends_dev=""
-makedepends="$depends_dev wget"
-install=""
-subpackages="$pkgname-doc"
-source="saveas-https://github.com/sitaramc/gitolite/tarball/v2.1/gitolite-2.1.tar.gz
- configuration.patch"
-
-_builddir="$srcdir"/sitaramc-gitolite-871ed28
-
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
-
-build() {
- cd "$_builddir"
-}
+pkgdesc='A centralized git server, with very fine-grained access control and many powerful features.'
+url='http://github.com/sitaramc/gitolite'
+arch='noarch'
+license='GPL2'
+depends='git perl'
+#TODO: subpackages="$pkgname-doc"
+source="https://github.com/sitaramc/$pkgname/tarball/v${pkgver}/$pkgname-$pkgver.tar.gz"
package() {
- cd "$_builddir"
- mkdir -p "$pkgdir"/usr/bin \
- "$pkgdir"/etc/gitolite \
- "$pkgdir"/usr/share/gitolite/hooks \
- "$pkgdir"/usr/share/doc/gitolite
- mv src/* "$pkgdir"/usr/bin/
- mv conf/* "$pkgdir"/etc/gitolite/
- mv hooks/* "$pkgdir"/usr/share/gitolite/hooks/
- mv doc/* "$pkgdir"/usr/share/doc/gitolite/
+ cd "$srcdir"/sitaramc-gitolite-*
+
+ install -d "$pkgdir"/usr/lib/gitolite || return 1
+ install -d "${pkgdir}"/usr/bin || return 1
+ ./install -to "${pkgdir}"/usr/lib/gitolite || return 1
+ ln -s /usr/lib/gitolite/gitolite ${pkgdir}/usr/bin/ || return 1
}
-md5sums="33e0f6f384cf0596aed974fa563b50c3 gitolite-2.1.tar.gz
-b4603bb37d3a746a1508bd7528464ba4 configuration.patch"
+md5sums="5b66437e362e610595ad1d1b099e0812 gitolite-3.03.tar.gz"
diff --git a/testing/gitolite/configuration.patch b/testing/gitolite/configuration.patch
deleted file mode 100644
index 403dc4e261..0000000000
--- a/testing/gitolite/configuration.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/conf/example.gitolite.rc b/conf/example.gitolite.rc
-index d800357..95c5a24 100644
---- a/conf/example.gitolite.rc
-+++ b/conf/example.gitolite.rc
-@@ -19,8 +19,8 @@ $GL_CONF_COMPILED="$GL_ADMINDIR/conf/gitolite.conf-compiled.pm";
- # DO NOT CHANGE THE NEXT FOUR LINES UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
- # These variables are set automatically by the install method you choose.
- # (PACKAGE MAINTAINERS: PLEASE READ doc/packaging.mkd)
--# $GL_PACKAGE_CONF = "";
--# $GL_PACKAGE_HOOKS = "";
-+$GL_PACKAGE_CONF = "/etc/gitolite";
-+$GL_PACKAGE_HOOKS = "/usr/share/gitolite/hooks";
-
- # ------------------------------------------------------------------------------
- # most often used/changed variables
-diff --git a/src/gl-setup b/src/gl-setup
-index fd8357b..59de183 100755
---- a/src/gl-setup
-+++ b/src/gl-setup
-@@ -1,6 +1,6 @@
- #!/bin/sh
-
--GL_PACKAGE_CONF=/tmp/share/gitolite/conf
-+GL_PACKAGE_CONF=/etc/gitolite
- # must be the same as the value for the same variable in
- # $GL_PACKAGE_CONF/example.gitolite.rc. Sorry about the catch-22 :)
-
diff --git a/testing/libtorrent/APKBUILD b/testing/libtorrent/APKBUILD
index 06865bc7e5..ec51d9046b 100644
--- a/testing/libtorrent/APKBUILD
+++ b/testing/libtorrent/APKBUILD
@@ -1,8 +1,8 @@
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
pkgname=libtorrent
-pkgver=0.12.9
-pkgrel=1
+pkgver=0.13.2
+pkgrel=0
pkgdesc='BitTorrent library written in C++'
url='http://libtorrent.rakshasa.no/'
arch='all'
@@ -28,4 +28,4 @@ package() {
make DESTDIR="${pkgdir}" install || return 1
}
-md5sums="b128bbd324f03eb42ef5060080f87548 libtorrent-0.12.9.tar.gz"
+md5sums="96c0b81501357df402ab592f59ecaeab libtorrent-0.13.2.tar.gz"
diff --git a/testing/rtorrent/APKBUILD b/testing/rtorrent/APKBUILD
index 11c4b41f89..bc3dfad102 100644
--- a/testing/rtorrent/APKBUILD
+++ b/testing/rtorrent/APKBUILD
@@ -1,8 +1,8 @@
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
pkgname=rtorrent
-pkgver=0.8.9
-pkgrel=1
+pkgver=0.9.2
+pkgrel=0
pkgdesc='Ncurses BitTorrent client based on libTorrent'
url='http://libtorrent.rakshasa.no/'
license='GPL'
@@ -17,7 +17,7 @@ build() {
export LDFLAGS="${LDFLAGS} -lpthread"
./configure \
--prefix=/usr \
- --enable-debug \
+ --disable-debug \
--with-xmlrpc-c \
|| return 1
@@ -35,4 +35,4 @@ package() {
"${pkgdir}"/usr/share/doc/rtorrent/rtorrent.rc || return 1
}
-md5sums="629247636cb1210663b52dadbd040a6c rtorrent-0.8.9.tar.gz"
+md5sums="72c3e9ab859bda7cc8aa96c0b508b09f rtorrent-0.9.2.tar.gz"
diff --git a/testing/ufw/APKBUILD b/testing/ufw/APKBUILD
new file mode 100644
index 0000000000..02cd77ec93
--- /dev/null
+++ b/testing/ufw/APKBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+
+pkgname=ufw
+pkgver=0.31.1
+pkgrel=0
+pkgdesc='Uncomplicated CLI tool managing a netfilter firewall'
+url='https://launchpad.net/ufw'
+arch='noarch'
+license='GPL'
+depends='iptables python'
+makedepends='ip6tables'
+subpackages="$pkgname-doc"
+source="http://launchpad.net/$pkgname/$(echo $pkgver|cut -c1-4)/$pkgver/+download/$pkgname-$pkgver.tar.gz
+ $pkgname.initd"
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ sed -e 's|/lib|/usr/lib|' -i setup.py || return 1
+ python setup.py install --root="$pkgdir" || return 1 # move /lib to /usr/lib
+
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
+ chmod 644 "$pkgdir"/etc/ufw/*.rules "$pkgdir"/usr/lib/ufw/*.rules || return 1
+ sed -i '7s/YES/NO/' "$pkgdir"/etc/default/ufw || return 1 #TODO: ipv6 support
+}
+
+md5sums="74b49d4d06e26359a55bf4ff576833a7 ufw-0.31.1.tar.gz
+7bf1a3dee43b294bda8f2025e04164ce ufw.initd"
diff --git a/testing/ufw/ufw.initd b/testing/ufw/ufw.initd
new file mode 100644
index 0000000000..eea4fb7c66
--- /dev/null
+++ b/testing/ufw/ufw.initd
@@ -0,0 +1,137 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/files/ufw-2.initd,v 1.1 2011/07/24 11:18:22 pva Exp $
+
+depend() {
+ before net
+ provide firewall
+}
+
+start() {
+ ebegin "Starting ufw"
+ _source_file || { eend $?; return $?; }
+
+ local enabled_in_cfg ret
+ _check_if_enabled_in_cfg
+ enabled_in_cfg=$?
+
+ # Avoid "Firewall already started, use 'force-reload'" message that
+ # appears if `ufw enable' had been run before start().
+ if _status_quiet; then
+ eend 0
+ return
+ fi
+
+ # The ufw_start function does the same: if ufw is disabled using `ufw disable',
+ # ufw_start would not start ufw and return 0, so let's handle this case.
+ case $enabled_in_cfg in
+ 0)
+ ufw_start
+ ret=$?
+ eend $ret "Failed to start ufw."
+ ;;
+ 1)
+ # see /etc/conf.d/<name>
+ if [ "${ufw_nonfatal_if_disabled:-no}" != "yes" ]; then
+ ret=1
+ eend $ret "Not starting firewall (not enabled), use \"ufw enable\" first."
+ else
+ ret=0
+ eend 0
+ fi
+ ;;
+ 2)
+ ret=1
+ eend $ret "Failed to start ufw."
+ ;;
+ esac
+
+ return $ret
+}
+
+stop() {
+ ebegin "Stopping ufw"
+ _source_file || { eend $?; return $?; }
+ local enabled_in_cfg ret
+ _check_if_enabled_in_cfg
+ enabled_in_cfg=$?
+
+ # Same as above (unless --force is passed to ufw_stop).
+ case $enabled_in_cfg in
+ 0)
+ ufw_stop
+ ret=$?
+ ;;
+ 1)
+ einfo "INFO: ufw is configured to be disabled"
+ ufw_stop --force
+ ret=$?
+ ;;
+ 2)
+ ret=1
+ ;;
+ esac
+
+ eend $ret "Failed to stop ufw."
+ return $ret
+}
+
+_status_quiet() {
+ # return values: 0 - started, 1 - stopped, 2 - error
+ # Does not execute _source_file.
+ local ret
+ ufw_status > /dev/null
+ ret=$?
+ # Return values for ufw_status come from /usr/lib/ufw/ufw-init-functions.
+ case $ret in
+ 0) return 0 ;;
+ 3) return 1 ;;
+ *) return 2 ;;
+ esac
+}
+
+_source_file() {
+ local sourced_f="/usr/lib/ufw/ufw-init-functions"
+ if [ ! -f "$sourced_f" ]; then
+ eerror "Cannot find file $sourced_f!"
+ return 1
+ fi
+
+ local _path=$PATH
+ if ! source "$sourced_f"; then
+ # PATH can be broken here, fix it...
+ PATH=$_path
+ eerror "Error sourcing file $sourced_f"
+ return 1
+ fi
+
+ if [ -z "$PATH" ]; then
+ PATH=$_path
+ else
+ PATH="${PATH}:${_path}"
+ fi
+ return 0
+}
+
+_check_if_enabled_in_cfg() {
+ # Check if user has enabled the firewall with "ufw enable".
+ # Return 0 if firewall enabled in configuration file, 1 otherwise, 2 on error.
+
+ local sourced_f="/etc/ufw/ufw.conf"
+ if [ ! -f "$sourced_f" ]; then
+ eerror "Cannot find file $sourced_f!"
+ return 2
+ fi
+
+ if ! source "$sourced_f"; then
+ eerror "Error sourcing file $sourced_f"
+ return 2
+ fi
+
+ if [ "$ENABLED" = "yes" ] || [ "$ENABLED" = "YES" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
diff --git a/testing/vnstat/APKBUILD b/testing/vnstat/APKBUILD
new file mode 100644
index 0000000000..0ae9e742c0
--- /dev/null
+++ b/testing/vnstat/APKBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+
+pkgname=vnstat
+pkgver=1.11
+pkgrel=0
+pkgdesc='A console-based network traffic monitor'
+url='http://humdi.net/vnstat/'
+arch='all'
+license='GPL'
+makedepends='gd-dev'
+subpackages="$pkgname-doc"
+source="http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz
+ vnstatd.initd"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make all || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -D -m0755 "$srcdir"/vnstatd.initd "$pkgdir"/etc/init.d/vnstat || return 1
+ install -D -m0644 examples/vnstat.cron "$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cron || return 1
+ install -D -m0755 examples/vnstat.cgi "$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cgi || return 1
+}
+
+md5sums="a5a113f9176cd61fb954f2ba297f5fdb vnstat-1.11.tar.gz
+6c8a07d3388155c6cb23715ac8467700 vnstatd.initd"
diff --git a/testing/vnstat/vnstatd.initd b/testing/vnstat/vnstatd.initd
new file mode 100644
index 0000000000..b3f136cef3
--- /dev/null
+++ b/testing/vnstat/vnstatd.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/files/vnstatd.initd,v 1.6 2012/01/01 01:19:16 idl0r Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ use net
+}
+
+VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/var/run/vnstatd/vnstatd.pid}"
+
+start() {
+ ebegin "Starting vnstatd"
+ checkpath -q -d -m 755 -o vnstat:vnstat /var/run/vnstatd
+ start-stop-daemon --start --quiet \
+ --pidfile "${VNSTATD_PIDFILE}" \
+ --user vnstat --group vnstat \
+ --nicelevel ${VNSTATD_NICELEVEL:-0} \
+ --exec /usr/bin/vnstatd -- \
+ -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping vnstatd"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${VNSTATD_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading vnstatd configuration"
+ kill -HUP $(< "${VNSTATD_PIDFILE}") &>/dev/null
+ eend $?
+}