diff options
-rw-r--r-- | doc/makepkg.conf.5 | 16 | ||||
-rw-r--r-- | etc/makepkg.conf.in | 3 | ||||
-rw-r--r-- | scripts/makepkg.in | 48 |
3 files changed, 35 insertions, 32 deletions
diff --git a/doc/makepkg.conf.5 b/doc/makepkg.conf.5 index 23fc1d1f..08be3fc8 100644 --- a/doc/makepkg.conf.5 +++ b/doc/makepkg.conf.5 @@ -48,11 +48,11 @@ Flags used for the C++ compiler; see \fBCFLAGS\fP for more info. This is often used to set the number of jobs used, for example, "-j2". Other flags that make accepts can also be passed. .TP -.B BUILDENV=(fakeroot !distcc color !ccache) -This array contains four options that affect the build environment, the -defaults are shown here. All options should always be left in the array; to -enable or disable an option simply remove or place an "!" at the front of the -option. Each works as follows: +.B BUILDENV=(fakeroot !distcc color !ccache !xdelta) +This array contains options that affect the build environment, the defaults +are shown here. All options should always be left in the array; to enable or +disable an option simply remove or place an "!" at the front of the option. +Each works as follows: .RS .TP .B fakeroot @@ -69,6 +69,12 @@ Colorize output messages, making output easier to read. Use ccache to cache compilation by default. This allows for faster compiles if you are continuously recompiling the same packages. It can be disabled for individual packages by placing \fB!ccache\fP in the \fB\*(PB\fP options array. +.TP +.B xdelta +Generate delta patch from previous to current package. This is mainly useful +for large package upgrades that have only minor changes between versions where +a binary diff will be a much smaller download. This is only useful if using +the xdelta download script for pacman. .RE .TP .B DISTCC_HOSTS="\fIhost1 ...\fP" diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index 049fd178..615ad440 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -38,13 +38,14 @@ CXXFLAGS="-@ARCHSWITCH@=@CARCHFLAGS@ -mtune=generic -O2 -pipe" # BUILD ENVIRONMENT ######################################################################### # -# Defaults: BUILDENV=(fakeroot !distcc color !ccache) +# Defaults: BUILDENV=(fakeroot !distcc color !ccache !xdelta) # A negated environment option will do the opposite of the comments below. # #-- fakeroot: Allow building packages as a non-root user #-- distcc: Use the Distributed C/C++/ObjC compiler #-- color: Colorize output messages #-- ccache: Use ccache to cache compilation +#-- xdelta: Generate delta patch from previous to current package # BUILDENV=(fakeroot !distcc color !ccache !xdelta) # diff --git a/scripts/makepkg.in b/scripts/makepkg.in index 2eccbba7..f532f84b 100644 --- a/scripts/makepkg.in +++ b/scripts/makepkg.in @@ -28,28 +28,15 @@ # gettext initialization source gettext.sh - -TEXTDOMAIN=makepkg -export TEXTDOMAIN -TEXTDOMAINDIR='@localedir@' -export TEXTDOMAINDIR +export TEXTDOMAIN='pacman' +export TEXTDOMAINDIR='@localedir@' myver='@PACKAGE_VERSION@' -startdir="$(pwd)" +confdir='@sysconfdir@' +startdir="$PWD" srcdir="$startdir/src" pkgdir="$startdir/pkg" -# Only use ABSROOT if we haven't been passed a SRCROOT on the command line. -if [ -z "$SRCROOT" ]; then - if [ -r @sysconfdir@/abs/abs.conf ]; then - source @sysconfdir@/abs/abs.conf - fi - if [ -r ~/.abs.conf ]; then - source ~/.abs.conf - fi - SRCROOT=$ABSROOT -fi - # Options ASROOT=0 CLEANUP=0 @@ -198,6 +185,7 @@ getdownloadclient() { local proto=$(echo $netfile | sed 's|://.*||') # loop through DOWNLOAD_AGENTS variable looking for protocol + local i for i in "${DLAGENTS[@]}"; do local handler=$(echo $i | sed 's|::.*||') if [ "$proto" == "$handler" ]; then @@ -208,7 +196,7 @@ getdownloadclient() { # if we didn't find an agent, return an error if [ -z "$agent" ]; then - error "$(eval_gettext "There is no agent set up to handle \$proto URLs. Check makepkg.conf.")" + error "$(gettext "There is no agent set up to handle %s URLs. Check makepkg.conf.")" "$proto" error "$(gettext "Aborting...")" exit 1 # $E_CONFIG_ERROR # TODO: error code fi @@ -643,19 +631,18 @@ create_srcpackage() { msg2 "$(gettext "Adding install script")" comp_files="$comp_files $install" else - error "$(gettext "Install script $install not found.")" + error "$(gettext "Install script %s not found.")" "$install" fi fi local i for i in ${source[@]}; do if [ -f $i ]; then - msg2 "$(gettext "Adding %s")" $i + msg2 "$(gettext "Adding %s")" "$i" comp_files="$comp_files $i" fi done - # TODO make package extension configurable like $PKGEXT local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" # tar it up @@ -729,14 +716,12 @@ _PKGDEST=${PKGDEST} _SRCDEST=${SRCDEST} # Source makepkg.conf; fail if it is not found -conffile="@sysconfdir@/makepkg.conf" -if [ -r $conffile ]; then - source $conffile +if [ -r "$confdir/makepkg.conf" ]; then + source "$condir/makepkg.conf" else - error "$(gettext "%s not found. cannot continue")" $conffile + error "$(gettext "%s not found. cannot continue")" "$confdir/makepkg.conf" exit 1 # $E_CONFIG_ERROR # TODO: error codes fi -unset conffile # Source user-specific makepkg.conf overrides if [ -r ~/.makepkg.conf ]; then @@ -749,6 +734,17 @@ PKGDEST=${PKGDEST:-$startdir} #default to $startdir if undefined SRCDEST=${_SRCDEST:-$SRCDEST} SRCDEST=${SRCDEST:-$startdir} #default to $startdir if undefined +# Only use ABSROOT if we haven't been passed a SRCROOT on the command line. +if [ -z "$SRCROOT" ]; then + if [ -r "$confdir/abs/abs.conf" ]; then + source "$confdir/abs/abs.conf" + fi + if [ -r ~/.abs.conf ]; then + source ~/.abs.conf + fi + SRCROOT=$ABSROOT +fi + while [ "$#" -ne "0" ]; do case $1 in # pacman |