# Maintainer: SJ_UnderWater # Based on netatalk package : # Maintainer: Dominik Dingel # Contributor: William Udovich # Contributor: Farhan Yousaf plugrel=1 pkgname=netatalk true && pkgname=('netatalk' 'netatalk-ddp') pkgver=2.2.2 pkgrel=6 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' 'bd42b686ec7209d9ab47bd8e2e2431c4') _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 msg2 'Removing extraneous files...' rm -r "$pkgdir"/usr/include "$pkgdir"/usr/share/aclocal } package_netatalk() { package rm "$pkgdir"/usr/share/man/man8/timelord.8 rmdir "$pkgdir"/usr/share/man/man3 "$pkgdir"/usr/share/man/man4 } 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[@]}) }