summaryrefslogtreecommitdiff
path: root/bin/sbuild-deb-package
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sbuild-deb-package')
-rwxr-xr-xbin/sbuild-deb-package24
1 files changed, 19 insertions, 5 deletions
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
}