1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 08:18:51 -05:00
* Added these three possible options (or !options, more likely), to the
  PKGBUILD possibilities:
  - ccache
  - distcc
  - makeflags
* Removed the --noccache and -j flags from makepkg as their functionality is
  better used by adding the above options to a PKGBUILD- keep the functionality
  where it is needed.

Testing would be appreciated, I didn't do much of that yet.
This commit is contained in:
Dan McGee 2007-02-23 19:51:24 +00:00
parent b3b773dcc5
commit c94bfbaba3
4 changed files with 37 additions and 28 deletions

View File

@ -59,7 +59,7 @@ multiple licenses are applicable for a package, list all of them:
Specifies a special install script that is to be included in the package. This Specifies a special install script that is to be included in the package. This
file should reside in the same directory as the \fB\*(PB\fP, and will be copied file should reside in the same directory as the \fB\*(PB\fP, and will be copied
into the package by \fBmakepkg\fP. It does not need to be included in the into the package by \fBmakepkg\fP. It does not need to be included in the
\fIsource\fP array. (e.g. \fBinstall=pkgname.install\fP) \fIsource\fP array (e.g. \fBinstall=pkgname.install\fP).
.TP .TP
.B source \fI(array)\fP .B source \fI(array)\fP
@ -99,8 +99,8 @@ one could install all KDE packages by installing the 'kde' group.
.TP .TP
.B arch \fI(array)\fP .B arch \fI(array)\fP
Defines on which architectures the given package is available. (e.g. Defines on which architectures the given package is available (e.g.
\fBarch=('i686' 'x86_64')\fP) \fBarch=('i686' 'x86_64')\fP).
.TP .TP
.B backup \fI(array)\fP .B backup \fI(array)\fP
@ -166,6 +166,20 @@ Leave libtool (.la) files in packages. Specify "!libtool" to remove them.
.B emptydirs .B emptydirs
Leave empty directories in packages. Leave empty directories in packages.
.TP .TP
.B ccache
Allow the use of \fBccache\fP during build. More useful in its negative form
"!ccache" with select packages that have problems building with \fBccache\fP.
.TP
.B distcc
Allow the use of \fBdistcc\fP during build. More useful in its negative form
"!distcc" with select packages that have problems building with \fBdistcc\fP.
.TP
.B makeflags
Allow the use of user-specific makeflags during build as specified in
\fBmakepkg.conf\fP. More useful in its negative form "!makeflags" with select
packages that have problems building with custom makeflags such as "-j2" (or
higher).
.TP
.B force .B force
Force the package to be upgraded by a \fBpacman\fP system upgrade operation, Force the package to be upgraded by a \fBpacman\fP system upgrade operation,
even if the version number would normally not trigger such an upgrade. This is even if the version number would normally not trigger such an upgrade. This is

View File

@ -32,10 +32,6 @@ build-time or run-time dependencies, it will look for the dependencies'
them it will call \fBmakepkg\fP to build and install the missing dependencies. them it will call \fBmakepkg\fP to build and install the missing dependencies.
The child calls will be made with the \fB-b\fP and \fB-i\fP options. The child calls will be made with the \fB-b\fP and \fB-i\fP options.
.TP .TP
.B \-B, --noccache
Disable the use of \fBccache\fP during build (useful for select packages that
have problems with \fBccache\fP).
.TP
.B \-c, --clean .B \-c, --clean
Clean up leftover work files and directories after a successful build. Clean up leftover work files and directories after a successful build.
.TP .TP
@ -72,10 +68,6 @@ Output syntax and command line options.
.B \-i, --install .B \-i, --install
Install or upgrade the package after a successful build using \fBpacman\fP. Install or upgrade the package after a successful build using \fBpacman\fP.
.TP .TP
.B \-j \fIjobs\fP
Sets MAKEFLAGS="-j\fIjobs\fP" before building the package. This is useful for
overriding the \fIMAKEFLAGS\fP setting in \fBmakepkg.conf\fP.
.TP
.B \-m, --nocolor .B \-m, --nocolor
Disable color in output messages. Disable color in output messages.
.TP .TP

View File

@ -68,8 +68,7 @@ Colorize output messages, making output easier to read.
.B ccache .B ccache
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 passing the \fB-B\fP or \fB--noccache\fP flag to individual packages by placing \fB!ccache\fP in the \fB\*(PB\fP options array.
\fBmakepkg\fP.
.RE .RE
.TP .TP
.B DISTCC_HOSTS="\fIhost1 ...\fP" .B DISTCC_HOSTS="\fIhost1 ...\fP"

View File

@ -356,7 +356,6 @@ usage() {
echo echo
echo "Options:" echo "Options:"
echo " -b, --builddeps Build missing dependencies from source" echo " -b, --builddeps Build missing dependencies from source"
echo " -B, --noccache Do not use ccache during build"
echo " -c, --clean Clean up work files after build" echo " -c, --clean Clean up work files after build"
echo " -C, --cleancache Clean up source files from the cache" echo " -C, --cleancache Clean up source files from the cache"
echo " -d, --nodeps Skip all dependency checks" echo " -d, --nodeps Skip all dependency checks"
@ -365,7 +364,6 @@ usage() {
echo " -g, --geninteg Generate integrity checks for source files" echo " -g, --geninteg Generate integrity checks for source files"
echo " -h, --help This help" echo " -h, --help This help"
echo " -i, --install Install package after successful build" echo " -i, --install Install package after successful build"
echo " -j <jobs> Set MAKEFLAGS to \"-j<jobs>\" before building"
echo " -L, --log Log package build process" echo " -L, --log Log package build process"
echo " -m, --nocolor Disable colorized output messages" echo " -m, --nocolor Disable colorized output messages"
echo " -o, --nobuild Download and extract files only" echo " -o, --nobuild Download and extract files only"
@ -421,7 +419,6 @@ while [ "$#" -ne "0" ]; do
--syncdeps) DEP_BIN=1 ;; --syncdeps) DEP_BIN=1 ;;
--usesudo) SUDO=1 ;; --usesudo) SUDO=1 ;;
--builddeps) DEP_SRC=1 ;; --builddeps) DEP_SRC=1 ;;
--noccache) USE_CCACHE="n" ;;
--nodeps) NODEPS=1 ;; --nodeps) NODEPS=1 ;;
--noextract) NOEXTRACT=1 ;; --noextract) NOEXTRACT=1 ;;
--install) INSTALL=1 ;; --install) INSTALL=1 ;;
@ -441,10 +438,9 @@ while [ "$#" -ne "0" ]; do
exit 1 exit 1
;; ;;
-*) -*)
while getopts "bBcCdefghij:Lmop:rRsS-" opt; do while getopts "bcCdefghiLmop:rRsS-" opt; do
case $opt in case $opt in
b) DEP_SRC=1 ;; b) DEP_SRC=1 ;;
B) USE_CCACHE="n" ;;
c) CLEANUP=1 ;; c) CLEANUP=1 ;;
C) CLEANCACHE=1 ;; C) CLEANCACHE=1 ;;
d) NODEPS=1 ;; d) NODEPS=1 ;;
@ -456,7 +452,6 @@ while [ "$#" -ne "0" ]; do
exit 0 exit 0
;; ;;
i) INSTALL=1 ;; i) INSTALL=1 ;;
j) export MAKEFLAGS="-j$OPTARG" ;;
L) LOGGING=1 ;; L) LOGGING=1 ;;
m) USE_COLOR="n" ;; m) USE_COLOR="n" ;;
o) NOBUILD=1 ;; o) NOBUILD=1 ;;
@ -524,7 +519,7 @@ fi
source $BUILDSCRIPT source $BUILDSCRIPT
# check for no-no's # check for no-no's in the build script
if [ -z "$pkgver" ]; then if [ -z "$pkgver" ]; then
error "pkgver is not allowed to be empty." error "pkgver is not allowed to be empty."
exit 1 exit 1
@ -553,7 +548,8 @@ if [ "$install" -a ! -f "$install" ]; then
exit 1 exit 1
fi fi
if [ -f $PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.${PKGEXT} -a "$FORCE" = "0" -a "$GENINTEG" = "0" ]; then if [ -f $PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.${PKGEXT}
-a "$FORCE" = "0" -a "$GENINTEG" = "0" ]; then
if [ "$INSTALL" = "1" ]; then if [ "$INSTALL" = "1" ]; then
warning "a package has already been built, installing existing package." warning "a package has already been built, installing existing package."
installpackage installpackage
@ -564,8 +560,9 @@ if [ -f $PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.${PKGEXT} -a "$FORCE" =
fi fi
fi fi
# Enter the fakeroot environment if necessary. This will call the makepkg script again # Enter the fakeroot environment if necessary. This will call the makepkg
# as the fake root user. We detect this by passing a sentinel option (-F) to makepkg # script again as the fake root user. We detect this by passing a sentinel
# option (-F) to makepkg.
if [ "$EUID" != "0" ]; then if [ "$EUID" != "0" ]; then
if [ "$(check_buildenv fakeroot)" = "y" ]; then if [ "$(check_buildenv fakeroot)" = "y" ]; then
if [ $(type -p fakeroot) ]; then if [ $(type -p fakeroot) ]; then
@ -819,17 +816,24 @@ else
fi fi
mkdir -p $startdir/pkg mkdir -p $startdir/pkg
# use distcc if requested # use distcc if it is requested (check buildenv and PKGBUILD opts)
if [ "$(check_buildenv distcc)" = "y" ]; then if [ "$(check_buildenv distcc)" = "y" -a "$(check_option distcc)" != "n" ]; then
[ -d /usr/lib/distcc/bin ] && export PATH=/usr/lib/distcc/bin:$PATH [ -d /usr/lib/distcc/bin ] && export PATH=/usr/lib/distcc/bin:$PATH
else if [ "$(check_option distcc)" = "n" ]; then
# if it is not wanted, clear the makeflags too
export MAKEFLAGS=""
fi fi
# use ccache if it's available # use ccache if it is requested (check buildenv and PKGBUILD opts)
# USE_CCACHE still here because it is a command line option if [ "$(check_buildenv ccache)" = "y" -a "$(check_option ccache)" != "n" ]; then
if [ ! "$USE_CCACHE" = "n" -a "$(check_buildenv ccache)" = "y" ]; then
[ -d /usr/lib/ccache/bin ] && export PATH=/usr/lib/ccache/bin:$PATH [ -d /usr/lib/ccache/bin ] && export PATH=/usr/lib/ccache/bin:$PATH
fi fi
# clear user-specified makeflags if requested
if [ "$(check_option makeflags)" = "n" ]; then
export MAKEFLAGS=""
fi
# build # build
msg "Starting build()..." msg "Starting build()..."