summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-11-10 17:11:00 +0100
committerArctica Builder (CHEVALBLANC) <arctica-builder@chevalblanc>2015-11-10 17:12:03 +0100
commit3d3298bd8a7423359b9a2c323cf318c36b74718f (patch)
treea47c5ececff45e21b42fcb9ab4b7df2bdc416e5f /bin
parentb530ac9fd1509e9da2f995473c92265c4c9c0c79 (diff)
downloadbuildscripts-3d3298bd8a7423359b9a2c323cf318c36b74718f.tar.gz
buildscripts-3d3298bd8a7423359b9a2c323cf318c36b74718f.tar.bz2
buildscripts-3d3298bd8a7423359b9a2c323cf318c36b74718f.zip
Fully fix OTHERMIRROR variable interpretation.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-deb-package2
-rwxr-xr-xbin/sbuild-deb-package24
2 files changed, 20 insertions, 6 deletions
diff --git a/bin/build-deb-package b/bin/build-deb-package
index 5f1ed5d..e787c69 100755
--- a/bin/build-deb-package
+++ b/bin/build-deb-package
@@ -274,7 +274,7 @@ build_packages() {
mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{amd64,i386}
OTHERMIRROR=""
if [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then
- grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST}-nightly ${l_CODENAME} ${COMPONENT_MAIN} ${COMPONENT}"
+ grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST}-nightly ${l_CODENAME} ${COMPONENT_MAIN}"
else
grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT}"
fi
diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package
index 9e66850..d0aaf0b 100755
--- a/bin/sbuild-deb-package
+++ b/bin/sbuild-deb-package
@@ -256,18 +256,24 @@ build_packages() {
mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{amd64,i386}
OTHERMIRROR=""
if [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then
- grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="--extra-repository=\"deb http://${REPOS_SERVER}/${l_DIST}-nightly ${l_CODENAME} ${COMPONENT_MAIN} ${COMPONENT}\""
+ grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST}-nightly ${l_CODENAME} ${COMPONENT_MAIN}"
else
- grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="--extra-repository=\"deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT}\""
+ grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT}"
fi
# create git changelog immediately prior to building the package
git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog
# build the source package
- dpkg-buildpackage -uc -us -S
+ dpkg-buildpackage -uc -us -S -d
cd ..
DSCFILE="$(pwd)/$(ls -1 "${PROJECT}_"*.dsc | head -n1)"
+ SBUILD_OPTIONS_64="-j2 -sAd ${VERSION} -k ${GPG_KEY} -c arctica-${l_CODENAME}"
+ SBUILD_OPTIONS_32="-j2 -sAd ${VERSION} -k ${GPG_KEY} -c arctica-${l_CODENAME}-i386 --arch=i386 --debbuildopts=-B"
+ if [ -n "${SA_OPTION}" ]; then
+ SBUILD_OPTIONS_64=${SBUILD_OPTIONS}" ${SA_OPTION}"
+ fi
+
[ "x${SKIP_ARCH}" != "xamd64" ] && grep -Eqs 'Architecture.*(all|any|amd64)' "${TEMP_DIR}/${PROJECT}/debian/control" && {
cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/amd64"
tac ${DSCFILE} | while read line; do
@@ -276,7 +282,11 @@ build_packages() {
filename="$(echo $line | cut -d" " -f3-)"
cp "${TEMP_DIR}/${filename}" .
done
- nice ${SBUILD} -j2 -sAd "${VERSION}" -k "${GPG_KEY}" -c "arctica-${l_CODENAME}" ${OTHERMIRROR} ${SA_OPTION} "${DSCFILE}"
+ if [ -z "${OTHERMIRROR}" ]; then
+ nice ${SBUILD} ${SBUILD_OPTIONS_64} "${DSCFILE}"
+ else
+ nice ${SBUILD} ${SBUILD_OPTIONS_64} --extra-repository="${OTHERMIRROR}" "${DSCFILE}"
+ fi
}
[ "x${SKIP_ARCH}" != "xi386" ] && grep -Eqs 'Architecture.*(any|i386)' "${TEMP_DIR}/${PROJECT}/debian/control" && {
cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386"
@@ -286,7 +296,11 @@ build_packages() {
filename="$(echo $line | cut -d" " -f3-)"
cp "${TEMP_DIR}/${filename}" .
done
- nice ${SBUILD} -j2 -sAd "${VERSION}" -k "${GPG_KEY}" -c "arctica-${l_CODENAME}-i386" ${OTHERMIRROR} --arch=i386 --debbuildopts="-B" "${DSCFILE}"
+ if [ -z "${OTHERMIRROR}" ]; then
+ nice ${SBUILD} ${SBUILD_OPTIONS_32} "${DSCFILE}"
+ else
+ nice ${SBUILD} ${SBUILD_OPTIONS_32} --extra-repository="${OTHERMIRROR}" "${DSCFILE}"
+ fi
}
done
}