From 105e43fafd3c6e80a041317b8c1772bb866202ea Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sat, 14 Jan 2017 14:14:41 -0600 Subject: [PATCH 1/2] initial commit for packpack support --- utils/packpack/autosetup.patch | 17 +++++++++++++++++ utils/packpack/fedora25_package.mk | 9 +++++++++ utils/packpack/startpackpack.sh | 14 ++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 utils/packpack/autosetup.patch create mode 100644 utils/packpack/fedora25_package.mk create mode 100644 utils/packpack/startpackpack.sh diff --git a/utils/packpack/autosetup.patch b/utils/packpack/autosetup.patch new file mode 100644 index 000000000..ffae62b7a --- /dev/null +++ b/utils/packpack/autosetup.patch @@ -0,0 +1,17 @@ +--- packpack/pack/rpm.mk 2017-01-14 14:01:50.364217882 -0600 ++++ packpack/pack/rpm.mk.new 2017-01-14 14:01:19.594985311 -0600 +@@ -23,11 +23,13 @@ + -e 's/Release:\([ ]*\).*/Release: $(RELEASE)%{dist}/' \ + -e 's/Source0:\([ ]*\).*/Source0: $(TARBALL)/' \ + -e 's/%setup .*/%setup -q -n $(PRODUCT)-$(VERSION)/' \ ++ -e 's/%autosetup -n .*/%autosetup -n $(PRODUCT)-$(VERSION)/' \ + -i $@.tmp + grep -F "Version: $(VERSION)" $@.tmp && \ + grep -F "Release: $(RELEASE)" $@.tmp && \ + grep -F "Source0: $(TARBALL)" $@.tmp && \ +- grep -F "%setup -q -n $(PRODUCT)-$(VERSION)" $@.tmp || \ ++ (grep -F "%setup -q -n $(PRODUCT)-$(VERSION)" $@.tmp || \ ++ grep -F "%autosetup" $@.tmp) || \ + (echo "Failed to patch RPM spec" && exit 1) + @ mv -f $@.tmp $@ + @echo diff --git a/utils/packpack/fedora25_package.mk b/utils/packpack/fedora25_package.mk new file mode 100644 index 000000000..61a5a8430 --- /dev/null +++ b/utils/packpack/fedora25_package.mk @@ -0,0 +1,9 @@ +.PHONY: fedora25_package +.NOTPARALLEL: fedora25_package + +fedora25_package: fedora25_bootstrap package + +fedora25_bootstrap: + sudo dnf install -y curl + sudo dnf install -y --nogpgcheck build/zmrepo-25-1.fc25.noarch.rpm + diff --git a/utils/packpack/startpackpack.sh b/utils/packpack/startpackpack.sh new file mode 100644 index 000000000..753134b57 --- /dev/null +++ b/utils/packpack/startpackpack.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# packpack setup file for ZoneMinder project +# Written by Andrew Bauer + +# This script is jsut a first start. It will change siginificantly as support +# for more distros is added. + +ln -s distros/redhat rpm +mkdir -p build +curl -L https://github.com/FriendsOfCake/crud/archive/v3.0.10.tar.gz > build/crud-3.0.10.tar.gz +git clone https://github.com/packpack/packpack.git packpack +patch < utils/packpack/autosetup.patch +packpack/packpack -f utils/packpack/fedora25_package.mk fedora25_package + From 3ae7038e3b029e0b8dffd96da404aa069fb3f631 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sat, 14 Jan 2017 14:15:54 -0600 Subject: [PATCH 2/2] make the build script executable --- utils/packpack/startpackpack.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 utils/packpack/startpackpack.sh diff --git a/utils/packpack/startpackpack.sh b/utils/packpack/startpackpack.sh old mode 100644 new mode 100755