From 5ce35f147a167799b34a594498884ee3bdfeb41c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 20 Aug 2015 20:35:01 -0400 Subject: [PATCH] initial rough version --- utils/do_debian_package.sh | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 utils/do_debian_package.sh diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh new file mode 100755 index 000000000..b7a97a0a6 --- /dev/null +++ b/utils/do_debian_package.sh @@ -0,0 +1,47 @@ +#!/bin/bash +DATE=`date -R` +DISTRO=$1 +SNAPSHOT=$2 +TYPE=$3 +if [ "$TYPE" == "" ]; then +TYPE="source"; +fi; + +if [ ! -d 'zoneminder_release' ]; then +git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder_release +fi; +VERSION=`cat zoneminder_release/version` +if [ $VERSION == "" ]; then +exit 1; +fi; +echo "Doing $TYPE release zoneminder_$VERSION-$DISTRO-$SNAPSHOT"; +mv zoneminder_release zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig +cd zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig +git submodule init +git submodule update --init --recursive +if [ $DISTRO == "trusty" ]; then +cp -r distros/ubuntu1204_cmake debian +else +cp -r distros/ubuntu1504_cmake debian +fi; + +cat < debian/changelog +zoneminder ($VERSION-$DISTRO-$SNAPSHOT) $DISTRO; urgency=medium + + * + + -- Isaac Connor $DATE + +EOF +rm -rf .git +rm .gitignore +cd ../ +tar zcf zoneminder_$VERSION-$DISTRO.orig.tar.gz zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig +cd zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig +if [ $TYPE == "binary" ]; then +debuild -k52C7377E +else +debuild -S -sa -k52C7377E +fi; +cd ../ +rm -fr zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig