mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
Adding aur/knockd as a user requested the package
This commit is contained in:
parent
dd3671cf68
commit
29bbcacc31
5 changed files with 101 additions and 0 deletions
39
aur/knockd/PKGBUILD
Normal file
39
aur/knockd/PKGBUILD
Normal file
|
@ -0,0 +1,39 @@
|
|||
# $Id: PKGBUILD 20410 2008-12-03 09:44:51Z tom $
|
||||
# Maintainer: Mike Sampson <mike at sambodata dot com>
|
||||
# Contriburor: Steven <steven at stebalien dot com>
|
||||
# Contributor: Aaron Griffin <aaron@archlinux.org>
|
||||
# Contributor: judd <jvinet@zeroflux.org>
|
||||
|
||||
pkgname=knockd
|
||||
pkgver=0.5
|
||||
pkgrel=10
|
||||
pkgdesc="A simple port-knocking daemon"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.zeroflux.org/projects/knock"
|
||||
license=(GPL)
|
||||
depends=('libpcap>=1.0.0')
|
||||
backup=('etc/knockd.conf')
|
||||
source=(http://www.zeroflux.org/proj/knock/files/knock-$pkgver.tar.gz
|
||||
knockd knockd.logrotate knockd.service limits.h.patch)
|
||||
|
||||
md5sums=('ca09d61458974cff90a700aba6120891'
|
||||
'72302d899887996694586c3d479de245'
|
||||
'56a4113ec89ba2e96f79ab23c914d52a'
|
||||
'0329ca17267d03f06216d1fe00bd16a9'
|
||||
'e56dc7359f36c3b07da6710c404d671e')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/knock-$pkgver"
|
||||
patch -Np0 -i "$srcdir/limits.h.patch"
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/knock-$pkgver"
|
||||
make DESTDIR="$pkgdir" MANDIR=/usr/share/man install
|
||||
#install -D -m755 "$srcdir/knockd" "$pkgdir/etc/rc.d/knockd"
|
||||
install -D -m755 "$srcdir/knockd.service" "$pkgdir/usr/lib/systemd/system/knockd.service"
|
||||
install -D -m644 "$srcdir/knockd.logrotate" "$pkgdir/etc/logrotate.d/knockd"
|
||||
}
|
||||
|
37
aur/knockd/knockd
Normal file
37
aur/knockd/knockd
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
PID=`pidof -o %PPID /usr/sbin/knockd`
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting Port-Knocking Daemon"
|
||||
if [ -z "$PID" ]; then
|
||||
/usr/sbin/knockd -d
|
||||
fi
|
||||
if [ ! -z "$PID" -o $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon knockd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping Port-Knocking Daemon"
|
||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon knockd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
5
aur/knockd/knockd.logrotate
Normal file
5
aur/knockd/knockd.logrotate
Normal file
|
@ -0,0 +1,5 @@
|
|||
/var/log/knockd.log {
|
||||
missingok
|
||||
notifempty
|
||||
delaycompress
|
||||
}
|
10
aur/knockd/knockd.service
Normal file
10
aur/knockd/knockd.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Port-Knocking Daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/knockd -d
|
||||
Type=forking
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
10
aur/knockd/limits.h.patch
Normal file
10
aur/knockd/limits.h.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/knockd.c.orig 2008-12-03 07:21:14.643255773 +0000
|
||||
+++ src/knockd.c 2008-12-03 07:24:59.606701396 +0000
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <syslog.h>
|
||||
#include <pcap.h>
|
||||
#include <errno.h>
|
||||
+#include <limits.h>
|
||||
#include "list.h"
|
||||
|
||||
static char version[] = "0.5";
|
Loading…
Reference in a new issue