]> arthur.barton.de Git - netatalk.git/blob - distrib/debian/cvs2deb.sh
call readt with ONE_DELAY = 5 s
[netatalk.git] / distrib / debian / cvs2deb.sh
1 #!/bin/sh
2
3 # Execute this script from the main netatalk source directory.
4
5 set -e
6
7 debiandir=distrib/debian
8
9 if test ! -d libatalk; then
10   echo "Not in netatalk directory"
11   exit 1
12 fi
13
14 VERSION=`cat VERSION`
15 DEBVERSION="${VERSION}cvs"
16 DISTDIR="netatalk-$VERSION"
17 DISTTGZ="netatalk_$DEBVERSION.orig.tar.gz"
18
19 if test ! -f INSTALL; then
20   if test -e INSTALL; then
21     echo "INSTALL is in the way, please move it away"
22     exit 1
23   fi
24   touch INSTALL
25 fi
26
27 if test ! -x configure; then
28   ./autogen.sh
29 fi
30
31 if test ! -e Makefile; then
32   if test -x config.status; then
33     ./config.status
34   else
35     ./configure
36   fi
37 fi
38
39 make dist
40
41 mv "netatalk-$VERSION.tar.gz" "$DISTTGZ"
42 rm -rf "$DISTDIR" || true
43 tar xzf "$DISTTGZ"
44
45 for FILE in `find $debiandir/patches/*.patch`; do
46   patch --dir="$DISTDIR" --strip=1 <$FILE
47 done
48
49 cp -a "$debiandir" "$DISTDIR"
50 rm -r "$DISTDIR/debian/CVS"
51 rm -r "$DISTDIR/debian/patches"
52 rm -r "$DISTDIR/debian/split-init"
53 rm    "$DISTDIR/debian/cvs2deb.sh"
54
55 cd $DISTDIR
56
57 touch INSTALL
58
59 automake
60
61 dpkg-buildpackage -rfakeroot
62
63 cd ..
64 rm -r "$DISTDIR"
65 rm INSTALL