3 # Execute this script from the main
7 debiandir=distrib/debian
9 if test ! -e README.ASUN; then
10 echo "Not in netatalk directory"
15 DEBVERSION=`cat "$debiandir/VERSION"`
16 DISTDIR="netatalk-$VERSION"
17 DISTTGZ="netatalk_$DEBVERSION.orig.tar.gz"
19 if test ! -f INSTALL; then
20 if test -e INSTALL; then
21 echo "INSTALL is in the way, please move it away"
27 if test ! -x configure; then
31 if test ! -e Makefile; then
32 if test -x config.status; then
41 mv "netatalk-$VERSION.tar.gz" "$DISTTGZ"
42 rm -rf "netatalk-$VERSION" || true
45 for FILE in `find $debiandir/patches/*.patch`; do
46 patch --dir="$DISTDIR" --strip=1 <$FILE
49 cp -a "$debiandir" "$DISTDIR"
50 rm -r "$DISTDIR/debian/CVS"
51 rm -r "$DISTDIR/debian/patches"
52 rm "$DISTDIR/debian/cvs2deb.sh"
53 rm "$DISTDIR/debian/VERSION"
55 cd "$DISTDIR" && dpkg-buildpackage -rfakeroot