mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
aur/netatalk to 3.0-3
This commit is contained in:
parent
34ea3f53eb
commit
e2314fdba4
10 changed files with 66 additions and 384 deletions
|
@ -5,73 +5,38 @@
|
|||
# Contributor: Farhan Yousaf <farhany at xaviya dot com>
|
||||
|
||||
pkgname=netatalk
|
||||
true && pkgname=('netatalk' 'netatalk-ddp')
|
||||
pkgver=2.2.3
|
||||
pkgrel=4
|
||||
pkgdesc='A kernel-level implementation of AppleTalk, AFP, and PAP services'
|
||||
pkgver=3.0
|
||||
pkgrel=3
|
||||
pkgdesc='A kernel-level implementation of AFP services'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://netatalk.sourceforge.net'
|
||||
license=('GPL')
|
||||
depends=('avahi>=0.6' 'libldap' 'libgcrypt>=1.2.3')
|
||||
depends=('avahi>=0.6' 'libldap' 'libgcrypt>=1.2.3' 'libevent')
|
||||
replaces=('netatalk-git' 'netatalk2')
|
||||
backup=('etc/netatalk/afpd.conf'
|
||||
'etc/netatalk/afp_ldap.conf'
|
||||
'etc/netatalk/netatalk.conf'
|
||||
'etc/netatalk/AppleVolumes.default'
|
||||
'etc/netatalk/AppleVolumes.system')
|
||||
backup=('etc/afp.conf')
|
||||
options=('!libtool')
|
||||
install=$pkgname.install
|
||||
changelog=$pkgname.changelog
|
||||
source=(a2boot.rc afpd.rc atalkd.rc cnid_metad.rc netatalk.rc papd.rc timelord.rc \
|
||||
http://hivelocity.dl.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2)
|
||||
md5sums=('26d1f602c5de87495b6c69021202d929'
|
||||
'dcbce48475b038c0966d81dc8d61fbee'
|
||||
'244fc26daba9c95e31f839c5c6f27c89'
|
||||
'c227dc51d94f3e541daf478bd3d0be03'
|
||||
'56cc073c625abdc26553ecf1998d40cb'
|
||||
'e32f1df98f95a2a977d9a513deaf5aae'
|
||||
'425a3dead19a20f4433fc2bffedb32bc'
|
||||
'0b5a0645836183b0e548ccfbd5c022f8')
|
||||
_options='--disable-ddp --disable-srvloc --disable-timelord --disable-cups --disable-a2boot'
|
||||
_depddp=('openslp' 'libcups' 'libgcrypt>=1.2.3')
|
||||
source=(netatalk.rc http://iweb.dl.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2)
|
||||
md5sums=('5e92015b0d9ac77af4b598cca6cb435c'
|
||||
'62eb034011bb60b0bfd95072af3693dc')
|
||||
|
||||
build() {
|
||||
if [ "$pkgname" = "netatalk-ddp" ];then resolve_deps ${_depddp[@]}
|
||||
_options=`echo $_options | sed s/disable/enable/g`;fi
|
||||
cd $pkgbase-$pkgver
|
||||
cd $pkgname-$pkgver
|
||||
msg2 'Fixing...'
|
||||
sed -i 's/install-exec-hook/install-data-hook/' etc/uams/Makefile.am
|
||||
autoreconf
|
||||
sed -i 's/x"linux/x"generic/' macros/netatalk.m4
|
||||
autoreconf &>/dev/null
|
||||
echo -e "all:\ninstall:">libevent/Makefile
|
||||
msg2 'Configuring...'
|
||||
CFLAGS="-Wno-unused-result" ./configure --prefix=/usr --localstatedir=/var --libexecdir='${libdir}' \
|
||||
--with-cracklib --with-cnid-cdb-backend --enable-fhs $_options
|
||||
CFLAGS="-Wno-unused-result" LIBS=-levent ./configure --prefix=/usr --localstatedir=/etc --sysconfdir=/etc \
|
||||
--disable-bundled-libevent --with-cracklib --with-cnid-cdb-backend --enable-pgp-uam
|
||||
msg2 'Making...'
|
||||
make >/dev/null
|
||||
echo $pkgname >made
|
||||
}
|
||||
package() {
|
||||
cd $pkgbase-$pkgver
|
||||
if [ -f made ];then rm made;else rm -rf "$pkgdir";continue;fi
|
||||
cd $pkgname-$pkgver
|
||||
msg2 'Building...'
|
||||
make DESTDIR="$pkgdir" install >/dev/null
|
||||
msg2 'Copying initscripts...'
|
||||
install -D -m755 "$srcdir"/netatalk.rc "$pkgdir"/etc/rc.d/netatalk
|
||||
install -m755 "$srcdir"/cnid_metad.rc "$pkgdir"/etc/rc.d/cnid_metad
|
||||
install -m755 "$srcdir"/afpd.rc "$pkgdir"/etc/rc.d/afpd
|
||||
rm "$pkgdir"/usr/include/netatalk/at.h
|
||||
}
|
||||
package_netatalk() {
|
||||
package
|
||||
msg2 'Removing extraneous files...'
|
||||
rm "$pkgdir"/usr/share/man/man8/timelord.8
|
||||
}
|
||||
package_netatalk-ddp() {
|
||||
package
|
||||
install -m755 "$srcdir"/a2boot.rc "$pkgdir"/etc/rc.d/a2boot
|
||||
install -m755 "$srcdir"/atalkd.rc "$pkgdir"/etc/rc.d/atalkd
|
||||
install -m755 "$srcdir"/papd.rc "$pkgdir"/etc/rc.d/papd
|
||||
install -m755 "$srcdir"/timelord.rc "$pkgdir"/etc/rc.d/timelord
|
||||
optdepends=('cups: required for PAP support')
|
||||
backup+=('etc/netatalk/atalkd.conf' 'etc/netatalk/papd.conf' 'etc/pam.d/netatalk')
|
||||
conflicts=('netatalk');provides=(${conflicts[@]});depends=(${_depddp[@]})
|
||||
}
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /etc/rc.d/netatalk common
|
||||
|
||||
NAME="Apple II Boot Daemon"
|
||||
ARGS=
|
||||
DEPENDS=atalkd
|
||||
REQUIRED=
|
||||
DAEMON=a2boot
|
||||
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
|
||||
PID=`get_pid $DAEMON`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting $NAME"
|
||||
`get_pid_rd $DEPENDS` && [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rd $DEPENDS`;then echo "Error: \"$DAEMON\" refusing to start, dependency \"$DEPENDS\" not met" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping $NAME"
|
||||
`get_pid_rr $REQUIRED` && [ -n "$PID" ] && wait_pid $PID
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rr $REQUIRED`;then echo "Error: Dependency \"$REQUIRED\" requires \"$DAEMON\", stop it first" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /etc/rc.d/netatalk common
|
||||
|
||||
NAME="Apple Filing Protocol Daemon"
|
||||
ARGS=
|
||||
DEPENDS=cnid_metad
|
||||
REQUIRED=
|
||||
DAEMON=afpd
|
||||
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
|
||||
PID=`get_pid $DAEMON`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting $NAME"
|
||||
`get_pid_rd $DEPENDS` && [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rd $DEPENDS`;then echo "Error: \"$DAEMON\" refusing to start, dependency \"$DEPENDS\" not met" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping $NAME"
|
||||
`get_pid_rr $REQUIRED` && [ -n "$PID" ] && wait_pid $PID
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rr $REQUIRED`;then echo "Error: Dependency \"$REQUIRED\" requires \"$DAEMON\", stop it first" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /etc/rc.d/netatalk common
|
||||
|
||||
NAME="AppleTalk Protocol Daemon"
|
||||
ARGS=
|
||||
DEPENDS=
|
||||
REQUIRED="a2boot papd timelord"
|
||||
DAEMON=atalkd
|
||||
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
|
||||
PID=`get_pid $DAEMON`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting $NAME"
|
||||
`get_pid_rd $DEPENDS` && [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rd $DEPENDS`;then echo "Error: \"$DAEMON\" refusing to start, dependency \"$DEPENDS\" not met" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping $NAME"
|
||||
`get_pid_rr $REQUIRED` && [ -n "$PID" ] && wait_pid $PID
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rr $REQUIRED`;then echo "Error: Dependency \"$REQUIRED\" requires \"$DAEMON\", stop it first" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /etc/rc.d/netatalk common
|
||||
|
||||
NAME="CNID Meta-Daemon"
|
||||
ARGS=
|
||||
DEPENDS=
|
||||
REQUIRED=afpd
|
||||
DAEMON=cnid_metad
|
||||
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
|
||||
PID=`get_pid $DAEMON`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting $NAME"
|
||||
`get_pid_rd $DEPENDS` && [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rd $DEPENDS`;then echo "Error: \"$DAEMON\" refusing to start, dependency \"$DEPENDS\" not met" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping $NAME"
|
||||
`get_pid_rr $REQUIRED` && [ -n "$PID" ] && wait_pid $PID
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rr $REQUIRED`;then echo "Error: Dependency \"$REQUIRED\" requires \"$DAEMON\", stop it first" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
|
@ -1,3 +1,21 @@
|
|||
2012-07-14 SJ_UnderWater
|
||||
|
||||
* 3.0-3 :
|
||||
moved localstate dir
|
||||
to /etc for historical
|
||||
reasons
|
||||
|
||||
2012-07-12 SJ_UnderWater
|
||||
|
||||
* 3.0-2 :
|
||||
disable bundled libevent
|
||||
|
||||
2012-07-11 SJ_UnderWater
|
||||
|
||||
* 3.0-1 :
|
||||
updated to new release
|
||||
DDP moved to new pkg
|
||||
|
||||
2012-06-12 SJ_UnderWater
|
||||
|
||||
* 2.2.3-4 :
|
||||
|
|
|
@ -13,6 +13,10 @@ post_upgrade() {
|
|||
echo '>>> Detected old netatalk service files in';
|
||||
echo '>>> /etc/avahi/services, please delete these';
|
||||
echo '>>> before restarting!';fi
|
||||
if [ -f /opt/netatalk/afp_signature.conf ] ||
|
||||
[ -f /opt/netatalk/afp_voluuid.conf ]; then
|
||||
echo '>>> Found *.conf in /opt/netatalk, please';
|
||||
echo '>>> migrate these to /etc/netatalk before restarting';fi
|
||||
}
|
||||
pre_remove() {
|
||||
rc.d stop netatalk
|
||||
|
|
|
@ -3,65 +3,42 @@
|
|||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
NAME="NetATalk Meta-Daemon"
|
||||
NAME="Appletalk Services Daemon"
|
||||
ARGS=
|
||||
DAEMON=netatalk
|
||||
RUNNING=()
|
||||
STOPPED=()
|
||||
|
||||
daemons() {
|
||||
for i in atalkd papd timelord a2boot cnid_metad afpd; do
|
||||
if [ `type -p $i` ]; then if [ "`get_pid $i`" ]; then RUNNING+=($i); else STOPPED+=($i); fi; fi
|
||||
done
|
||||
}
|
||||
get_pid_r() {
|
||||
local pid=0;for i in $@
|
||||
do get_pid $i >/dev/null || continue;: $[ pid++ ];done
|
||||
return $pid
|
||||
}
|
||||
get_pid_rd(){
|
||||
get_pid_r $*
|
||||
if [ "$?" -ne "$#" ];then return 1;fi
|
||||
}
|
||||
get_pid_rr(){
|
||||
get_pid_r $*
|
||||
if [ "$?" -ne "0" ];then return 1;fi
|
||||
}
|
||||
wait_pid(){
|
||||
kill $1 &>/dev/null
|
||||
while kill -0 $1 &>/dev/null;do sleep 0.5;done
|
||||
}
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
|
||||
case "$1" in
|
||||
start|stop)
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
daemons
|
||||
;;
|
||||
esac
|
||||
PID=`get_pid $DAEMON`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
STARTING=''; rc.d start ${STOPPED[@]}
|
||||
if [ $? = 0 ]; then
|
||||
add_daemon $DAEMON
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stat_busy "Starting $NAME"
|
||||
[ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
add_daemon $DAEMON
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
for ((i=${#RUNNING[@]}-1; i>=0; i--));do rc.d stop ${RUNNING[$i]}; done
|
||||
if [ $? = 0 ]; then
|
||||
rm_daemon $DAEMON
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stat_busy "Stopping $NAME"
|
||||
[ -n "$PID" ] && kill $PID &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
rm_daemon $DAEMON
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
common)
|
||||
;;
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /etc/rc.d/netatalk common
|
||||
|
||||
NAME="AppleTalk Printer Daemon"
|
||||
ARGS=
|
||||
DEPENDS=atalkd
|
||||
REQUIRED=
|
||||
DAEMON=papd
|
||||
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
|
||||
PID=`get_pid $DAEMON`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting $NAME"
|
||||
`get_pid_rd $DEPENDS` && [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rd $DEPENDS`;then echo "Error: \"$DAEMON\" refusing to start, dependency \"$DEPENDS\" not met" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping $NAME"
|
||||
`get_pid_rr $REQUIRED` && [ -n "$PID" ] && wait_pid $PID
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rr $REQUIRED`;then echo "Error: Dependency \"$REQUIRED\" requires \"$DAEMON\", stop it first" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /etc/rc.d/netatalk common
|
||||
|
||||
NAME="AppleTalk Time Daemon"
|
||||
ARGS=
|
||||
DEPENDS=atalkd
|
||||
REQUIRED=
|
||||
DAEMON=timelord
|
||||
|
||||
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
|
||||
|
||||
PID=`get_pid $DAEMON`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting $NAME"
|
||||
`get_pid_rd $DEPENDS` && [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rd $DEPENDS`;then echo "Error: \"$DAEMON\" refusing to start, dependency \"$DEPENDS\" not met" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping $NAME"
|
||||
`get_pid_rr $REQUIRED` && [ -n "$PID" ] && wait_pid $PID
|
||||
if [ $? = 0 ]; then
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
if ! `get_pid_rr $REQUIRED`;then echo "Error: Dependency \"$REQUIRED\" requires \"$DAEMON\", stop it first" >&2;fi
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
Loading…
Reference in a new issue