summaryrefslogtreecommitdiff
path: root/src/chroot-tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-xsrc/chroot-tools/libremakepkg17
-rwxr-xr-xsrc/chroot-tools/libremakepkg.gpl24
2 files changed, 13 insertions, 8 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index d661714..b6c84c1 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -117,12 +117,14 @@ usage() {
echo 'This script will build your package in a chroot.'
echo ''
echo 'OPTIONS:'
- echo ' -h Show this message'
+ echo " -n <CHROOT> Use this chroot instead of \`$CHROOT'"
+ echo ' -l <COPY> Use this chroot copy instead of basing it'
+ echo ' on the username'
echo ''
+ echo " -m <MAKEPKG> Use the command MAKEPKG instead of 'makepkg'"
echo " -R Repackage"
- echo " -n <chroot> Use this chroot instead of \`$CHROOT'"
- echo ' -l <copy> Use this chroot copy instead of basing it'
- echo ' on the username'
+ echo ''
+ echo ' -h Show this message'
}
main() {
@@ -130,14 +132,17 @@ main() {
CHROOTCOPY=$LIBREUSER
[[ $CHROOTCOPY != root ]] || CHROOTCOPY=copy
+
makepkg_args=(-s --noconfirm -L)
REPACKAGE=false
+ MAKEPKG=makepkg
- while getopts 'hRn:l:' arg ; do
+ while getopts 'n:l:m:Rh' arg ; do
case "${arg}" in
n) CHROOT=$OPTARG;;
l) CHROOTCOPY=$OPTARG;;
- R) REPACKAGE=true; makepkg_args+=(-R) ;;
+ m) MAKEPKG=$OPTARG;;
+ R) REPACKAGE=true; makepkg_args+=(-R);;
h) usage; exit 0;;
*) usage; exit 1;;
esac
diff --git a/src/chroot-tools/libremakepkg.gpl2 b/src/chroot-tools/libremakepkg.gpl2
index 8ca60e0..1f2d185 100755
--- a/src/chroot-tools/libremakepkg.gpl2
+++ b/src/chroot-tools/libremakepkg.gpl2
@@ -69,7 +69,7 @@ chroot_extract() {
echo '. /etc/profile' >> "$file"
echo 'export HOME=/build' >> "$file"
echo 'cd /build' >> "$file"
- echo "sudo -u nobody ${MAKEPKG:-makepkg} $makepkg_args -o" >> "$file"
+ echo "sudo -u nobody ${MAKEPKG} $makepkg_args -o" >> "$file"
chmod 755 "$file"
archroot "$copydir" -r /chrootextract
}
@@ -80,7 +80,7 @@ chroot_build() {
echo '. /etc/profile' >> "$file"
echo 'export HOME=/build' >> "$file"
echo 'cd /build' >> "$file"
- echo "sudo -u nobody ${MAKEPKG:-makepkg} $makepkg_args -e" >> "$file"
+ echo "sudo -u nobody ${MAKEPKG} $makepkg_args -e" >> "$file"
chmod 755 "$file"
archroot -N "$copydir" -r /chrootbuild
}