summaryrefslogtreecommitdiffstats
path: root/debian/_buildscripts/local/additional_files
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2018-07-30 22:49:19 +0900
committerMichele Calgaro <[email protected]>2018-07-30 22:49:19 +0900
commit10a972bbd7ab75c6d3cd68ec3e30b8a70bf3b168 (patch)
tree93bac0bbb97f8907b4445d617e4046d6bb1050ea /debian/_buildscripts/local/additional_files
parent55d493de587a08b20eec26ada3cdad49c8329cf9 (diff)
downloadtde-packaging-10a972bbd7ab75c6d3cd68ec3e30b8a70bf3b168.tar.gz
tde-packaging-10a972bbd7ab75c6d3cd68ec3e30b8a70bf3b168.zip
DEB build scripts:
- fixed support for Devuan Jessie. - dropped Sarge, Etch, Lenny, Lucid from list of supported distros. - added auto detection of distro, distro name and architecture. Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'debian/_buildscripts/local/additional_files')
-rw-r--r--debian/_buildscripts/local/additional_files/etc/pbuilderrc176
1 files changed, 85 insertions, 91 deletions
diff --git a/debian/_buildscripts/local/additional_files/etc/pbuilderrc b/debian/_buildscripts/local/additional_files/etc/pbuilderrc
index fde052b35..00ed2cd8a 100644
--- a/debian/_buildscripts/local/additional_files/etc/pbuilderrc
+++ b/debian/_buildscripts/local/additional_files/etc/pbuilderrc
@@ -33,108 +33,103 @@ export SHELL=/bin/bash
PKGNAME_LOGFILE="__build__.log"
#-- get desired distribution and architecture
-if [ "$DIST" = "" ]; then
- DIST=$(lsb_release -cs)
-fi
-DISTRIBUTION=$DIST
-if [ "$ARCH" = "" ]; then
- ARCH=$(dpkg --print-architecture)
-fi
-ARCHITECTURE=$ARCH
-
-if [ -n "$T" ]; then
- if [ "${T##*-}" = "vm" ]; then
- BUILD_VM="qemu"
- T=${T%-vm}
- fi
- if [ "${T#*@}" = "$T" ]; then
- DISTRIBUTION=${T%-*}
- ARCHITECTURE=${T##*-}
- else
- DISTRIBUTION=${T%@*}
- ARCHITECTURE=${T##*@}
- fi
- if [ "${DISTRIBUTION##*-}" = "backports" ]; then
- BACKPORTS="yes"
- DISTRIBUTION=${DISTRIBUTION%-backports}
- fi
-fi
+DISTRIBUTION="$DISTRO_NAME"
+[[ "$DISTRO" = "" ]] && DISTRO=$(lsb_release -is | sed -e 's/\(.*\)/\L\1/')
+[[ "$DISTRIBUTION" = "" ]] && DISTRIBUTION=$(lsb_release -cs | sed -e 's/\(.*\)/\L\1/')
+[[ "$ARCHITECTURE" = "" ]] && ARCHITECTURE=$(dpkg --print-architecture)
-BASETGZ="/var/cache/pbuilder/base-$DIST@$ARCH.tgz"
+BASETGZ="/var/cache/pbuilder/base-$DISTRIBUTION@$ARCHITECTURE.tgz"
#-- select apt components
case "$DISTRIBUTION" in
- sid|buster|stretch|jessie|wheezy|squeeze|lenny|etch|sarge)
- COMPONENTS="main contrib non-free"
- ;;
-
- ceres|beowulf|ascii)
- COMPONENTS="main"
- DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
- EXTRAPACKAGES="$EXTRAPACKAGES devuan-keyring"
- ;;
-
- bionic|artful|zesty|yakkety|xenial|wily|vivid|utopic|trusty|saucy|raring|quantal|precise|oneiric|natty|maverick|lucid)
- COMPONENTS="main restricted universe multiverse"
- DEBOOTSTRAPOPTS=(--variant=buildd)
- ;;
-
- raspbian-jessie|raspbian-wheezy)
- COMPONENTS="main contrib non-free"
- DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
- ;;
+ jessie)
+ if [[ "$DISTRO" = "devuan" ]]; then
+ COMPONENTS="main"
+ DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
+ EXTRAPACKAGES="$EXTRAPACKAGES devuan-keyring"
+ else
+ COMPONENTS="main contrib non-free"
+ fi
+ ;;
+
+ sid|buster|stretch|wheezy|squeeze)
+ COMPONENTS="main contrib non-free"
+ ;;
+
+ ceres|beowulf|ascii)
+ COMPONENTS="main"
+ DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
+ EXTRAPACKAGES="$EXTRAPACKAGES devuan-keyring"
+ ;;
+
+ bionic|artful|zesty|yakkety|xenial|wily|vivid|utopic|trusty|saucy|raring|quantal|precise|oneiric|natty|maverick)
+ COMPONENTS="main restricted universe multiverse"
+ DEBOOTSTRAPOPTS=(--variant=buildd)
+ ;;
+
+ raspbian-jessie|raspbian-wheezy)
+ COMPONENTS="main contrib non-free"
+ DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
+ ;;
esac
EXTRAPACKAGES="$EXTRAPACKAGES fakeroot apt-transport-https ca-certificates"
#-- select base apt sources
case "$DISTRIBUTION" in
- sid|buster|stretch|jessie|wheezy)
- MIRRORSITE=http://deb.debian.org/debian
- ;;
-
- squeeze|lenny|etch|sarge)
- MIRRORSITE=http://archive.debian.org/debian
- OTHERMIRROR="#deb http://archive.debian.org/backports.org $DISTRIBUTION-backports main contrib non-free"
- ;;
-
- ceres|beowulf|ascii)
- MIRRORSITE=http://auto.mirror.devuan.org/merged
- ;;
-
- bionic|artful|zesty|yakkety|wily|vivid|trusty|precise)
- if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then
- MIRRORSITE=http://archive.ubuntu.com/ubuntu
- else
- MIRRORSITE=http://ports.ubuntu.com
- fi
- ;;
-
- xenial)
- if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then
- MIRRORSITE=http://archive.ubuntu.com/ubuntu
- else
- MIRRORSITE=http://ports.ubuntu.com
- fi
- OTHERMIRROR="deb $MIRRORSITE $DISTRIBUTION-updates $COMPONENTS"
- ;;
-
- utopic|saucy|raring|quantal|oneiric|natty|maverick|lucid)
- MIRRORSITE=http://old-releases.ubuntu.com/ubuntu
- ;;
-
- raspbian-jessie|raspbian-wheezy)
- MIRRORSITE=http://ftp.fi.muni.cz/pub/linux/raspbian/raspbian
- ;;
+ jessie)
+ if [[ "$DISTRO" = "devuan" ]]; then
+ MIRRORSITE=http://auto.mirror.devuan.org/merged
+ else
+ MIRRORSITE=http://deb.debian.org/debian
+ fi
+ ;;
+
+ sid|buster|stretch|wheezy)
+ MIRRORSITE=http://deb.debian.org/debian
+ ;;
+
+ squeeze)
+ MIRRORSITE=http://archive.debian.org/debian
+ ;;
+
+ ceres|beowulf|ascii)
+ MIRRORSITE=http://auto.mirror.devuan.org/merged
+ ;;
+
+ bionic|artful|zesty|yakkety|wily|vivid|trusty|precise)
+ if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then
+ MIRRORSITE=http://archive.ubuntu.com/ubuntu
+ else
+ MIRRORSITE=http://ports.ubuntu.com
+ fi
+ ;;
+
+ xenial)
+ if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then
+ MIRRORSITE=http://archive.ubuntu.com/ubuntu
+ else
+ MIRRORSITE=http://ports.ubuntu.com
+ fi
+ OTHERMIRROR="deb $MIRRORSITE $DISTRIBUTION-updates $COMPONENTS"
+ ;;
+
+ utopic|saucy|raring|quantal|oneiric|natty|maverick)
+ MIRRORSITE=http://old-releases.ubuntu.com/ubuntu
+ ;;
+
+ raspbian-jessie|raspbian-wheezy)
+ MIRRORSITE=http://ftp.fi.muni.cz/pub/linux/raspbian/raspbian
+ ;;
esac
-if [ -n "${ARCH}" ]; then
- NAME="$NAME-$ARCH"
- DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
+if [ -n "${ARCHITECTURE}" ]; then
+ NAME="$NAME-$ARCHITECTURE"
+ DEBOOTSTRAPOPTS=("--arch" "$ARCHITECTURE" "${DEBOOTSTRAPOPTS[@]}")
fi
-BUILDRESULT="/var/cache/pbuilder/$DISTRIBUTION/result/"
+BUILDRESULT="/var/cache/pbuilder/$DISTRO-$DISTRIBUTION/result/"
-APTCACHE="/var/cache/pbuilder/aptcache/$DISTRIBUTION/"
+APTCACHE="/var/cache/pbuilder/aptcache/$DISTRO-$DISTRIBUTION/"
if [ -n "$APTCACHE" ] && [ ! -d "$APTCACHE" ]; then
mkdir $APTCACHE
fi
@@ -168,9 +163,8 @@ case "$DISTRIBUTION" in
PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt"
;;
- jessie|wheezy|squeeze|lenny|etch|sarge|\
- raspbian-jessie|raspbian-wheezy|\
- yakkety|xenial|wily|vivid|utopic|trusty|saucy|raring|quantal|precise|oneiric|natty|maverick|lucid)
+ jessie|wheezy|squeeze|raspbian-jessie|raspbian-wheezy|\
+ yakkety|xenial|wily|vivid|utopic|trusty|saucy|raring|quantal|precise|oneiric|natty|maverick)
PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-aptitude"
;;
esac