aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2012-05-01 11:55:35 +0000
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2012-05-01 11:55:35 +0000
commit20313a4d0e4cbe767df8408e32046c642ea59465 (patch)
tree64e6e49d6e4bde4992cd965ede355f3a1efaa1b2 /main
parent422469ae0f7ff261d41adc5c7efcfc7b3c0d9f7a (diff)
downloadaports-20313a4d0e4cbe767df8408e32046c642ea59465.tar.bz2
aports-20313a4d0e4cbe767df8408e32046c642ea59465.tar.xz
testing/awall: moved to main with dependencies (ipset, lua-signal, lua-sleep)
Diffstat (limited to 'main')
-rw-r--r--main/awall/APKBUILD58
-rw-r--r--main/ipset/APKBUILD43
-rw-r--r--main/ipset/ipset.initd24
-rw-r--r--main/lua-signal/APKBUILD36
-rw-r--r--main/lua-sleep/APKBUILD35
5 files changed, 196 insertions, 0 deletions
diff --git a/main/awall/APKBUILD b/main/awall/APKBUILD
new file mode 100644
index 0000000000..df7d371f70
--- /dev/null
+++ b/main/awall/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+pkgname=awall
+pkgver=0.1.1
+pkgrel=0
+pkgdesc="Alpine Wall"
+url=http://git.alpinelinux.org/cgit/kunkku/awall/
+arch=noarch
+license=GPL-2
+depends="bind-tools ip6tables ipset iptables lua lua-alt-getopt lua-filesystem lua-json4 lua-pc lua-signal lua-sleep lua-stringy"
+subpackages=$pkgname-nat
+source="${url}snapshot/awall-${pkgver}.tar.bz2"
+
+_builddir=$srcdir/awall-${pkgver}
+_luadir=usr/share/lua/5.1
+
+prepare() {
+ :
+}
+
+build() {
+ :
+}
+
+package() {
+ cd "$_builddir"
+ local dir=$pkgdir/$_luadir/awall
+ local bindir=$pkgdir/usr/sbin
+ local poldir=$pkgdir/usr/share/awall
+
+ install -d "$poldir/mandatory"
+ install -d "$poldir/optional"
+ install -d "$poldir/sample"
+
+ install -d "$bindir"
+ install -d "$dir/modules"
+ install -d "$pkgdir/etc/awall"
+ install -d "$pkgdir/var/run/awall"
+
+ install awall-cli "$bindir/awall"
+ install -m 644 awall/*.lua "$dir"
+ install -m 644 awall/modules/filter.lua "$dir/modules"
+
+ install -m 644 json/services.json "$poldir/mandatory"
+ install -m 644 sample-policy.json "$poldir/sample"
+}
+
+nat() {
+ depends=awall
+ cd "$_builddir"
+ local moddir=$subpkgdir/$_luadir/awall/modules
+ local poldir=$subpkgdir/usr/share/awall/mandatory
+ install -d "$moddir" "$poldir"
+ install -m 644 json/masquerade.json "$poldir"
+ install -m 644 awall/modules/nat.lua "$moddir"
+}
+
+md5sums="de2ae6f4b2825b523873ca82bd1f7c48 awall-0.1.1.tar.bz2"
diff --git a/main/ipset/APKBUILD b/main/ipset/APKBUILD
new file mode 100644
index 0000000000..e8b88ef82e
--- /dev/null
+++ b/main/ipset/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+pkgname=ipset
+pkgver=6.11
+pkgrel=1
+pkgdesc="Manage Linux IP sets"
+url=http://ipset.netfilter.org/
+arch=all
+license=GPL-2
+depends_dev=libmnl-dev
+makedepends="$depends_dev automake autoconf pkgconfig libtool linux-headers"
+subpackages="$pkgname-dev $pkgname-doc"
+source="${url}ipset-$pkgver.tar.bz2 ipset.initd"
+
+_builddir=$srcdir/ipset-$pkgver
+
+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"
+ ./configure --with-kmod=no --prefix=/usr && make
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR=$pkgdir || return
+ rm $pkgdir/usr/lib/*.la
+
+ mkdir -p "$pkgdir/etc/init.d" \
+ "$pkgdir/etc/ipset.d"
+ install -m 755 "$startdir/ipset.initd" "$pkgdir/etc/init.d/ipset"
+}
+
+md5sums="bfcc92e30a0fcf10ae6e7c4affa03c84 ipset-6.11.tar.bz2
+9f2e07dc13cafe456aa9d70fb631f175 ipset.initd"
diff --git a/main/ipset/ipset.initd b/main/ipset/ipset.initd
new file mode 100644
index 0000000000..6e3294c8e0
--- /dev/null
+++ b/main/ipset/ipset.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Init script for ipset
+# Copyright (C) 2012 Kaarle Ritvanen
+# Licensed under the terms of the GPL2
+
+depend() {
+ before iptables ip6tables
+}
+
+start() {
+ if ls /etc/ipset.d/* &> /dev/null; then
+ ebegin "Loading firewall IP sets"
+ for f in /etc/ipset.d/*; do
+ /usr/sbin/ipset restore < $f
+ done
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Flushing firewall IP sets"
+ /usr/sbin/ipset destroy
+ eend $?
+}
diff --git a/main/lua-signal/APKBUILD b/main/lua-signal/APKBUILD
new file mode 100644
index 0000000000..2c9f105764
--- /dev/null
+++ b/main/lua-signal/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+pkgname=lua-signal
+pkgver=1.200
+pkgrel=0
+pkgdesc="Signal library for Lua"
+url=http://www.batbytes.com/files/
+arch=all
+license=MIT
+depends=lua
+makedepends=lua-dev
+install=""
+source=${url}lua-signal-${pkgver}.tar.gz
+
+_builddir=$srcdir/lua-signal
+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() {
+ make -C "$_builddir"
+}
+
+package() {
+ local moddir="$pkgdir/usr/lib/lua/5.1"
+ mkdir -p "$moddir"
+ make -C "$_builddir" install SIGNAL_DESTINATION="$moddir"
+}
+
+md5sums="9bfcaa5f9c13488da5087a277b4eaa25 lua-signal-1.200.tar.gz"
diff --git a/main/lua-sleep/APKBUILD b/main/lua-sleep/APKBUILD
new file mode 100644
index 0000000000..22d135483a
--- /dev/null
+++ b/main/lua-sleep/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+pkgname=lua-sleep
+pkgver=0.1
+pkgrel=0
+pkgdesc="Sleep functions for Lua"
+url=http://projects.plentyfact.org/projects/lua-sleep
+arch=all
+license=public-domain
+depends=lua
+makedepends=lua-dev
+source=http://projects.plentyfact.org/attachments/download/21/lua-sleep_${pkgver}.tar.gz
+
+_builddir=$srcdir/lua-sleep_$pkgver
+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() {
+ make -C "$_builddir"
+}
+
+package() {
+ local dir=$pkgdir/usr/lib/lua/5.1
+ install -d "$dir"
+ install "$_builddir/lsleep.so" "$dir"
+}
+
+md5sums="aeb91a0abeb483868e27c4f5add59805 lua-sleep_0.1.tar.gz"