From 12aa89f0d30bfcefdc2dc8a0dabf612d5ce5c70e Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Wed, 22 Jun 2011 03:51:20 -0500 Subject: eliminated function "install" --- libremakepkg | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'libremakepkg') diff --git a/libremakepkg b/libremakepkg index 1b0776b..98adb80 100755 --- a/libremakepkg +++ b/libremakepkg @@ -33,7 +33,6 @@ function usage { echo ' -c cleans the chroot before building.' echo ' -u updates the chroot before building.' echo ' -n use this dir instead of "${CHCOPY}".' - echo ' -I install this package, use it as many times needed.' echo ' -M <--arg> passes long args to makepkg, use it as many times as needed.' echo } @@ -41,14 +40,14 @@ function usage { function buildenv { msg "Building env" for mp in ${SRCDEST} ${PKGDEST} ${SRCPKGDEST} ${WORKDIR}; do - msg2 "binding /$mp" + msg2 "binding ${mp} to ${CHROOTDIR}/${CHCOPY}${mp}" mkdir -p "${CHROOTDIR}/${CHCOPY}${mp}" mount -o bind ${mp} "${CHROOTDIR}/${CHCOPY}${mp}" || exit 1 done for config in etc/makepkg.conf etc/pacman.conf etc/mtab; do - msg2 "copying config /$etc" - cp --remove-destination /$etc $CHROOTDIR/$CHCOPY/$etc || exit 1 + msg2 "copying config /$config to ${CHROOTDIR}/${CHCOPY}/${config}" + cp --remove-destination /${config} ${CHROOTDIR}/${CHCOPY}/${config} || exit 1 done } @@ -76,7 +75,6 @@ CLEAN_CACHE="" UPDATE_FIRST="n" USE_LOG='n' CHROOTNAME=${CHCOPY} -PKGINSTALL="" MAKEPKG_ARGS="" #libremakepkg own args @@ -88,12 +86,11 @@ while getopts ${libremakepkgargs} arg ; do case "${arg}" in h) usage; exit 0 ;; c) CLEAN_FIRST="y" ;; - u) update_first="y" ;; + u) UPDATE_FIRST="y" ;; n) chrootname="$OPTARG"; echo $chrootname ;; - I) PKGINSTALL+="-I $OPTARG " ;; M) MAKEPKG_ARGS+=" $OPTARG" ;; L) MAKEPKG_ARGS+=" -$arg $OPTARG" - use_log='y';; + USE_LOG='y';; *) MAKEPKG_ARGS+=" -$arg $OPTARG" ;; esac done @@ -113,14 +110,17 @@ pkgbuild-check-nonfree ||{ fi } +buildenv + if [ "${UPDATE_FIRST}" = y ]; then - msg "Updating the chroot in use" + msg "Updating the chroot in use..." # -c option in mkarchroot indicates cache mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOTNAME}" fi if [ "${CLEAN_FIRST}" = y ]; then msg "Cleaning ..." + plain "making list of packages in ${CHROOTDIR}/${CHROOTNAME}/root/" cp "/etc/libretools.d/cleansystem" "${CHROOTDIR}/${CHROOTNAME}/root/" (cat < "${CHROOTDIR}/${CHROOTNAME}/clean" - mkarchroot -r "/clean" "${CHROOTDIR}/${CHROOTNAME}" - -fi + mkarchroot -r "/clean" "${CHROOTDIR}/${CHROOTNAME}" -if [ -n ${PKGINSTALL} ]; then - msg "Installing packages" - makechrootpkg -r ${PKGINSTALL} "${CHROOTDIR}/${CHROOTNAME}" fi -buildenv - msg "Creating the package" makechrootpkg -r ${CHROOTDIR} -l "${chrootname}" -- ${MAKEPKG_ARGS} ev=$? # exit value -- cgit v1.2.3-54-g00ecf