1
0

build-package.sh 546 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. SRC_DIR=$1
  3. LIB='libcpr'
  4. LIB_DIR="${LIB}_${VERSION}"
  5. DEBIAN_DIR="${LIB_DIR}/debian"
  6. ARCHIVE_NAME="$LIB_DIR.orig.tar.gz"
  7. echo -e "Preparing tar archive and directory\n"
  8. cp -r $SRC_DIR $LIB_DIR
  9. tar --exclude-vcs -czf $ARCHIVE_NAME $LIB_DIR
  10. tar -xzf $ARCHIVE_NAME
  11. cd $LIB_DIR
  12. echo -e "\n\nCopying prepared debian files to directory\n"
  13. mkdir debian
  14. cp -r package-build/debian-libcpr/* debian/
  15. sed -i "s/\%VERSION/$VERSION/g" debian/changelog
  16. sed -i "s/\%DATE/$(date -R)/g" debian/changelog
  17. echo -e "\n\nCalling debuild\n"
  18. debuild