#!/bin/sh # Set initial variables: CWD=`pwd` TMP=/tmp PKG=$TMP/package-netatalk VERSION=2.0.1 ARCH=alpha BUILD=1 mkdir -p $PKG ( cd $PKG explodepkg $CWD/_netatalk.tar.gz ) ( cd $TMP rm -rf netatalk-$VERSION tar xjf $CWD/netatalk-$VERSION.tar.bz2 cd netatalk-$VERSION find . -type d -exec chmod 755 {} \; zcat $CWD/netatalk.afpdconf.diff.gz | patch -p1 chown -R root.root . ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --with-mangling \ --with-shadow make make install DESTDIR=$PKG # This is normally installed setuid root, but I'm not 100% sure I trust it yet. # I see it uses strcpy() in a few places... chmod 755 $PKG/usr/bin/afppasswd ( cd $PKG/etc/netatalk for file in AppleVolumes.default AppleVolumes.system afpd.conf afppasswd atalkd.conf netatalk.conf papd.conf ; do mv $file ${file}.new done ) ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) chown -R root.bin $PKG/usr/bin $PKG/usr/sbin gzip -9 $PKG/usr/man/man?/* mkdir -p $PKG/usr/doc/netatalk-$VERSION cp -a CONTRIBUTORS COPYING COPYRIGHT NEWS README TODO VERSION doc $PKG/usr/doc/netatalk-$VERSION rm -f $PKG/usr/doc/netatalk-$VERSION/doc/Makefile* # what's this doing here? rm -rf $PKG/usr/sbin/etc2ps.sh mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/netatalk-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/netatalk.build.log