patch packpack builds

This commit is contained in:
Andrew Bauer 2017-05-10 12:08:33 -05:00
parent de1c463195
commit da7ea06a14
2 changed files with 20 additions and 4 deletions

View File

@ -0,0 +1,10 @@
--- a/packpack/pack/rpm.mk 2017-05-10 09:53:38.797616947 -0500
+++ b/packpack/pack/rpm.mk 2017-05-10 09:59:26.744409073 -0500
@@ -26,7 +26,6 @@
-e 's/Source0:\([ ]*\).*/Source0: $(TARBALL)/' \
-e 's/%setup.*/%setup -q -n $(PRODUCT)-$(VERSION)/' \
-re 's/(%autosetup.*)( -n \S*)(.*)/\1\3/' \
- -e '0,/%autosetup.*/ s/%autosetup.*/%autosetup -n $(PRODUCT)-$(VERSION)/' \
-e '/%changelog/a\* $(THEDATE) $(CHANGELOG_NAME) <$(CHANGELOG_EMAIL)> - $(VERSION)-$(RELEASE)\n\- $(CHANGELOG_TEXT)\n' \
-i $@.tmp
grep -F "Version: $(VERSION)" $@.tmp && \

View File

@ -9,7 +9,7 @@
# General sanity checks # General sanity checks
checksanity () { checksanity () {
# Check to see if this script has access to all the commands it needs # Check to see if this script has access to all the commands it needs
for CMD in set echo curl repoquery git ln mkdir rmdir; do for CMD in set echo curl repoquery git ln mkdir rmdir cat patch; do
type $CMD 2>&1 > /dev/null type $CMD 2>&1 > /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -50,6 +50,12 @@ commonprep () {
git clone https://github.com/packpack/packpack.git packpack git clone https://github.com/packpack/packpack.git packpack
fi fi
# Patch packpack
patch --dry-run --silent -f -p1 < utils/packpack/packpack-rpm.patch
if [ $? -eq 0 ]; then
patch -p1 < utils/packpack/packpack-rpm.patch
fi
# The rpm specfile requires we download the tarball and manually move it into place # The rpm specfile requires we download the tarball and manually move it into place
# Might as well do this for Debian as well, rather than git submodule init # Might as well do this for Debian as well, rather than git submodule init
CRUDVER="3.0.10" CRUDVER="3.0.10"
@ -142,10 +148,10 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
echo "Begin Redhat build..." echo "Begin Redhat build..."
# Set VERSION to x.xx.x e.g. 1.30.2 # Set VERSION to the contents of the version file
# Set RELEASE to x where x is number of commits since release # Set RELEASE to x where x is number of commits since the release shown on github
# Creates zoneminder packages in the format: zoneminder-{version}-{release} # Creates zoneminder packages in the format: zoneminder-{version}-{release}
export VERSION=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\1/p') export VERSION=$(cat version)
export RELEASE=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\2/p') export RELEASE=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\2/p')
echo echo