Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/doc/makepkg.8
blob: 418d5dca18bc7c6329e813c58ead61069b0f1bc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
.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