makepkg: Introduce $SRCPKGDEST
Introduce $SRCPKGDEST to define a destination dir for source packages instead of saving them in $PKGDEST with binary packages. The simple patch doesn't break old behavior. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a6cca6e456
commit
afc37c58c7
2 changed files with 7 additions and 2 deletions
|
@ -91,6 +91,8 @@ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
||||||
#PKGDEST=/home/packages
|
#PKGDEST=/home/packages
|
||||||
#-- Source cache: specify a fixed directory where source files will be cached
|
#-- Source cache: specify a fixed directory where source files will be cached
|
||||||
#SRCDEST=/home/sources
|
#SRCDEST=/home/sources
|
||||||
|
#-- Source packages: specify a fixed directory where all src packages will be placed
|
||||||
|
#SRCPKGDEST=/home/srcpackages
|
||||||
#-- Packager: name/email of the person or organization building packages
|
#-- Packager: name/email of the person or organization building packages
|
||||||
#PACKAGER="John Doe <john@doe.com>"
|
#PACKAGER="John Doe <john@doe.com>"
|
||||||
|
|
||||||
|
|
|
@ -1108,7 +1108,7 @@ create_srcpackage() {
|
||||||
"$SRCEXT" ;;
|
"$SRCEXT" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
local pkg_file="$PKGDEST/${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}"
|
local pkg_file="$SRCPKGDEST/${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}"
|
||||||
|
|
||||||
# tar it up
|
# tar it up
|
||||||
msg2 "$(gettext "Compressing source package...")"
|
msg2 "$(gettext "Compressing source package...")"
|
||||||
|
@ -1575,6 +1575,7 @@ done
|
||||||
#preserve environment variables
|
#preserve environment variables
|
||||||
_PKGDEST=${PKGDEST}
|
_PKGDEST=${PKGDEST}
|
||||||
_SRCDEST=${SRCDEST}
|
_SRCDEST=${SRCDEST}
|
||||||
|
_SRCPKGDEST=${SRCPKGDEST}
|
||||||
|
|
||||||
# default config is makepkg.conf
|
# default config is makepkg.conf
|
||||||
MAKEPKG_CONF=${MAKEPKG_CONF:-$confdir/makepkg.conf}
|
MAKEPKG_CONF=${MAKEPKG_CONF:-$confdir/makepkg.conf}
|
||||||
|
@ -1613,6 +1614,8 @@ PKGDEST=${_PKGDEST:-$PKGDEST}
|
||||||
PKGDEST=${PKGDEST:-$startdir} #default to $startdir if undefined
|
PKGDEST=${PKGDEST:-$startdir} #default to $startdir if undefined
|
||||||
SRCDEST=${_SRCDEST:-$SRCDEST}
|
SRCDEST=${_SRCDEST:-$SRCDEST}
|
||||||
SRCDEST=${SRCDEST:-$startdir} #default to $startdir if undefined
|
SRCDEST=${SRCDEST:-$startdir} #default to $startdir if undefined
|
||||||
|
SRCPKGDEST=${_SRCPKGDEST:-$SRCPKGDEST}
|
||||||
|
SRCPKGDEST=${SRCPKGDEST:-$PKGDEST} #default to $PKGDEST if undefined
|
||||||
|
|
||||||
|
|
||||||
if (( HOLDVER )) && [[ -n $FORCE_VER ]]; then
|
if (( HOLDVER )) && [[ -n $FORCE_VER ]]; then
|
||||||
|
@ -1838,7 +1841,7 @@ msg "$(gettext "Making package: %s")" "$pkgbase $pkgver-$pkgrel ($(date))"
|
||||||
|
|
||||||
# if we are creating a source-only package, go no further
|
# if we are creating a source-only package, go no further
|
||||||
if (( SOURCEONLY )); then
|
if (( SOURCEONLY )); then
|
||||||
if [[ -f $PKGDEST/${pkgbase}-${pkgver}-${pkgrel}${SRCEXT} ]] \
|
if [[ -f $SRCPKGDEST/${pkgbase}-${pkgver}-${pkgrel}${SRCEXT} ]] \
|
||||||
&& (( ! FORCE )); then
|
&& (( ! FORCE )); then
|
||||||
error "$(gettext "A source package has already been built. (use -f to overwrite)")"
|
error "$(gettext "A source package has already been built. (use -f to overwrite)")"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue