1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-11 20:05:07 -05:00

scripts/makepkg.in: Various clean ups.

* etc/makepkg.conf.in: Add description for xdelta.
* doc/makepkg.conf.5: Add description for xdelta.
* scripts/makepkg.in: Various clean ups.

Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Andrew Fyfe 2007-06-01 15:28:52 +01:00 committed by Dan McGee
parent 85fbf528bb
commit 7f153b729f
3 changed files with 35 additions and 32 deletions

View File

@ -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 This is often used to set the number of jobs used, for example, "-j2". Other
flags that make accepts can also be passed. flags that make accepts can also be passed.
.TP .TP
.B BUILDENV=(fakeroot !distcc color !ccache) .B BUILDENV=(fakeroot !distcc color !ccache !xdelta)
This array contains four options that affect the build environment, the This array contains options that affect the build environment, the defaults
defaults are shown here. All options should always be left in the array; to are shown here. All options should always be left in the array; to enable or
enable or disable an option simply remove or place an "!" at the front of the disable an option simply remove or place an "!" at the front of the option.
option. Each works as follows: Each works as follows:
.RS .RS
.TP .TP
.B fakeroot .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 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 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. 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 .RE
.TP .TP
.B DISTCC_HOSTS="\fIhost1 ...\fP" .B DISTCC_HOSTS="\fIhost1 ...\fP"

View File

@ -38,13 +38,14 @@ CXXFLAGS="-@ARCHSWITCH@=@CARCHFLAGS@ -mtune=generic -O2 -pipe"
# BUILD ENVIRONMENT # 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. # A negated environment option will do the opposite of the comments below.
# #
#-- fakeroot: Allow building packages as a non-root user #-- fakeroot: Allow building packages as a non-root user
#-- distcc: Use the Distributed C/C++/ObjC compiler #-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages #-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation #-- ccache: Use ccache to cache compilation
#-- xdelta: Generate delta patch from previous to current package
# #
BUILDENV=(fakeroot !distcc color !ccache !xdelta) BUILDENV=(fakeroot !distcc color !ccache !xdelta)
# #

View File

@ -28,28 +28,15 @@
# gettext initialization # gettext initialization
source gettext.sh source gettext.sh
export TEXTDOMAIN='pacman'
TEXTDOMAIN=makepkg export TEXTDOMAINDIR='@localedir@'
export TEXTDOMAIN
TEXTDOMAINDIR='@localedir@'
export TEXTDOMAINDIR
myver='@PACKAGE_VERSION@' myver='@PACKAGE_VERSION@'
startdir="$(pwd)" confdir='@sysconfdir@'
startdir="$PWD"
srcdir="$startdir/src" srcdir="$startdir/src"
pkgdir="$startdir/pkg" 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 # Options
ASROOT=0 ASROOT=0
CLEANUP=0 CLEANUP=0
@ -198,6 +185,7 @@ getdownloadclient() {
local proto=$(echo $netfile | sed 's|://.*||') local proto=$(echo $netfile | sed 's|://.*||')
# loop through DOWNLOAD_AGENTS variable looking for protocol # loop through DOWNLOAD_AGENTS variable looking for protocol
local i
for i in "${DLAGENTS[@]}"; do for i in "${DLAGENTS[@]}"; do
local handler=$(echo $i | sed 's|::.*||') local handler=$(echo $i | sed 's|::.*||')
if [ "$proto" == "$handler" ]; then if [ "$proto" == "$handler" ]; then
@ -208,7 +196,7 @@ getdownloadclient() {
# if we didn't find an agent, return an error # if we didn't find an agent, return an error
if [ -z "$agent" ]; then 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...")" error "$(gettext "Aborting...")"
exit 1 # $E_CONFIG_ERROR # TODO: error code exit 1 # $E_CONFIG_ERROR # TODO: error code
fi fi
@ -643,19 +631,18 @@ create_srcpackage() {
msg2 "$(gettext "Adding install script")" msg2 "$(gettext "Adding install script")"
comp_files="$comp_files $install" comp_files="$comp_files $install"
else else
error "$(gettext "Install script $install not found.")" error "$(gettext "Install script %s not found.")" "$install"
fi fi
fi fi
local i local i
for i in ${source[@]}; do for i in ${source[@]}; do
if [ -f $i ]; then if [ -f $i ]; then
msg2 "$(gettext "Adding %s")" $i msg2 "$(gettext "Adding %s")" "$i"
comp_files="$comp_files $i" comp_files="$comp_files $i"
fi fi
done done
# TODO make package extension configurable like $PKGEXT
local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}"
# tar it up # tar it up
@ -729,14 +716,12 @@ _PKGDEST=${PKGDEST}
_SRCDEST=${SRCDEST} _SRCDEST=${SRCDEST}
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
conffile="@sysconfdir@/makepkg.conf" if [ -r "$confdir/makepkg.conf" ]; then
if [ -r $conffile ]; then source "$condir/makepkg.conf"
source $conffile
else 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 exit 1 # $E_CONFIG_ERROR # TODO: error codes
fi fi
unset conffile
# Source user-specific makepkg.conf overrides # Source user-specific makepkg.conf overrides
if [ -r ~/.makepkg.conf ]; then if [ -r ~/.makepkg.conf ]; then
@ -749,6 +734,17 @@ 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
# 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 while [ "$#" -ne "0" ]; do
case $1 in case $1 in
# pacman # pacman