Merge ../ZoneMinder.connortechnology
This commit is contained in:
commit
ccfa2da00b
|
@ -63,6 +63,8 @@ DATE=`date -R`
|
||||||
if [ "$TYPE" == "" ]; then
|
if [ "$TYPE" == "" ]; then
|
||||||
echo "Defaulting to source build"
|
echo "Defaulting to source build"
|
||||||
TYPE="source";
|
TYPE="source";
|
||||||
|
else
|
||||||
|
echo "Doing $TYPE build"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ "$DISTRO" == "" ]; then
|
if [ "$DISTRO" == "" ]; then
|
||||||
|
@ -81,6 +83,8 @@ if [ "$RELEASE" != "" ]; then
|
||||||
if [ "$GITHUB_FORK" != "" ] && [ "$GITHUB_FORK" != "ZoneMinder" ]; then
|
if [ "$GITHUB_FORK" != "" ] && [ "$GITHUB_FORK" != "ZoneMinder" ]; then
|
||||||
echo "Releases cannot have a fork ($GITHUB_FORK).... exiting."
|
echo "Releases cannot have a fork ($GITHUB_FORK).... exiting."
|
||||||
exit 0;
|
exit 0;
|
||||||
|
else
|
||||||
|
GITHUB_FORK="ZoneMinder";
|
||||||
fi
|
fi
|
||||||
BRANCH="release-$RELEASE"
|
BRANCH="release-$RELEASE"
|
||||||
else
|
else
|
||||||
|
@ -118,10 +122,10 @@ if [ ! -d "${GITHUB_FORK}_zoneminder_release" ]; then
|
||||||
git pull
|
git pull
|
||||||
cd ../
|
cd ../
|
||||||
echo "git clone ${GITHUB_FORK}_ZoneMinder.git ${GITHUB_FORK}_zoneminder_release"
|
echo "git clone ${GITHUB_FORK}_ZoneMinder.git ${GITHUB_FORK}_zoneminder_release"
|
||||||
git clone "${GITHUB_FORK}_ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release"
|
git clone "${GITHUB_FORK}_ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release"
|
||||||
else
|
else
|
||||||
echo "git clone https://github.com/$GITHUB_FORK/ZoneMinder.git ${GITHUB_FORK}_zoneminder_release"
|
echo "git clone https://github.com/$GITHUB_FORK/ZoneMinder.git ${GITHUB_FORK}_zoneminder_release"
|
||||||
git clone "https://github.com/$GITHUB_FORK/ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release"
|
git clone "https://github.com/$GITHUB_FORK/ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "release dir already exists. Please remove it."
|
echo "release dir already exists. Please remove it."
|
||||||
|
@ -129,17 +133,13 @@ else
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
cd "${GITHUB_FORK}_zoneminder_release"
|
cd "${GITHUB_FORK}_zoneminder_release"
|
||||||
if [ $RELEASE ]; then
|
|
||||||
git checkout $RELEASE
|
|
||||||
else
|
|
||||||
git checkout $BRANCH
|
git checkout $BRANCH
|
||||||
fi;
|
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
VERSION=`cat ${GITHUB_FORK}_zoneminder_release/version`
|
VERSION=`cat ${GITHUB_FORK}_zoneminder_release/version`
|
||||||
|
|
||||||
if [ $VERSION == "" ]; then
|
if [ $VERSION == "" ]; then
|
||||||
exit 1;
|
exit 1;
|
||||||
fi;
|
fi;
|
||||||
if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then
|
if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then
|
||||||
VERSION="$VERSION~$SNAPSHOT";
|
VERSION="$VERSION~$SNAPSHOT";
|
||||||
|
@ -148,12 +148,17 @@ fi;
|
||||||
DIRECTORY="zoneminder_$VERSION";
|
DIRECTORY="zoneminder_$VERSION";
|
||||||
echo "Doing $TYPE release $DIRECTORY";
|
echo "Doing $TYPE release $DIRECTORY";
|
||||||
mv "${GITHUB_FORK}_zoneminder_release" "$DIRECTORY.orig";
|
mv "${GITHUB_FORK}_zoneminder_release" "$DIRECTORY.orig";
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error status code is: $?"
|
||||||
|
echo "Setting up build dir failed.";
|
||||||
|
exit $?;
|
||||||
|
fi;
|
||||||
cd "$DIRECTORY.orig";
|
cd "$DIRECTORY.orig";
|
||||||
|
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then
|
if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then
|
||||||
mv distros/ubuntu1204 debian
|
mv distros/ubuntu1204 debian
|
||||||
else
|
else
|
||||||
if [ "$DISTRO" == "wheezy" ]; then
|
if [ "$DISTRO" == "wheezy" ]; then
|
||||||
mv distros/debian debian
|
mv distros/debian debian
|
||||||
|
@ -185,6 +190,13 @@ zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
|
||||||
-- $AUTHOR $DATE
|
-- $AUTHOR $DATE
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
cat <<EOF > debian/NEWS
|
||||||
|
zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
|
||||||
|
|
||||||
|
* Release $VERSION
|
||||||
|
|
||||||
|
-- $AUTHOR $DATE
|
||||||
|
EOF
|
||||||
else
|
else
|
||||||
cat <<EOF > debian/changelog
|
cat <<EOF > debian/changelog
|
||||||
zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
|
zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
|
||||||
|
@ -192,7 +204,13 @@ zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
|
||||||
*
|
*
|
||||||
|
|
||||||
-- $AUTHOR $DATE
|
-- $AUTHOR $DATE
|
||||||
|
EOF
|
||||||
|
cat <<EOF > debian/changelog
|
||||||
|
zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
-- $AUTHOR $DATE
|
||||||
EOF
|
EOF
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
@ -207,7 +225,7 @@ if [ $TYPE == "binary" ]; then
|
||||||
sudo apt-get install devscripts equivs
|
sudo apt-get install devscripts equivs
|
||||||
sudo mk-build-deps -ir ./debian/control
|
sudo mk-build-deps -ir ./debian/control
|
||||||
echo "Status: $?"
|
echo "Status: $?"
|
||||||
DEBUILD=debuild
|
DEBUILD=debuild
|
||||||
else
|
else
|
||||||
if [ $TYPE == "local" ]; then
|
if [ $TYPE == "local" ]; then
|
||||||
# Auto-install all ZoneMinder's depedencies using the Debian control file
|
# Auto-install all ZoneMinder's depedencies using the Debian control file
|
||||||
|
@ -216,6 +234,7 @@ else
|
||||||
echo "Status: $?"
|
echo "Status: $?"
|
||||||
DEBUILD="debuild -i -us -uc -b"
|
DEBUILD="debuild -i -us -uc -b"
|
||||||
else
|
else
|
||||||
|
# Source build, don't need build depends.
|
||||||
DEBUILD="debuild -S -sa"
|
DEBUILD="debuild -S -sa"
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
@ -232,48 +251,56 @@ fi;
|
||||||
cd ../
|
cd ../
|
||||||
if [ "$INTERACTIVE" != "no" ]; then
|
if [ "$INTERACTIVE" != "no" ]; then
|
||||||
read -p "Do you want to keep the checked out version of Zoneminder (incase you want to modify it later) [y/N]"
|
read -p "Do you want to keep the checked out version of Zoneminder (incase you want to modify it later) [y/N]"
|
||||||
[[ $REPLY == [yY] ]] && { mv $DIRECTORY zoneminder_release; echo "The checked out copy is preserved in zoneminder_release"; } || { rm -fr $DIRECTORY; echo "The checked out copy has been deleted"; }
|
[[ $REPLY == [yY] ]] && { mv "$DIRECTORY.orig" zoneminder_release; echo "The checked out copy is preserved in zoneminder_release"; } || { rm -fr "$DIRECTORY.orig"; echo "The checked out copy has been deleted"; }
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
else
|
else
|
||||||
rm -fr $DIRECTORY; echo "The checked out copy has been deleted";
|
rm -fr "$DIRECTORY.orig"; echo "The checked out copy has been deleted";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $TYPE == "binary" ]; then
|
if [ $TYPE == "binary" ]; then
|
||||||
if [ "$INTERACTIVE" != "no" ]; then
|
if [ "$INTERACTIVE" != "no" ]; then
|
||||||
echo "Not doing dput since it's a binary release. Do you want to install it? (Y/N)"
|
read -p "Not doing dput since it's a binary release. Do you want to install it? (Y/N)"
|
||||||
read install
|
if [[ $REPLY == [yY] ]]; then
|
||||||
if [ "$install" == "Y" ]; then
|
|
||||||
sudo dpkg -i $DIRECTORY*.deb
|
sudo dpkg -i $DIRECTORY*.deb
|
||||||
|
else
|
||||||
|
echo $REPLY;
|
||||||
fi;
|
fi;
|
||||||
if [ "$DISTRO" == "jessie" ]; then
|
if [ "$DISTRO" == "jessie" ]; then
|
||||||
echo "Do you want to upload this binary to zmrepo? (y/N)"
|
read -p "Do you want to upload this binary to zmrepo? (y/N)"
|
||||||
read install
|
if [[ $REPLY == [yY] ]]; then
|
||||||
if [ "$install" == "Y" ]; then
|
if [ "$RELEASE" != "" ]; then
|
||||||
scp "zoneminder_*-${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/"
|
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/stable/mini-dinstall/incoming/"
|
||||||
|
else
|
||||||
|
if [ "$BRANCH" == "" ]; then
|
||||||
|
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/master/mini-dinstall/incoming/"
|
||||||
|
else
|
||||||
|
scp "$DIRECTORY-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/"
|
||||||
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
fi;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
else
|
else
|
||||||
SC="zoneminder_${VERSION}-${DISTRO}${PACKAGE_VERSION}_source.changes";
|
SC="zoneminder_${VERSION}-${DISTRO}${PACKAGE_VERSION}_source.changes";
|
||||||
PPA="";
|
PPA="";
|
||||||
if [ "$RELEASE" != "" ]; then
|
if [ "$RELEASE" != "" ]; then
|
||||||
PPA="ppa:iconnor/zoneminder";
|
PPA="ppa:iconnor/zoneminder";
|
||||||
else
|
else
|
||||||
if [ "$BRANCH" == "" ]; then
|
if [ "$BRANCH" == "" ]; then
|
||||||
PPA="ppa:iconnor/zoneminder-master";
|
PPA="ppa:iconnor/zoneminder-master";
|
||||||
else
|
else
|
||||||
PPA="ppa:iconnor/zoneminder-$BRANCH";
|
PPA="ppa:iconnor/zoneminder-$BRANCH";
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
dput="Y";
|
dput="Y";
|
||||||
if [ "$INTERACTIVE" != "no" ]; then
|
if [ "$INTERACTIVE" != "no" ]; then
|
||||||
echo "Ready to dput $SC to $PPA ? Y/N...";
|
echo "Ready to dput $SC to $PPA ? Y/N...";
|
||||||
read dput
|
read dput
|
||||||
fi
|
fi
|
||||||
if [ "$dput" == "Y" -o "$dput" == "y" ]; then
|
if [ "$dput" == [Yy] ]; then
|
||||||
dput $PPA $SC
|
dput $PPA $SC
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue