aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-09-27 21:25:17 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-09-27 21:25:17 -0300
commitd5da416066fb9b451c1f78004276fea1b7764deb (patch)
treead29df7922c11fa0636519eb74452954b03096a4
parent0b4513a982a3a25cb2fbc9ac49cf72081586d823 (diff)
downloaddebian-d5da416066fb9b451c1f78004276fea1b7764deb.tar.gz
debian-d5da416066fb9b451c1f78004276fea1b7764deb.tar.bz2
Custom pbuilderrc and local repository support
-rw-r--r--pbuilderrc.dot.link40
1 files changed, 23 insertions, 17 deletions
diff --git a/pbuilderrc.dot.link b/pbuilderrc.dot.link
index c63eb43..52afd3f 100644
--- a/pbuilderrc.dot.link
+++ b/pbuilderrc.dot.link
@@ -1,24 +1,19 @@
# See /usr/share/pbuilder/pbuilderrc for defaults
-# Custom hooks
-HOOKDIR="$HOME/.config/pbuilder/hooks/"
-
-# Default dist
-if [ -z "${DIST}" ]; then
- DIST="sid"
+# Source custom configuration
+if [ -e "$HOME/.custom/pbuilderrc" ]; then
+ source $HOME/.custom/pbuilderrc
fi
-# Default arch
-if [ -z "${ARCH}" ]; then
- ARCH="amd64"
-fi
+# Basic configuration
+ARCH=${ARCH:=amd64}
+DIST=${ARCH:=sid}
+COMPONENTS=${COMPONENTS:=main contrib non-free}
+HOOKDIR=${HOOKDIR:=$HOME/.config/pbuilder/hooks/}
# Map distribution option to our env variable
DISTRIBUTION="$DIST"
-# Components
-COMPONENTS="main contrib non-free"
-
# Backports
# https://wiki.ubuntu.com/PbuilderHowto#Using_backport_repositories_in_pbuilder
# https://wiki.debian.org/BuildingFormalBackports#Building_multi-dependencies_packages
@@ -26,13 +21,24 @@ if [ "$DIST" != "sid" ]; then
OTHERMIRROR="deb http://http.debian.net/debian/ $DIST-backports $COMPONENTS"
fi
+# Local package repository, see, see, see, see
+# https://wiki.debian.org/AutomateBackports
+# https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build
+if [ ! -z "$LOCALDEBS" ]; then
+ if [ ! -z "$OTHERMIRROR" ]; then
+ OTHERMIRROR="$OTHERMIRROR | deb file://${LOCALDEBS} ./"
+ else
+ OTHERMIRROR="deb file://${LOCALDEBS} ./"
+ fi
+fi
+
# Ensure a sane TMP for building packages
TMP="/tmp"
# Multiple pbuilders
# https://wiki.ubuntu.com/PbuilderHowto#Multiple_pbuilders
# https://wiki.debian.org/cowbuilder#Building_your_package_for_many_distributions_at_once
-BASEPATH="/var/cache/pbuilder/$DIST-$ARCH/base.cow/"
-BUILDRESULT="/var/cache/pbuilder/$DIST-$ARCH/result/"
-APTCACHE="/var/cache/pbuilder/$DIST-$ARCH/aptcache/"
-BUILDPLACE="/var/cache/pbuilder/build/"
+BASEPATH=${BASEPATH:=/var/cache/pbuilder/$DIST-$ARCH/base.cow/}
+BUILDRESULT=${BUILDRESULT:=/var/cache/pbuilder/$DIST-$ARCH/result/}
+APTCACHE=${APTCACHE:=/var/cache/pbuilder/$DIST-$ARCH/aptcache/}
+BUILDPLACE=${BUILDPLACE:=/var/cache/pbuilder/build/}