summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartłomiej Piotrowski2018-01-07 17:52:20 +0100
committerBartłomiej Piotrowski2018-01-07 17:52:20 +0100
commit11138c5166be84221ca29968ad23c4639e47a3ee (patch)
tree0e96a037d000797dd0571c4c01a523baf2ea81e4
downloadaur-11138c5166be84221ca29968ad23c4639e47a3ee.tar.gz
Import from official repositories
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD48
-rw-r--r--build.patch52
3 files changed, 116 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6f0668cee5ed
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = netcount
+ pkgdesc = network statistic and monitor tools
+ pkgver = 0.8i
+ pkgrel = 7
+ url = http://www.hczim.de/software/
+ arch = any
+ license = GPL
+ makedepends = ppp
+ depends = python2
+ source = http://www.hczim.de/software/netcount-0.8i.tar.gz
+ source = build.patch
+ md5sums = 537d941b6725f17d46b228967b8f6d23
+ md5sums = 90dc22e9fce2b1a2fbc6899d23debbde
+
+pkgname = netcount
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..375df2cecdaf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 194152 2016-10-31 13:48:24Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=netcount
+pkgver=0.8i
+pkgrel=7
+pkgdesc="network statistic and monitor tools"
+arch=('any')
+url="http://www.hczim.de/software/"
+license=('GPL')
+depends=('python2')
+makedepends=('ppp')
+source=(http://www.hczim.de/software/$pkgname-$pkgver.tar.gz
+ build.patch)
+md5sums=('537d941b6725f17d46b228967b8f6d23'
+ '90dc22e9fce2b1a2fbc6899d23debbde')
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ patch -p1 <../build.patch
+ echo -e "#!/bin/sh\necho gentoo">distro-detect.sh
+ sed -i 's|sbin|bin|g' Makefile *.in
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make files
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ mkdir -p "$pkgdir"/usr/bin
+ mkdir -p "$pkgdir"/usr/share/man/man1
+ mkdir -p "$pkgdir"/etc/logrotate.d
+
+ make \
+ INSTALLDIR="$pkgdir"/usr \
+ MANDIR="$pkgdir"/usr/share/man \
+ LOGROTATEDIR="$pkgdir"/etc/logrotate.d \
+ PPPDIR="$srcdir" \
+ CRONDIR="$srcdir" \
+ RCRONDIR="$srcdir" \
+ INIT_GENTOO="$srcdir" \
+ install
+ mv "$pkgdir"/usr/bin/nstat "$pkgdir"/usr/bin/nstat-$pkgname
+}
diff --git a/build.patch b/build.patch
new file mode 100644
index 000000000000..8b0af020fe68
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,52 @@
+diff -ur netcount-0.8i/Makefile netcount-0.8i.my/Makefile
+--- netcount-0.8i/Makefile 2004-12-29 13:26:11.000000000 +0000
++++ netcount-0.8i.my/Makefile 2011-02-22 17:51:57.000000000 +0000
+@@ -280,23 +280,23 @@
+ ####### GENTOO
+ else
+ ifeq ($(DIST), gentoo)
+-$(IP_UP_GENTOO): netcount-ip-up-local
+- ./add-script.sh $< $@ netcount
+- chmod +x $@
++#$(IP_UP_GENTOO): netcount-ip-up-local
++# ./add-script.sh $< $@ netcount
++# chmod +x $@
+
+-$(IP_DOWN_GENTOO): netcount-ip-down-local
+- ./add-script.sh $< $@ netcount
+- chmod +x $@
++#$(IP_DOWN_GENTOO): netcount-ip-down-local
++# ./add-script.sh $< $@ netcount
++# chmod +x $@
+
+-$(INIT_GENTOO): netcount-init
+- ./add-script.sh $< $@ netcount
+- chmod +x $@
++#$(INIT_GENTOO): netcount-init
++# ./add-script.sh $< $@ netcount
++# chmod +x $@
+
+ dist-objects = $(RCRONDIR)/netcount $(IP_UP_GENTOO) $(IP_DOWN_GENTOO) \
+ $(INIT_GENTOO)
+
+ uninstall:
+- rm -f $(RCRONDIR)/netcount $(common-objects)
++ rm -f $(RCRONDIR)/netcount $(common-objects)
+ for i in $(IP_UP_GENTOO) $(IP_DOWN_GENTOO) $(INIT_GENTOO); do\
+ echo cleaning up $i;\
+ ./add-script.sh /dev/null $i netcount
+diff -ur netcount-0.8i/pytkcheck.sh netcount-0.8i.my/pytkcheck.sh
+--- netcount-0.8i/pytkcheck.sh 2004-12-29 13:26:12.000000000 +0000
++++ netcount-0.8i.my/pytkcheck.sh 2011-02-22 17:50:57.000000000 +0000
+@@ -29,10 +29,7 @@
+
+ ## Things you may want to configure:
+ # These names are tried, in that order:
+-PYTHONS="python \
+- python2.4 python-2.4 python24 \
+- python2.3 python-2.3 python23 \
+- python2.2 python-2.2 python22 python2"
++PYTHONS="python2"
+
+ usage() {
+ if [ $# -ne 1 ]; then