From fb71ad1e7fe24edcc142b8643f311c28073c5c03 Mon Sep 17 00:00:00 2001 From: Sébastien Luttringer Date: Wed, 2 Jan 2013 01:42:44 +0100 Subject: Allow makechroot options in archbuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow, by example, to easily build a package with a custom pkg. staging-x86_64-build -- -cI /var/cache/pacman/pkg/ldoc-1.2.0-1-any.pkg.tar.xz staging-x86_64-build -- -n Signed-off-by: Sébastien Luttringer Signed-off-by: Pierre Schmitz --- archbuild.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'archbuild.in') diff --git a/archbuild.in b/archbuild.in index 10d33b8..44288df 100644 --- a/archbuild.in +++ b/archbuild.in @@ -3,6 +3,7 @@ m4_include(lib/common.sh) base_packages=(base base-devel sudo) +makechrootpkg_args=(-c -n) cmd="${0##*/}" if [[ "${cmd%%-*}" == 'multilib' ]]; then @@ -18,13 +19,17 @@ chroots='/var/lib/archbuild' clean_first=false usage() { - echo "Usage: $cmd" + echo "Usage: $cmd [options] -- [makechrootpkg args]" + echo ' -h This help' echo ' -c Recreate the chroot before building' echo ' -r Create chroots in this directory' + echo '' + echo "Default makechrootpkg args: ${makechrootpkg_args[*]}" + echo '' exit 1 } -while getopts 'cr:' arg; do +while getopts 'hcr:' arg; do case "${arg}" in c) clean_first=true ;; r) chroots="$OPTARG" ;; @@ -32,7 +37,10 @@ while getopts 'cr:' arg; do esac done -if [[ "$EUID" != '0' ]]; then +# Pass all arguments after -- right to makepkg +makechrootpkg_args=("${@:$OPTIND}") + +if (( EUID )); then die 'This script must be run as root.' fi @@ -71,4 +79,4 @@ else fi msg "Building in chroot for [${repo}] (${arch})..." -exec setarch "${arch}" makechrootpkg -c -n -r "${chroots}/${repo}-${arch}" +exec setarch "${arch}" makechrootpkg "${makechrootpkg_args[@]}" -r "${chroots}/${repo}-${arch}" -- cgit v1.2.3-54-g00ecf From 10eba28151b1bf3ca5c29ccfb524f0cb85958c1d Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 22 Jan 2013 20:12:36 +0100 Subject: archbuild: fix default build flags --- Makefile | 2 +- archbuild.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'archbuild.in') diff --git a/Makefile b/Makefile index 3232773..f730f75 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -V=20130120 +V=20130122 PREFIX = /usr/local diff --git a/archbuild.in b/archbuild.in index 44288df..4054de7 100644 --- a/archbuild.in +++ b/archbuild.in @@ -38,7 +38,7 @@ while getopts 'hcr:' arg; do done # Pass all arguments after -- right to makepkg -makechrootpkg_args=("${@:$OPTIND}") +makechrootpkg_args+=("${@:$OPTIND}") if (( EUID )); then die 'This script must be run as root.' -- cgit v1.2.3-54-g00ecf