summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMicah Nordland2015-06-20 09:14:29 -0400
committerMicah Nordland2015-06-20 09:14:29 -0400
commitdf7889fee6d551d04165d557fc9f724b2657a7c6 (patch)
tree76745efff4d1bf5dcb5262bdd67314ad39e63989
downloadaur-net-responsibility.tar.gz
Initial commit for new AUR
-rw-r--r--.SRCINFO23
-rw-r--r--Makefile.patch26
-rw-r--r--PKGBUILD39
-rw-r--r--net-responsibility.install35
-rw-r--r--net-responsibility.service10
5 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a9b613dd0cc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = net-responsibility
+ pkgdesc = An Internet Accountablity software written in C++ for Linux, Windows, and Mac OS X
+ pkgver = 3.0.3
+ pkgrel = 6
+ url = http://www.netresponsibility.com
+ install = net-responsibility.install
+ arch = i686
+ arch = x86_64
+ license = gpl
+ makedepends = gcc
+ makedepends = make
+ makedepends = patch
+ depends = poco
+ depends = libpcap
+ source = https://bitbucket.org/netresponsibilityteam/net-responsibility/downloads/net-responsibility-3.0.3.tar.gz
+ source = Makefile.patch
+ source = net-responsibility.service
+ md5sums = d757a4429507de92ceac517dab04ca5c
+ md5sums = b7436f6e9dc2ac5993dc0dd17bf08f4a
+ md5sums = 46fc73d3c72361c6a1b7cad80c075f0d
+
+pkgname = net-responsibility
+
diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644
index 00000000000..1cc66ca2434
--- /dev/null
+++ b/Makefile.patch
@@ -0,0 +1,26 @@
+--- ./net-responsibility-3.0b1/Makefile.am 2011-12-21 17:56:00.000000000 -0500
++++ Makefile.am 2012-01-14 13:54:17.441976226 -0500
+@@ -72,23 +72,3 @@
+ find $(distdir) -type d -name .svn -print0 | xargs -0 rm -rf
+ find $(distdir) -type d -name .dep -print0 | xargs -0 rm -rf
+ find $(distdir) -type d -name obj -print0 | xargs -0 rm -rf
+-
+-install: install-am postinst
+-
+-uninstall: prerm uninstall-am postrm
+-
+-postinst:
+- $(top_srcdir)/scripts/postinst $(pkgdatadir) $(initdir)
+-
+-prerm:
+- $(top_srcdir)/scripts/prerm $(pkgdatadir) $(initdir)
+-
+-postrm:
+- rm -f $(piddir)/net-responsibility.pid
+- rm -f $(pkgdatadir)/blacklist.xml
+- rm -f $(pkgdatadir)/config.xml
+- rm -rf $(pkgdatadir)/reports
+- rm -f $(databasedir)/net-responsibility.db
+- rm -f $(initdir)/net-responsibility
+-
+-.PHONY: prerm postinst postrm
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..969c4313083
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+
+
+Maintainer="Micah Nordland <mpnordland@gmail.com>"
+pkgname=net-responsibility
+pkgver=3.0.3
+pkgrel=6
+pkgdesc="An Internet Accountablity software written in C++ for Linux, Windows, and Mac OS X"
+arch=('i686' 'x86_64')
+url="http://www.netresponsibility.com"
+license=('gpl')
+depends=('poco' 'libpcap')
+makedepends=('gcc' 'make' 'patch')
+options=()
+source=("https://bitbucket.org/netresponsibilityteam/net-responsibility/downloads/$pkgname-$pkgver.tar.gz" "Makefile.patch" "net-responsibility.service")
+md5sums=('d757a4429507de92ceac517dab04ca5c'
+ 'b7436f6e9dc2ac5993dc0dd17bf08f4a'
+ '46fc73d3c72361c6a1b7cad80c075f0d')
+
+install=$pkgname.install
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ patch ./Makefile.am < $srcdir/Makefile.patch
+ autoreconf -i
+ ./configure
+ make || return 1
+}
+
+
+package()
+{
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+ mkdir -p $pkgdir/etc/systemd/system/
+ cp $srcdir/net-responsibility.service $pkgdir/etc/systemd/system/
+
+}
+
+
diff --git a/net-responsibility.install b/net-responsibility.install
new file mode 100644
index 00000000000..5b56a2ae1b9
--- /dev/null
+++ b/net-responsibility.install
@@ -0,0 +1,35 @@
+
+## arg 1: the new package version
+post_install() {
+ if ! [ -f etc/config.xml ]; then
+ mkdir etc/reports
+ net-responsibilty --install
+ else
+ echo "Using existing configuration"
+ fi
+ systemctl enable net-responsibility.service
+ systemctl start net-responsibility
+}
+
+## arg 1: the old package version
+pre_remove() {
+ if [ -f etc/rc.d/net-responsiblity ]; then
+ etc/rc.d/net-responsibility stop
+ fi
+ if [ -f usr/share/net-responsibility/config.xml ]; then
+ net-responsibility --uninstall
+ fi
+}
+
+## arg 1: the old package version
+post_remove() {
+ rm -f /var/run/net-responsibility.pid
+ rm -f usr/share/net-responsibility/blacklist.xml
+ rm -f usr/share/net-responsibility/config.xml
+ rm -rf usr/share/net-responsibility/reports
+ rm -f /var/log/net-responsibility.db
+ rm -f etc/rc.d/net-responsibility
+ rm -f etc/conf.d/net-responsibility.conf
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/net-responsibility.service b/net-responsibility.service
new file mode 100644
index 00000000000..2db3634c03c
--- /dev/null
+++ b/net-responsibility.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Net Responsibilty Systemd support
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/net-responsibility --daemon
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target