Ash Wilson | 18e9fab | 2016-04-14 18:42:16 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # First, get into the right directory |
| 4 | THISPATH=$(dirname "$BASH_SOURCE") |
| 5 | cd $THISPATH |
| 6 | |
| 7 | # Now, we check to see that the version env var is set |
| 8 | ${CPACK_PACKAGE_VERSION:?"Need to set CPACK_PACKAGE_VERSION env var!"} |
Ash Wilson | a5f62b6 | 2016-04-14 19:03:02 -0700 | [diff] [blame] | 9 | export $CPACK_DEBIAN_PACKAGE_ARCHITECTURE=`dpkg --print-architecture` |
Ash Wilson | 18e9fab | 2016-04-14 18:42:16 -0700 | [diff] [blame] | 10 | |
| 11 | # OK, now we get down to the business of building... |
| 12 | rm -rf ./build |
| 13 | mkdir build |
| 14 | cd build |
| 15 | cmake .. |
| 16 | make package |
| 17 | cpack -G DEB |
| 18 | mv ./*.deb ../installer-packages |
| 19 | echo "If you've gotten to this point, the package has been built" |
| 20 | echo "and exists at "$THISPATH"/installer-packages" |
| 21 | echo "Don't forget to add and commit the new package, and tag the commit!" |