2 # Makes Debian source for package in deb-src
3 # The current directory should hold a .tar.gz (dist) for the package
4 # And the current directory should hold a debian and a corresponding changelog
5 DEBCHANGELOG=debian/changelog
6 if test ! -f $DEBCHANGELOG; then
7 echo "$DEBCHANGELOG missing"
8 echo "The current directory should be base source of package"
11 if test -d deb-src; then
12 echo "deb-src exist. You might remove it"
15 l=`head -1 $DEBCHANGELOG`
16 PROD=`echo $l|sed 's/ .*//g'`
17 VERSION=`echo $l|sed 's/.*(//g'|sed 's/).*//g'`
18 echo "VERSION=$VERSION"
19 MAJOR=`echo $VERSION|sed 's/-.*//g'`
21 MINOR=`echo $VERSION|sed 's/.*-//g'`
23 TAR=${PROD}-${MAJOR}.tar.gz
24 if test ! -f ${TAR}; then
25 echo "$0: ${TAR} missing"
30 ORIG=${PROD}_${MAJOR}.orig.tar.gz
33 cp ${TAR} deb-src/${ORIG}
36 cp -r ../debian ${PROD}-${MAJOR}
37 dpkg-source -b ${PROD}-${MAJOR}