summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibremakepkg19
-rwxr-xr-xlibrerepkg5
2 files changed, 18 insertions, 6 deletions
diff --git a/libremakepkg b/libremakepkg
index bac9e30..292e4b5 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -22,6 +22,13 @@
source /etc/libretools.conf
source /etc/makepkg.conf
+# Local vars may differ from chroot's
+LOCALPKGDEST=${PKGDEST}
+LOCALSRCDEST=${SRCDEST}
+LOCALSRCPKGDEST=${SRCPKGDEST}
+
+source ${CHROOTDIR}/${CHROOT}/etc/makepkg.conf
+
function usage { # Display message and exit
echo 'cd to a dir containing a PKGBUILD and run:'
@@ -42,10 +49,14 @@ function usage { # Display message and exit
function buildenv { # Mounts *DEST from makepkg.conf
msg "Building env"
- for mp in ${SRCDEST} ${PKGDEST} ${SRCPKGDEST}; do
- msg2 "binding ${mp} to ${CHROOTDIR}/${CHROOT}${mp}"
- mkdir -p "${CHROOTDIR}/${CHROOT}${mp}"
- mount -o bind ${mp} "${CHROOTDIR}/${CHROOT}${mp}" || exit 1
+ for mp in SRCDEST PKGDEST SRCPKGDEST; do
+# The host system directory
+ lmp=LOCAL${mp}
+
+ msg2 "Binding ${!lmp} to ${CHROOTDIR}/${CHROOT}${!mp}"
+
+ mkdir -p "${CHROOTDIR}/${CHROOT}${!mp}"
+ mount -o bind ${!lmp} "${CHROOTDIR}/${CHROOT}${!mp}" || exit 1
done
}
diff --git a/librerepkg b/librerepkg
index 647a7c0..706b603 100755
--- a/librerepkg
+++ b/librerepkg
@@ -36,7 +36,7 @@ source rePKGBUILD
usage() {
echo "cd to a dir with a rePKGBUILD and other file info and run"
- echo "$0 "
+ echo "$0 [makepkg flags]"
echo
echo "This script will repackage an arch package without compiling"
}
@@ -44,6 +44,7 @@ usage() {
while getopts 'h' arg; do
case $arg in
h) usage; exit 0 ;;
+ *) makepkgflags=$@ ;;
esac
done
@@ -58,6 +59,6 @@ msg2 "Updating md5sums"
makepkg -gp rePKGBUILD >> rePKGBUILD
msg "Repackaging using makepkg"
-makepkg -Lcdp rePKGBUILD $@
+makepkg -Lcdp rePKGBUILD ${makepkgflags}
stdnull popd ${tempdir}