PKGBUILDs/aur/netatalk/PKGBUILD
2012-05-30 16:50:39 -04:00

73 lines
2.7 KiB
Bash

# Maintainer: SJ_UnderWater
# Based on netatalk package :
# Maintainer: Dominik Dingel <mail at wodar dot de>
# Contributor: William Udovich <nerdzrule7 at earthlink dot net>
# Contributor: Farhan Yousaf <farhany at xaviya dot com>
pkgname=netatalk
true && pkgname=('netatalk' 'netatalk-ddp')
pkgver=2.2.3
pkgrel=1
pkgdesc='A kernel-level implementation of AppleTalk, AFP, and PAP services'
arch=('i686' 'x86_64')
url='http://netatalk.sourceforge.net'
license=('GPL')
depends=('avahi>=0.6' 'libldap' 'libgcrypt>=1.2.3')
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')
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=('792435b982af01a206b43f82115d4820'
'812f2a6236c495682e768704007b9b7d'
'8348b1bd91ff4a9c2d5e2bbb44cbc970'
'bc8c1f7e2af6e02982dc375fbf02f4d6'
'4226d26b886d6cff422c4a5bd5b88d55'
'288ee4394109ad8e163518a3b335064b'
'8a60ce9165f1346dab37045ce440c4cd'
'0b5a0645836183b0e548ccfbd5c022f8')
_options='--disable-ddp --disable-srvloc --disable-timelord --disable-cups --disable-a2boot'
_depddp=('openslp' 'libcups' 'libgcrypt>=1.2.3')
build() {
if [ "$pkgname" = "netatalk-ddp" ];then resolve_deps ${_depddp[@]}
_options=`echo $_options | sed s/disable/enable/g`;fi
cd $pkgbase-$pkgver
msg2 'Configuring...'
CFLAGS="-Wno-unused-result" ./configure --prefix=/usr --localstatedir=/var --libexecdir='${libdir}' \
--with-cracklib --with-cnid-cdb-backend --enable-fhs $_options
msg2 'Making...'
make >/dev/null
echo $pkgname >made
}
package() {
cd $pkgbase-$pkgver
if [ -f made ];then rm made;else rm -rf "$pkgdir";continue;fi
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
}
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[@]})
}