Fixing stuff in ynh-custom-builds and add stuff for unscd

This commit is contained in:
Alexandre Aubin 2018-05-03 02:03:29 +02:00
parent e92c239a8a
commit b50e2a4fdc

View file

@ -5,8 +5,6 @@ readonly BRANCH="testing"
readonly DISTRIB="stretch" readonly DISTRIB="stretch"
readonly DEBIAN_BRANCH="testing" readonly DEBIAN_BRANCH="testing"
readonly BUILD_MESSAGE="YunoHost custom build." readonly BUILD_MESSAGE="YunoHost custom build."
readonly YUNOHOST_PREFIX="+yunohost"
readonly YUNOHOST_REVISION="-1"
source /home/vinaigrette/config/config source /home/vinaigrette/config/config
@ -14,17 +12,33 @@ function main()
{ {
build_metronome build_metronome
build_rspamd build_rspamd
build_unscd
} }
function build_metronome() function build_metronome()
{ {
local PACKAGE="metronome" local PACKAGE="metronome"
cd $GIT_REPOS/$PACKAGE
# For some reason metronome version must include a revision ("-x") # For some reason metronome version must include a revision ("-x")
local VERSION="3.8.13${YUNOHOST_PREFIX}${YUNOHOST_REVISION}" local VERSION="$(dpkg-parsechangelog -S Version 2>/dev/null)+yunohost-1"
build $PACKAGE $VERSION build $PACKAGE $VERSION
} }
function build_unscd()
{
local PACKAGE="unscd"
cd $GIT_REPOS/$PACKAGE
local VERSION="$(dpkg-parsechangelog -S Version 2>/dev/null)+yunohost"
build $PACKAGE $VERSION
}
function build_rspamd() function build_rspamd()
{ {
@ -36,7 +50,7 @@ function build_rspamd()
# Get last tag and deduce version number to user... # Get last tag and deduce version number to user...
local LASTTAG=$(git tag --list | grep "^1." | sort -n | tail -n1) local LASTTAG=$(git tag --list | grep "^1." | sort -n | tail -n1)
local VERSION="${LASTTAG}${YUNOHOST_PREFIX}" local VERSION="${LASTTAG}+yunohost"
git checkout $LASTTAG git checkout $LASTTAG
build $PACKAGE $VERSION build $PACKAGE $VERSION