diff --git a/Makefile b/Makefile index 1a75298..02c62cf 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -V=20141004 +V=20141005 PREFIX = /usr/local @@ -12,11 +12,10 @@ BINPROGS = \ bin/mkchroot \ bin/mkchrootpkg \ bin/build-set \ - bin/build-set-helper \ bin/basestrap \ bin/manjaro-chroot \ bin/fstabgen - + SYSCONFIGFILES = \ conf/manjaro-tools.conf @@ -34,7 +33,8 @@ CONFIGFILES = \ conf/pacman-mirrors.conf \ conf/pacman-multilib.conf LIBS = \ - lib/functions.sh + lib/functions.sh \ + lib/build-set-helper.sh all: $(BINPROGS) diff --git a/bin/build-set.in b/bin/build-set.in index 2b6fa9f..32b92fa 100644 --- a/bin/build-set.in +++ b/bin/build-set.in @@ -16,7 +16,7 @@ export LC_MESSAGES=C shopt -s nullglob -version=20141003 +version=20141005 arch=$(uname -m) pacman_conf_arch='default' @@ -51,18 +51,19 @@ else profiledir='@sysconfdir@/sets' fi -if [[ -f ~/.makepkg.conf ]];then - . ~/.makepkg.conf -else - if [[ -r /etc/makepkg.conf ]]; then - . /etc/makepkg.conf - fi +if [[ -r /etc/makepkg.conf ]]; then + . /etc/makepkg.conf fi if [[ -n ${pkgdir} ]];then pkgdir=${pkgdir} +elif [[ -n $PKGDEST ]];then + pkgdir=$PKGDEST else - pkgdir=$(pwd)/packages + pkgdir=/var/cache/manjaro-tools/pkg + if ! [[ -d ${pkgdir} ]];then + mkdir -p ${pkgdir} + fi fi clean_first=false @@ -80,7 +81,6 @@ base_packages=('base-devel') mkmanjaroroot_args=() makechrootpkg_args=() makepkg_args=() -misc_args=() profiles=$(get_profiles) @@ -187,8 +187,6 @@ if ${verbose};then msg2 "pkgdir: ${pkgdir}" msg2 "PKGDEST: ${PKGDEST}" - misc_args+=(-v) - fi if ${clean_rundir}; then @@ -205,13 +203,6 @@ if ${clean_rundir}; then fi fi -if [[ -n $PKGDEST ]];then - pkgdir=$PKGDEST -else - pkgdir=${pkgdir}/${arch} - mkdir -p ${misc_args[*]} ${pkgdir} -fi - if [[ $EUID != 0 ]]; then die 'This script must be run as root.' else @@ -222,4 +213,6 @@ else fi fi -. build-set-helper +if [[ -r @libdir@/build-set-helper.sh ]];then + source @libdir@/build-set-helper.sh +fi diff --git a/conf/manjaro-tools.conf b/conf/manjaro-tools.conf index 6cbfc07..e17086f 100644 --- a/conf/manjaro-tools.conf +++ b/conf/manjaro-tools.conf @@ -11,7 +11,7 @@ # pkgdir where to copy pkgs # If makepkg.conf has PGKDEST set, this path will be set to $PKGDEST -# pkgdir= +# pkgdir=/var/cache/manjaro-tools/pkg # default set; name without .set suffix # profile=default diff --git a/bin/build-set-helper.in b/lib/build-set-helper.sh similarity index 59% rename from bin/build-set-helper.in rename to lib/build-set-helper.sh index a2f2225..a7dba77 100644 --- a/bin/build-set-helper.in +++ b/lib/build-set-helper.sh @@ -8,31 +8,31 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -cp_profile_pkgs(){ - for pkg in $(cat ${profiledir}/$1.set); do - cp_pkg $pkg - done -} - -cp_pkg(){ - msg2 "Copying $1 to ${pkgdir}" - cd $1 - cp ${misc_args[*]} *.pkg.tar.xz ${pkgdir} - cd .. -} - -cp_pkgs(){ - msg "Copying packages ..." - eval "case ${profile} in - $profiles) - cp_profile_pkgs ${profile} - ;; - *) - cp_pkg ${profile} - ;; - esac" - msg "Finished copying" -} +# cp_profile_pkgs(){ +# for pkg in $(cat ${profiledir}/$1.set); do +# cp_pkg $pkg +# done +# } +# +# cp_pkg(){ +# msg2 "Copying $1 to ${pkgdir}" +# cd $1 +# cp ${misc_args[*]} *.pkg.tar.xz ${pkgdir} +# cd .. +# } +# +# cp_pkgs(){ +# msg "Copying packages ..." +# eval "case ${profile} in +# $profiles) +# cp_profile_pkgs ${profile} +# ;; +# *) +# cp_pkg ${profile} +# ;; +# esac" +# msg "Finished copying" +# } repo_create(){ cd ${pkgdir} @@ -40,7 +40,7 @@ repo_create(){ cd .. } -cp_pkgs ${profile} +#cp_pkgs ${profile} if ${repo}; then cd ${pkgdir}