generate-deb 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. #
  3. # Intended to be run from the root of the isync source tree in the repository.
  4. #
  5. VERSION=`dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-[^-]\+$/\1/p'`
  6. OLDVERSION=$VERSION
  7. if echo $VERSION | grep +cvsXXXXXXXX; then
  8. DATE=`date +%Y%m%d`
  9. VERSION=`echo $VERSION | sed -e s/+cvsXXXXXXXX/+cvs${DATE}/`
  10. else
  11. if [ ! -f ../isync_$VERSION.orig.tar.gz ]; then
  12. echo isync_$VERSION.orig.tar.gz must be found in the parent directory.
  13. exit 1
  14. fi
  15. fi
  16. rm -rf ../isync-$VERSION
  17. fakeroot ./debian/rules clean
  18. cp -rl . ../isync-$VERSION
  19. cd ../isync-$VERSION
  20. if [ "$OLDVERSION" != "$VERSION" ]; then
  21. sed -e s/+cvsXXXXXXXX/+cvs${DATE}/ < debian/changelog > debian/changelog.new
  22. mv debian/changelog.new debian/changelog
  23. fi
  24. find . -name .git -print0 | xargs -0r rm -rf
  25. find . -name .gitignore -print0 | xargs -0r rm
  26. find . -type l -print0 | xargs -0r rm
  27. find . -name .#\*# -print0 | xargs -0r rm
  28. aclocal
  29. autoheader
  30. automake --add-missing --copy
  31. autoconf
  32. if [ -n "$DOSIGN" ]; then
  33. SIGNOPTS=
  34. else
  35. SIGNOPTS="-us -uc"
  36. fi
  37. dpkg-buildpackage -rfakeroot $SIGNOPTS