=== modified file 'doc/makepkg.8.in' --- doc/makepkg.8.in +++ doc/makepkg.8.in @@ -262,8 +262,8 @@ The \fIsource\fP line is an array of source files required to build the package. Source files must reside in the same directory as the PKGBUILD file, unless they have a fully-qualified URL. Then if the source file -does not already exist in /var/cache/pacman/src, the file is downloaded -by wget. +does not already exist in $SRCDEST ($startdir unless set in makepkg.conf), +the file is downloaded by wget. .TP .B md5sums \fI(array)\fP === modified file 'etc/makepkg.conf' --- etc/makepkg.conf +++ etc/makepkg.conf @@ -30,6 +30,8 @@ # Specify a fixed directory where all packages will be placed #export PKGDEST=/home/packages +# Similar, but for source files +#export SRCDEST=/var/cache/pacman/src # If you want your name to show up in the packages you build, set this. #export PACKAGER="John Doe " === modified file 'scripts/makepkg' --- scripts/makepkg +++ scripts/makepkg @@ -20,9 +20,10 @@ # USA. # -myver='2.9.7' +myver='2.9.9' startdir=`pwd` PKGDEST=$startdir +SRCDEST=$startdir USE_COLOR="n" # source Arch's abs.conf if it's present @@ -427,9 +428,9 @@ if [ -f ../$file ]; then msg " Found $file in build dir" cp ../$file . - elif [ -f /var/cache/pacman/src/$file ]; then + elif [ -f $SRCDEST/$file ]; then msg " Using local copy of $file" - cp /var/cache/pacman/src/$file . + cp $SRCDEST/$file . else # check for a download utility if [ -z "$FTPAGENT" ]; then @@ -456,10 +457,14 @@ msg "Aborting..." exit 1 fi - if [ "`id -u`" = "0" -a "$INFAKEROOT" != "1" ]; then - mkdir -p /var/cache/pacman/src && cp $file /var/cache/pacman/src + if mkdir -p $SRCDEST 2&>/dev/null; then + if ! cp $file $SRCDEST 2&>/dev/null; then + warning "Cannot copy $file to $SRCDEST" + plain "Check the permissions for $SRCDEST" + fi else - cp $file .. + warning "Cannot create $SRCDEST" + plain "Adjust SRCDEST in /etc/makepkg.conf to another directory." fi fi done