No Description
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.

packageDebian.sh 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash -
  2. #===============================================================================
  3. #
  4. # FILE: packageDebian.sh
  5. #
  6. # USAGE: ./packageDebian.sh
  7. #
  8. # DESCRIPTION:
  9. #
  10. # OPTIONS: ---
  11. # REQUIREMENTS: ---
  12. # BUGS: ---
  13. # NOTES: ---
  14. # AUTHOR: Bradlee Speice (), bspeice@uncc.edu
  15. # ORGANIZATION:
  16. # REVISION: ---
  17. #===============================================================================
  18. #This script is a simple wrapper for building the .deb packages for libcvautomation
  19. #It is not intended to be bullet-proof - if it gets broken I will do my best to
  20. #provide bugfixes, but this is a fairly low priority.
  21. #Also, this script is intended to be run from the Git source, and *not* from
  22. #a release tarball.
  23. set -o errexit
  24. if [ -z "$1" ]; then
  25. echo "Building without signing the package..."
  26. fi
  27. PACKAGE_NAME=`grep AC_INIT configure.ac | cut -d'(' -f2 | cut -d',' -f1`
  28. PACKAGE_VERSION=`grep AC_INIT configure.ac | cut -d',' -f2 | tr -d [:space:]`
  29. ./autogen.sh
  30. ./configure
  31. make -j`grep processor /proc/cpuinfo | wc -l`
  32. make dist
  33. BUILD_DIR=`mktemp -d`
  34. TARBALL="${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz"
  35. cp $TARBALL $BUILD_DIR
  36. cp $TARBALL $BUILD_DIR/`echo $TARBALL | sed 's/-/_/g;s/tar/orig.tar/'`
  37. tar xf $TARBALL -C $BUILD_DIR
  38. cp debian $BUILD_DIR/$PACKAGE_NAME-$PACKAGE_VERSION -r
  39. cd $BUILD_DIR/$PACKAGE_NAME-$PACKAGE_VERSION
  40. echo "Beginning build process..."
  41. if [ -z "$1" ]; then
  42. debuild
  43. else
  44. debuild -k$1
  45. fi
  46. echo "Package successfully built in $BUILD_DIR."