Added aur/netatalk

This commit is contained in:
Mike Staszel 2011-01-26 20:03:22 -06:00
parent 142ee96ece
commit 376c0fb4a7
7 changed files with 226 additions and 0 deletions

52
aur/netatalk/PKGBUILD Normal file
View file

@ -0,0 +1,52 @@
# Maintainer: Dominik Dingel <mail at wodar dot de>
# Contributor: William Udovich <nerdzrule7 at earthlink dot net>
# Contributor: Farhan Yousaf <farhany at xaviya dot com>
# from AUR, but with a change to add "--with-cnid-cdb-backend" to ./configure
pkgname=netatalk
pkgver=2.1.4
pkgrel=0
pkgdesc="A kernel level implementation of the AppleTalk Protocol Suite"
arch=('i686' 'x86_64')
url="http://netatalk.sourceforge.net"
options=('!libtool')
license=("GPL")
backup=('etc/netatalk/afpd.conf'
'etc/netatalk/netatalk.conf'
'etc/netatalk/atalkd.conf'
'etc/netatalk/papd.conf'
'etc/netatalk/AppleVolumes.default'
'etc/netatalk/AppleVolumes.system'
'etc/avahi/services/afpd.service')
depends=('libcups' 'tcp_wrappers' 'avahi' 'openssl' 'pam' 'coreutils>=7.1-2' 'db')
makedepends=('make' 'patch' 'gcc')
source=(http://voxel.dl.sourceforge.net/project/netatalk/netatalk/$pkgver/netatalk-$pkgver.tar.bz2 \
afpd atalkd papd cnid afpd.service)
install=netatalk.install
md5sums=('b3251290f3f1bf10acdf407dea585bae'
'ee18029d197da244dcc993553496e0c2'
'2d05de4a16faf7d4af21b5f14e33fa82'
'b16a687c96dd1ca7ffefd7c995356c0d'
'84d1961726aaa8df08d63a0925358b1a'
'9b6b2fee54fe052bba0c69f00d335bdb')
build() {
cd $startdir/src/netatalk-$pkgver
./configure --prefix=/usr --with-ssl-dir=/usr --localstatedir=/var --enable-fhs --enable-zeroconf=/usr --disable-srvloc --without-xfs --with-cnid-cdb-backend
make || return 1
make DESTDIR=$startdir/pkg install
mv $startdir/pkg/usr/include/netatalk{,2}
install -d $startdir/pkg/etc/rc.d
install -m755 ../{afpd,atalkd,papd,cnid} $startdir/pkg/etc/rc.d
install -d $startdir/pkg/etc/avahi/services
install -m755 ../afpd.service $startdir/pkg/etc/avahi/services
# rm $startdir/pkg/usr/bin/timeout
rm -f $startdir/pkg/usr/share/man/man1/timeout.1{,.gz}
}

38
aur/netatalk/afpd Normal file
View file

@ -0,0 +1,38 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=$(pidof -o %PPID /usr/sbin/afpd)
case $1 in
start)
stat_busy "Starting afpd Daemon"
[ -z $PID ] && /usr/sbin/afpd
if [ $? -gt 0 ]; then
stat_fail
else
PID=$(pidof -o %PPID /usr/sbin/afpd)
echo "$PID" > /var/run/afpd.pid
add_daemon afpd
stat_done
fi
;;
stop)
stat_busy "Stopping afpd Daemon"
[ ! -z $PID ] && kill "$PID" &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon afpd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

14
aur/netatalk/afpd.service Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>

42
aur/netatalk/atalkd Normal file
View file

@ -0,0 +1,42 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
myhostname=`hostname|sed 's/\..*$//'`
PID=`pidof -o %PPID /usr/sbin/atalkd`
case "$1" in
start)
stat_busy "Starting atalkd Daemon"
[ -z "$PID" ] && /usr/sbin/atalkd
if [ $? -gt 0 ]; then
stat_fail
else
echo $PID > /var/run/atalkd.pid
# Setting AppleTalk info with nbprgstr
add_daemon atalkd
stat_done
fi
;;
stop)
stat_busy "Stopping atalkd Daemon"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm /var/run/atalkd.pid
rm_daemon atalkd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

39
aur/netatalk/cnid Normal file
View file

@ -0,0 +1,39 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=$(pidof -o %PPID /usr/sbin/cnid_metad)
case "$1" in
start)
stat_busy "Starting cnid Daemon"
[ -z $PID ] && /usr/sbin/cnid_metad
if [ $? -gt 0 ]; then
stat_fail
else
PID=$(pidof -o %PPID /usr/sbin/cnid_metad)
echo "$PID" > /var/run/cnid.pid
add_daemon cnid
stat_done
fi
;;
stop)
stat_busy "Stopping cnid Daemon"
[ ! -z $PID ] && kill "$PID" &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon cnid
rm /var/run/cnid.pid
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

View file

@ -0,0 +1,3 @@
To configure shares, please edit /etc/netatalk/AppleVolumes.default.
To run as a daemon, add afpd to MODULES line in /etc/rc.conf.
Make sure "afpd: ALL" is in your /etc/hosts.allow file.

38
aur/netatalk/papd Normal file
View file

@ -0,0 +1,38 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/sbin/papd`
case "$1" in
start)
stat_busy "Starting papd Daemon"
[ -z "$PID" ] && /usr/sbin/papd
if [ $? -gt 0 ]; then
stat_fail
else
echo $PID > /var/run/papd.pid
add_daemon papd
stat_done
fi
;;
stop)
stat_busy "Stopping papd Daemon"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm /var/run/papd.pid
rm_daemon papd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0