.TH makepkg 8 "January 30, 2006" "Frugalware Developer Manual" ""
.SH NAME
makepkg \- package build utility
.SH SYNOPSIS
\fBmakepkg [options]\fP
.SH DESCRIPTION
\fBmakepkg\fP will build packages for you.  All it needs is
a build-capable linux platform, wget, and some build scripts.  The advantage
to a script-based build is that you only really do the work once.  Once you
have the build script for a package, you just need to run makepkg and it
will do the rest: download and validate source files, check dependencies,
configure the buildtime settings, build the package, install the package
into a temporary root, make customizations, generate meta-info, and package
the whole thing up for \fBpacman\fP to use.

\fBmakeworld\fP can be used to rebuild an entire package group or the
entire build tree.  See \fBmakeworld --help\fP for syntax.

.SH OPTIONS
.TP
.B "\-b, \-\-builddeps"
Build missing dependencies from source.  When makepkg finds missing build-time or
run-time dependencies, it will look for the dependencies' FrugalBuild files under
$fst_root (set in your /etc/repoman.conf).  If it finds them it will
run another copy of makepkg to build and install the missing dependencies.
The child makepkg calls will be made with the \fB-b\fP and \fB-i\fP options.
.TP
.B "\-B, \-\-noccache"
Do not use ccache during build.
.TP
.B "\-c, \-\-clean"
Clean up leftover work files/directories after a successful build.
.TP
.B "\-C, \-\-cleancache"
Used with --chroot cleans up the chroot which means removing unnecessary
packages from it. If used twice, then it removes all source files from
the cache directory and cleans up the full compiler cache to free up diskspace.
.TP
.B "\-d, \-\-nodeps"
Do not perform any dependency checks.  This will let you override/ignore any
dependencies required.  There's a good chance this option will break the build
process if all of the dependencies aren't installed.
.TP
.B "\-D <pkgname>"
Clean up only one package's compiler cache. (Uses ccache -C.)
.TP
.B "\-e, \-\-noextract"
Do not extract source files.  Instead, use whatever already exists in the
src/ directory.  This is handy if you want to go into src and manually
patch/tweak code, then make a package out of the result.
.TP
.B "\-f, \-\-force"
\fBmakepkg\fP will not build a package if a \fIpkgname-pkgver-pkgrel-arch.fpm\fP
file already exists in the build directory.  You can override this behaviour with
the \fB--force\fP switch.
.TP
.B "\-G, \-\-genmd5"
Download all source files (if required) and use \fImd5sum\fP to generate md5 hashes
for each of them.  You can then redirect the output into your FrugalBuild for source
validation (makepkg -G >>FrugalBuild).
.TP
.B "\-g, \-\-gensha1"
Download all source files (if required) and use \fIsha1sum\fP to generate sha1 hashes
for each of them.  You can then redirect the output into your FrugalBuild for source
validation (makepkg -g >>FrugalBuild).
.TP
.B "\-h, \-\-help"
Output syntax and commandline options.
.TP
.B "\-i, \-\-install"
Install/Upgrade the package after a successful build.
.TP
.B "\-j <jobs>"
Sets MAKEFLAGS="-j<jobs>" before building the package.  This is useful for overriding
the MAKEFLAGS setting in /etc/makepkg.conf.
.TP
.B "\-L, \-\-nolastmod"
Disable updating the Last modified line.
.TP
.B "\-k, \-\-logging"
Logging package build process
.TP
.B "\-l <pkgname>"
Download the package's buildscript before starting the build.  This is useful
if you do not want to do a full 'repoman upd' nor want to download manually the
buildscript.
.TP
.B "\-m, \-\-nocolor"
Disable color in output messages
.TP
.B "\-n, \-\-nostrip"
Do not strip binaries and libraries.
.TP
.B "\-o, \-\-nobuild"
Download and extract files only, do not build.
.TP
.B "\-p <buildscript>"
Read the package script \fI<buildscript>\fP instead of the default (\fIFrugalBuild\fP).
.TP
.B "\-r, \-\-rmdeps"
Upon successful build, remove any dependencies installed by makepkg/pacman during
dependency auto-resolution (using \fB-b\fP or \fB-s\fP).
.TP
.B "\-R, \-\-chroot"
Build the package in a chroot environment.
.TP
.B "\-s, \-\-syncdeps"
Install missing dependencies using pacman.  When makepkg finds missing build-time
or run-time dependencies, it will run pacman to try and resolve them.  If successful,
pacman will download the missing packages from a package repository and
install them for you.
.TP
.B "\-t <tree>"
When building in a chroot (using -R) you may want to build packages for a
version other than the host one. Using this option, it's possible to build
packages for "stable" while the host system is "current" and vica versa.
.TP
.B "\-u, \-\-noup2date"
Do not check for newer version before starting build. Normally makepkg will
prevent you from building obsolete source by mistake. If you know what you are
doing, you can disable this feature with this switch.
.B "\-S, \-\-sudosync"
Install missing dependencies using pacman and sudo. This is the same as \fB-s\fP
except that makepkg will call pacman with sudo. This means you don't have to
build as root to use dependency auto-resolution.
.TP
.TP
.B "\-w <destdir>"
Write the resulting package file to the directory \fI<destdir>\fP instead of the
current working directory.
.TP
.B "\-\-noconfirm"
When calling pacman to resolve dependencies or conflicts, makepkg can pass
the \fI--noconfirm\fP option to it so it does not wait for any user
input before proceeding with operations.
.TP
.B "\-\-noprogressbar"
When calling pacman, makepkg can pass the \fI--noprogressbar\fP option to it.
This is useful if one is directing makepkg's output to a non-terminal (ie, a file).

.SH CONFIGURATION
Configuration options are stored in \fI/etc/makepkg.conf\fP.  This file is parsed
as a bash script, so you can export any special compiler flags you wish
to use.  This is helpful for building for different architectures, or with
different optimizations.

\fBNOTE:\fP This does not guarantee that all package Makefiles will use
your exported variables.  Some of them are flaky...
.SH "SEE ALSO"
.BR FrugalBuild (8),
.BR pacman (8)
.SH AUTHOR
.nf
Judd Vinet <jvinet@zeroflux.org>
and the Frugalware developers <frugalware-devel@frugalware.org>
.fi