michael@13: .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 michael@13: .\" michael@13: .\" Standard preamble: michael@13: .\" ======================================================================== michael@13: .de Sh \" Subsection heading michael@13: .br michael@13: .if t .Sp michael@13: .ne 5 michael@13: .PP michael@13: \fB\\$1\fR michael@13: .PP michael@13: .. michael@13: .de Sp \" Vertical space (when we can't use .PP) michael@13: .if t .sp .5v michael@13: .if n .sp michael@13: .. michael@13: .de Vb \" Begin verbatim text michael@13: .ft CW michael@13: .nf michael@13: .ne \\$1 michael@13: .. michael@13: .de Ve \" End verbatim text michael@13: .ft R michael@13: .fi michael@13: .. michael@13: .\" Set up some character translations and predefined strings. \*(-- will michael@13: .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left michael@13: .\" double quote, and \*(R" will give a right double quote. | will give a michael@13: .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to michael@13: .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' michael@13: .\" expand to `' in nroff, nothing in troff, for use with C<>. michael@13: .tr \(*W-|\(bv\*(Tr michael@13: .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' michael@13: .ie n \{\ michael@13: . ds -- \(*W- michael@13: . ds PI pi michael@13: . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch michael@13: . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch michael@13: . ds L" "" michael@13: . ds R" "" michael@13: . ds C` michael@13: . ds C' michael@13: 'br\} michael@13: .el\{\ michael@13: . ds -- \|\(em\| michael@13: . ds PI \(*p michael@13: . ds L" `` michael@13: . ds R" '' michael@13: 'br\} michael@13: .\" michael@13: .\" If the F register is turned on, we'll generate index entries on stderr for michael@13: .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index michael@13: .\" entries marked with X<> in POD. Of course, you'll have to process the michael@13: .\" output yourself in some meaningful fashion. michael@13: .if \nF \{\ michael@13: . de IX michael@13: . tm Index:\\$1\t\\n%\t"\\$2" michael@13: .. michael@13: . nr % 0 michael@13: . rr F michael@13: .\} michael@13: .\" michael@13: .\" For nroff, turn off justification. Always turn off hyphenation; it makes michael@13: .\" way too many mistakes in technical documents. michael@13: .hy 0 michael@13: .if n .na michael@13: .\" michael@13: .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). michael@13: .\" Fear. Run. Save yourself. No user-serviceable parts. michael@13: . \" fudge factors for nroff and troff michael@13: .if n \{\ michael@13: . ds #H 0 michael@13: . ds #V .8m michael@13: . ds #F .3m michael@13: . ds #[ \f1 michael@13: . ds #] \fP michael@13: .\} michael@13: .if t \{\ michael@13: . ds #H ((1u-(\\\\n(.fu%2u))*.13m) michael@13: . ds #V .6m michael@13: . ds #F 0 michael@13: . ds #[ \& michael@13: . ds #] \& michael@13: .\} michael@13: . \" simple accents for nroff and troff michael@13: .if n \{\ michael@13: . ds ' \& michael@13: . ds ` \& michael@13: . ds ^ \& michael@13: . ds , \& michael@13: . ds ~ ~ michael@13: . ds / michael@13: .\} michael@13: .if t \{\ michael@13: . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" michael@13: . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' michael@13: . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' michael@13: . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' michael@13: . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' michael@13: . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' michael@13: .\} michael@13: . \" troff and (daisy-wheel) nroff accents michael@13: .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' michael@13: .ds 8 \h'\*(#H'\(*b\h'-\*(#H' michael@13: .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] michael@13: .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' michael@13: .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' michael@13: .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] michael@13: .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] michael@13: .ds ae a\h'-(\w'a'u*4/10)'e michael@13: .ds Ae A\h'-(\w'A'u*4/10)'E michael@13: . \" corrections for vroff michael@13: .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' michael@13: .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' michael@13: . \" for low resolution devices (crt and lpr) michael@13: .if \n(.H>23 .if \n(.V>19 \ michael@13: \{\ michael@13: . ds : e michael@13: . ds 8 ss michael@13: . ds o a michael@13: . ds d- d\h'-1'\(ga michael@13: . ds D- D\h'-1'\(hy michael@13: . ds th \o'bp' michael@13: . ds Th \o'LP' michael@13: . ds ae ae michael@13: . ds Ae AE michael@13: .\} michael@13: .rm #[ #] #H #V #F C michael@13: .\" ======================================================================== michael@13: .\" michael@13: .IX Title "RPMTOOL 8" michael@13: .TH RPMTOOL 8 "OpenPKG" "RPMTOOL(8)" "OpenPKG" michael@13: .SH "NAME" michael@13: \&\fBrpmtool\fR \- RPM Auxiliary Tool michael@13: .SH "SYNOPSIS" michael@13: .IX Header "SYNOPSIS" michael@13: \&\fBrpmtool\fR michael@13: \&\fIcommand\fR michael@13: [\fIcommand-options\fR] michael@13: .SH "DESCRIPTION" michael@13: .IX Header "DESCRIPTION" michael@13: This is an auxiliary tool to the RedHat Package Manager (\s-1RPM\s0). It michael@13: provides additional functionality for use in \s-1RPM\s0 \fIspec\fR files while michael@13: building packages. The following \fIcommand\fRs are available: michael@13: .IP "\fBplatform\fR" 4 michael@13: .IX Item "platform" michael@13: This command outputs a unique platform id in the format michael@13: \&\*(L"\-\*(R". For instance, the output on a michael@13: FreeBSD platform can be \*(L"i386\-freebsd4.2\*(R", the output on a Linux michael@13: platform can be \*(L"i686\-linux2.2.16\*(R", the output on a Solaris platform can michael@13: be \*(L"sun4u\-sunos5.8\*(R", etc. michael@13: .Sp michael@13: Example: michael@13: .Sp michael@13: .Vb 5 michael@13: \& case `rpmtool platform`; in michael@13: \& *-freebsd[34].* ) ... ;; michael@13: \& *-sunos5.[678] ) ... ;; michael@13: \& *-linux2.[24].* ) ... ;; michael@13: \& esac michael@13: .Ve michael@13: .IP "\fBmflags\fR [\fB\-O\fR] \fItool\fR" 4 michael@13: .IX Item "mflags [-O] tool" michael@13: This command outputs additional flags for \fImake\fR\|(1) for michael@13: use with the program \fItool\fR. It provides only standard flags which michael@13: always can be used. In conjunction with \fB\-O\fR (optimization), it also provides michael@13: reasonable job control for use on multi-processor platforms (for instance it michael@13: outputs \*(L"\-j4\*(R" on an \s-1SMP\s0 system with 2 CPUs if \s-1GNU\s0 make or \s-1BSD\s0 pmake is used). michael@13: .Sp michael@13: Example: michael@13: .Sp michael@13: .Vb 1 michael@13: \& make `rpmtool mflags -O make` michael@13: .Ve michael@13: .IP "\fBcflags\fR [\fB\-O\fR] \fItool\fR" 4 michael@13: .IX Item "cflags [-O] tool" michael@13: This command outputs additional flags for \fIcc\fR\|(1) for use with the program michael@13: \&\fItool\fR. It provides only standard flags which always can be used. michael@13: conjunction with \fB\-O\fR it provides also optimization flags (for instance michael@13: it outputs \*(L"\-O2 \-pipe\*(R" for \s-1GNU\s0 C/\*(C+ compiler). michael@13: .Sp michael@13: Example: michael@13: .Sp michael@13: .Vb 1 michael@13: \& CC="$CC" CFLAGS=`rpmtool cflags -O $CC` ./configure ... michael@13: .Ve michael@13: .ie n .IP "\fBcppflags\fR [\fB\-p\fR \fIprefix\fR] [[\*(C`+|\-\*(C'\fR\fIsubdir ...]" 4 michael@13: .el .IP "\fBcppflags\fR [\fB\-p\fR \fIprefix\fR] [[\f(CW\*(C`+|\-\*(C'\fR\fIsubdir\fR ...]" 4 michael@13: .IX Item "cppflags [-p prefix] [[+|-subdir ...]" michael@13: This command output \fIcpp\fR\|(1) \f(CW\*(C`\-I\*(C'\fR options for the OpenPKG instance michael@13: \&\fIprefix\fR. It optionally can prefix or suffix with one or more \fIsubdir\fR michael@13: related options, too. If \fIsubdir\fR is prefixed with \f(CW\*(C`+\*(C'\fR (or not michael@13: prefixed at all), the generated option is appended. If \fIsubdir\fR is michael@13: prefixed with \f(CW\*(C`\-\*(C'\fR the generated option is prepended. michael@13: .Sp michael@13: Example: michael@13: .Sp michael@13: .Vb 1 michael@13: \& rpmtool cppflags -p /foo bar -baz +quux michael@13: .Ve michael@13: .ie n .IP "\fBldflags\fR [\fB\-p\fR \fIprefix\fR] [[\*(C`+|\-\*(C'\fR\fIsubdir ...]" 4 michael@13: .el .IP "\fBldflags\fR [\fB\-p\fR \fIprefix\fR] [[\f(CW\*(C`+|\-\*(C'\fR\fIsubdir\fR ...]" 4 michael@13: .IX Item "ldflags [-p prefix] [[+|-subdir ...]" michael@13: This command output \fIld\fR\|(1) \f(CW\*(C`\-L\*(C'\fR options for the OpenPKG instance michael@13: \&\fIprefix\fR. It optionally can prefix or suffix with one or more \fIsubdir\fR michael@13: related options, too. If \fIsubdir\fR is prefixed with \f(CW\*(C`+\*(C'\fR (or not michael@13: prefixed at all), the generated option is appended. If \fIsubdir\fR is michael@13: prefixed with \f(CW\*(C`\-\*(C'\fR the generated option is prepended. michael@13: .Sp michael@13: Example: michael@13: .Sp michael@13: .Vb 1 michael@13: \& rpmtool ldflags -p /foo bar -baz +quux michael@13: .Ve michael@13: .IP "\fBfiles\fR [\fB\-v\fR] [\fB\-o\fR \fIoutfile\fR] [\fB\-r\fR \fIbuild-root\fR] [\fIentry\fR ...]" 4 michael@13: .IX Item "files [-v] [-o outfile] [-r build-root] [entry ...]" michael@13: This is a dynamic variant of the \s-1RPM\s0 \f(CW%files\fR section, i.e., it michael@13: dynamically creates the contents of the \f(CW%files\fR section for use with michael@13: the \f(CW\*(C`%files \-f\*(C'\fR command. For this the file list entries are read from michael@13: the command line (or from stdin if no arguments are given or a single michael@13: argument \f(CW\*(C`\-\*(C'\fR is given) and written to stdout (if no \fB\-o\fR option is michael@13: given or its \fIoutfile\fR argument is \f(CW\*(C`\-\*(C'\fR) or to \fIoutfile\fR. michael@13: .Sp michael@13: The trick of this approach is to be able to use additional features in michael@13: the file list which \s-1RPM\s0 does not provide. The following features are michael@13: provided: michael@13: .RS 4 michael@13: .IP "\fBTrailing Tags\fR" 4 michael@13: .IX Item "Trailing Tags" michael@13: \&\s-1RPM\s0 requires that all tags (like \f(CW\*(C`%attr(...)\*(C'\fR or \f(CW%dir\fR) preceed the michael@13: path in a file list entry. This sometimes leads to ugly and unreadable michael@13: file lists, because all paths cannot be left\-aligned. With \fIrpmtool\fR\|(8) michael@13: tags in the input file list can be at leading and trailing positions. michael@13: The output file list will nevertheless have all tags in leading michael@13: positions for \s-1RPM\s0. michael@13: .IP "\fBSyntactical Set Pattern\fR" 4 michael@13: .IX Item "Syntactical Set Pattern" michael@13: \&\s-1RPM\s0 supports simple wildcard patterns like \f(CW\*(C`/path/*\*(C'\fR or \f(CW\*(C`/path/[a\-z]\*(C'\fR, michael@13: etc. Sometimes it is convenient, to also have (in addition to character michael@13: sets) string sets like \f(CW\*(C`/path/{foo,bar,quux}\*(C'\fR. \fIrpmtool\fR\|(8) provides this michael@13: by syntactically (without checking the filesystem) expanding those michael@13: string sets. michael@13: .IP "\fBOverriding Entries\fR" 4 michael@13: .IX Item "Overriding Entries" michael@13: This is the most important feature and the reason why \fIshtool\fR\|(1)'s michael@13: \&\fBfiles\fR command was implemented. Although \s-1RPM\s0 allows one to specify a michael@13: directory in a file list and then implicitly expands this recursively michael@13: into its contents, it unfortunately does not allow one to later michael@13: explcitly override particular entries (usually if an individual michael@13: \&\f(CW\*(C`%attr(...)\*(C'\fR tag is required). \fIrpmtool\fR\|(8) now supports overriding michael@13: entries, i.e., if a path occurs multiple times, only the last occurance michael@13: is kept. michael@13: .IP "\fBNegation Tag\fR" 4 michael@13: .IX Item "Negation Tag" michael@13: This provides an additional tag \f(CW%not\fR which can be used to explicitly michael@13: exclude a previously implicitly added entry. michael@13: .RE michael@13: .RS 4 michael@13: .Sp michael@13: Example: michael@13: .Sp michael@13: .Vb 8 michael@13: \& %install michael@13: \& : michael@13: \& rpmtool files -o files -r$RPM_BUILD_ROOT \e michael@13: \& '%defattr(-,foo,foo)' \e michael@13: \& '%{prefix}' \e michael@13: \& '%attr(1755,root,foo) %{prefix}/bin/bar' \e michael@13: \& '%not %dir {%{prefix},%{prefix}/*,%{prefix}/man/*}' \e michael@13: \& '%not %{prefix}/info/dir' michael@13: .Ve michael@13: .Sp michael@13: .Vb 1 michael@13: \& %files -f files michael@13: .Ve michael@13: .RE michael@13: .IP "\fBmsg\fR [\fB\-b\fR]" 4 michael@13: .IX Item "msg [-b]" michael@13: This displays the contents of \fIstdin\fR as a boxed message. If option michael@13: \&\fB\-b\fR is given it additionally beeps once before displaying the box. michael@13: .SH "HISTORY" michael@13: .IX Header "HISTORY" michael@13: This tool was created in November 2000 for use in OpenPKG, the michael@13: cross-platform RPM-based Unix software packaging facility. michael@13: .SH "AUTHOR" michael@13: .IX Header "AUTHOR" michael@13: .Vb 3 michael@13: \& Ralf S. Engelschall michael@13: \& rse@engelschall.com michael@13: \& www.engelschall.com michael@13: .Ve