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.

packageRPM.sh 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash -
  2. #===============================================================================
  3. #
  4. # FILE: packageRPM.sh
  5. #
  6. # USAGE: ./packageRPM.sh
  7. #
  8. # DESCRIPTION:
  9. #
  10. # OPTIONS: ---
  11. # REQUIREMENTS: ---
  12. # BUGS: ---
  13. # NOTES: ---
  14. # AUTHOR: Bradlee Speice (), bspeice.nc@gmail.com
  15. # ORGANIZATION:
  16. # CREATED: 07/30/2012 11:29:28 AM EDT
  17. # REVISION: ---
  18. #===============================================================================
  19. #This script is a simple wrapper for building the .rpm packages for libcvautomation
  20. #It is not intended to be bullet-proof - if it gets broken I will do my best to
  21. #provide bugfixes, but this is a fairly low priority.
  22. #Also, this script is intended to be run from the Git source, and *not* from
  23. #a release tarball.
  24. set -o errexit
  25. if [ -z "$SIGN_PACKAGE" ]; then
  26. echo "Building without signing packages..."
  27. fi
  28. PACKAGE_NAME=`grep AC_INIT configure.ac | cut -d'(' -f2 | cut -d',' -f1`
  29. PACKAGE_VERSION=`grep AC_INIT configure.ac | cut -d',' -f2 | tr -d [:space:]`
  30. ./autogen.sh
  31. ./configure
  32. make -j`grep processor /proc/cpuinfo | wc -l`
  33. make dist
  34. if [ ! -d $HOME/rpmbuild ]; then
  35. echo "Could not find the rpmbuild directory!"
  36. echo "Please make sure your packaging environment is set up correctly."
  37. fi
  38. TARBALL="${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz"
  39. cp $TARBALL $HOME/rpmbuild/SOURCES
  40. cp rpm/libcvautomation.spec $HOME/rpmbuild/SPECS
  41. cd $HOME/rpmbuild/SPECS
  42. if [ -z "$SIGN_PACKAGE" ]; then
  43. rpmbuild -ba libcvautomation.spec
  44. else
  45. rpmbuild -ba --sign libcvautomation.spec
  46. fi
  47. echo "Package successfully built in $HOME/rpmbuild/RPMS."