mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
added community/darkstat
This commit is contained in:
parent
058e716f01
commit
6c187d55b1
5 changed files with 68 additions and 0 deletions
46
community/darkstat/PKGBUILD
Normal file
46
community/darkstat/PKGBUILD
Normal file
|
@ -0,0 +1,46 @@
|
|||
# $Id$
|
||||
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - remove -flto from CFLAGS in configure
|
||||
|
||||
pkgname=darkstat
|
||||
pkgver=3.0.719
|
||||
pkgrel=2
|
||||
pkgdesc='Network statistics gatherer (packet sniffer)'
|
||||
url="https://unix4lyfe.org/${pkgname}/"
|
||||
license=("GPL")
|
||||
arch=(x86_64)
|
||||
depends=('libpcap' 'zlib' 'gcc-libs')
|
||||
backup=('etc/conf.d/darkstat.conf')
|
||||
source=("https://unix4lyfe.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
|
||||
'darkstat-sysusers.conf'
|
||||
'darkstat-tmpfiles.conf'
|
||||
'darkstat.service'
|
||||
'darkstat.conf')
|
||||
sha256sums=('aeaf909585f7f43dc032a75328fdb62114e58405b06a92a13c0d3653236dedd7'
|
||||
'81f7cac4bb3bdd10422938b33050dcb0245713082af1dd3a58fd63f51df29dbe'
|
||||
'ccc508237a3aa5b1b2cff271877f6a92a0a189ff578ed2128731f7d8379a9fca'
|
||||
'81a29ba0fca9430f1a220fece1e88e8e80657fc1970b9327b6680e5f212e51df'
|
||||
'7ee7e3a04672bec76e10a65d3b2bc7cf3c41992652a7252d2bbefa79f7679923')
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/darkstat-$pkgver
|
||||
|
||||
sed -i 's/-flto//' configure
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sbindir=/usr/bin
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir"/darkstat-$pkgver
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
install -D -m0644 "$srcdir"/darkstat-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/darkstat.conf
|
||||
install -D -m0644 "$srcdir"/darkstat-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/darkstat.conf
|
||||
install -D -m0644 "$srcdir"/darkstat.service "$pkgdir"/usr/lib/systemd/system/darkstat.service
|
||||
install -D -m0644 "$srcdir"/darkstat.conf "$pkgdir"/etc/conf.d/darkstat.conf
|
||||
}
|
1
community/darkstat/darkstat-sysusers.conf
Normal file
1
community/darkstat/darkstat-sysusers.conf
Normal file
|
@ -0,0 +1 @@
|
|||
u darkstat - "darkstat user" /var/darkstat
|
2
community/darkstat/darkstat-tmpfiles.conf
Normal file
2
community/darkstat/darkstat-tmpfiles.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
d /var/darkstat 0755 darkstat darkstat -
|
||||
f /var/darkstat/darkstat.dat 0644 darkstat darkstat -
|
2
community/darkstat/darkstat.conf
Normal file
2
community/darkstat/darkstat.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
DARKSTAT_IFACE="eth0"
|
||||
DARKSTAT_ARGS=""
|
17
community/darkstat/darkstat.service
Normal file
17
community/darkstat/darkstat.service
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=Network statistics gatherer (packet sniffer)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/conf.d/darkstat.conf
|
||||
PIDFile=/run/darkstat.pid
|
||||
ExecStart=/usr/sbin/darkstat --user "darkstat" --chroot "/var/darkstat" \
|
||||
--import "darkstat.dat" --export "darkstat.dat" \
|
||||
--pidfile /run/darkstat.pid \
|
||||
-b 0.0.0.0 \
|
||||
-i "$DARKSTAT_IFACE" $DARKSTAT_ARGS
|
||||
ExecStopPost=/bin/rm -f /run/darkstat.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue