summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2015-06-08 18:03:53 -0400
committergraysky2015-06-08 18:03:53 -0400
commit3ede31a07e18eb6cff28c71d0e395d5f08aae448 (patch)
tree95df7a8f62a005dcdec8212328825117d3aaba8b
downloadaur-3ede31a07e18eb6cff28c71d0e395d5f08aae448.tar.gz
Initial import
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD58
-rw-r--r--ufw.service16
3 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ae1156f8003
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = ufw-bzr
+ pkgdesc = Uncomplicated and easy to use CLI tool for managing a netfilter firewall. Development branch.
+ pkgver = 865
+ pkgrel = 1
+ url = https://code.launchpad.net/~jdstrand/ufw/trunk
+ arch = any
+ license = GPL3
+ makedepends = bzr
+ depends = iptables
+ depends = python2
+ provides = ufw
+ conflicts = ufw
+ backup = etc/ufw/before.rules
+ backup = etc/ufw/before6.rules
+ backup = etc/ufw/after.rules
+ backup = etc/ufw/after6.rules
+ backup = etc/ufw/ufw.conf
+ backup = etc/ufw/user.rules
+ backup = etc/ufw/sysctl.conf
+ backup = etc/default/ufw
+ backup = usr/lib/ufw/user.rules
+ backup = usr/lib/ufw/user6.rules
+ source = ufw::bzr+http://bazaar.launchpad.net/~jdstrand/ufw/trunk/
+ source = ufw.service
+ sha256sums = SKIP
+ sha256sums = fdface6f4690e4748fbbd5661c02e1967a8750fdb23581d35516174017a3fe39
+
+pkgname = ufw-bzr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ae6fba8d375
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: graysky <graysky AT archlinux DOT us>
+# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
+# Contributor: Sorin Ionescu <sorin.ionescu@gmail.com>
+
+pkgname=ufw-bzr
+_pkgname=ufw
+pkgver=865
+pkgrel=1
+pkgdesc="Uncomplicated and easy to use CLI tool for managing a netfilter firewall. Development branch."
+arch=('any')
+url="https://code.launchpad.net/~jdstrand/ufw/trunk"
+license=('GPL3')
+depends=('iptables' 'python2')
+makedepends=('bzr')
+provides=('ufw')
+conflicts=('ufw')
+backup=('etc/ufw/before.rules'
+'etc/ufw/before6.rules'
+'etc/ufw/after.rules'
+'etc/ufw/after6.rules'
+'etc/ufw/ufw.conf'
+'etc/ufw/user.rules'
+'etc/ufw/sysctl.conf'
+'etc/default/ufw'
+'usr/lib/ufw/user.rules'
+'usr/lib/ufw/user6.rules')
+source=("$_pkgname::bzr+http://bazaar.launchpad.net/~jdstrand/$_pkgname/trunk/"
+"$_pkgname.service")
+sha256sums=('SKIP'
+ 'fdface6f4690e4748fbbd5661c02e1967a8750fdb23581d35516174017a3fe39')
+
+pkgver() {
+ cd "$_pkgname"
+ bzr revno
+}
+
+prepare() {
+ cd "$_pkgname"
+
+ # FS#28769 - move from /lib to /usr/lib
+ sed -e 's|/lib|/usr/lib|' -i setup.py
+}
+
+package() {
+ cd "$_pkgname"
+ python2 setup.py install --root=$pkgdir
+
+ # FS#35458 - correct iptables location
+ sed -e 's|sbin|bin|g' -i $pkgdir/usr/lib/python2.7/site-packages/ufw/*
+
+ install -Dm644 $srcdir/$_pkgname.service $pkgdir/usr/lib/systemd/system/$_pkgname.service
+ chmod 644 $pkgdir/etc/ufw/*.rules $pkgdir/usr/lib/ufw/*.rules
+
+ install -Dm755 $pkgdir/usr/sbin/$_pkgname $pkgdir/usr/bin/$_pkgname
+ rm -rf $pkgdir/usr/sbin
+}
diff --git a/ufw.service b/ufw.service
new file mode 100644
index 00000000000..09865ac8986
--- /dev/null
+++ b/ufw.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=CLI Netfilter Manager
+DefaultDependencies=no
+After=systemd-sysctl.service
+Before=sysinit.target
+ConditionPathExists=|/etc/ufw/ufw.conf
+ConditionDirectoryNotEmpty=|/usr/lib/ufw
+
+[Service]
+Type=oneshot
+ExecStart=/usr/lib/ufw/ufw-init start
+ExecStop=/usr/lib/ufw/ufw-init stop
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target