You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
769 B

  1. #!/bin/sh
  2. # Automatic deb packaging script for shadowsocks-libev
  3. #
  4. set -e
  5. if [ "$(basename $(pwd))x" = "debianx" ]; then
  6. cd ..
  7. else
  8. if [ ! "$(basename $(pwd))x" = "shadowsocks-libevx" ]; then
  9. echo "Unknown Working Directory, won't continue."
  10. exit 1
  11. fi
  12. fi
  13. git clean -Xdf
  14. git reset --hard HEAD
  15. autoreconf --install
  16. rm -f ../*.tar.xz ../*.deb ../*.tar.gz ../*.build ../*.dsc ../*.changes
  17. CURR_PKG_DIR=$(pwd)
  18. tar -czvf ../$(basename $CURR_PKG_DIR)_$(cat ./configure.ac | grep AC_INIT | grep -o '[0-9]\.[0-9]\.[0-9]').orig.tar.gz . --exclude-vcs
  19. #dh_make --multi --createorig --yes --copyright gpl3
  20. A=$(which debuild > /dev/null 2> /dev/null; echo $?)
  21. if [ "${A}x" = "0x" ]; then
  22. debuild -us -uc -i
  23. else
  24. dpkg-buildpackage -us -uc -i
  25. fi