summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-12-20 21:54:15 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-12-20 21:54:15 -0600
commit6a56fa9179e7ce08b5bbaf4407c0d1a10aabde08 (patch)
treeedf1ad5f14e8362dc25f998ca35935f2370960ec /libremakepkg
parent5f1ef1bd95e2aa1d5b596d929e12e55e8f00f3d2 (diff)
parentcccba27ea8ec823a9768ba2cd944edab53697bb1 (diff)
Merge branch 'master' of gitpar:libretools
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg19
1 files changed, 15 insertions, 4 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
}