3 # Execute this script from the main netatalk source directory.
7 debiandir=distrib/debian
9 if test ! -d libatalk; then
10 echo "Not in netatalk directory"
15 if test -e "$debiandir/VERSION"; then
16 DEBVERSION=`cat "$debiandir/VERSION"`
20 DISTDIR="netatalk-$VERSION"
21 DISTTGZ="netatalk_$DEBVERSION.orig.tar.gz"
23 if test ! -f INSTALL; then
24 if test -e INSTALL; then
25 echo "INSTALL is in the way, please move it away"
31 if test ! -x configure; then
35 if test ! -e Makefile; then
36 if test -x config.status; then
45 mv "netatalk-$VERSION.tar.gz" "$DISTTGZ"
46 rm -rf "$DISTDIR" || true
49 for FILE in `find $debiandir/patches/*.patch`; do
50 patch --dir="$DISTDIR" --strip=1 <$FILE
53 cp -a "$debiandir" "$DISTDIR"
54 rm -r "$DISTDIR/debian/CVS"
55 rm -r "$DISTDIR/debian/patches"
56 rm -r "$DISTDIR/debian/split-init"
57 rm "$DISTDIR/debian/cvs2deb.sh"
58 rm "$DISTDIR/debian/TODO"
59 rm "$DISTDIR/debian/VERSION"
67 dpkg-buildpackage -rfakeroot