diff -r 71503088f51b -r f880f219c566 openpkg/dev.8 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/dev.8 Tue Jul 31 12:23:42 2012 +0200 @@ -0,0 +1,656 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` +. ds C' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "DEV 8" +.TH DEV 8 "OpenPKG" "DEV(8)" "OpenPKG" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +\&\fBopenpkg dev\fR \- OpenPKG Package Development Tool +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBopenpkg dev\fR is a package development tool for \fBOpenPKG\fR. +.SS "\s-1SOURCE\s0 \s-1PACKAGE\s0 \s-1HANDLING\s0" +.IX Subsection "SOURCE PACKAGE HANDLING" +.ie n .IP "\fBopenpkg dev unpack\fR [\*(C`\-l\*(C' \fIlayout\fR] [\*(C`\-b\*(C' \fIbasedir\fR] [\*(C`\-s\*(C'] [\*(C`\-d\*(C'] \fIname\fR\*(C`\-\*(C'\fIversion\fR\*(C`\-\*(C'\fIrelease\fR\*(C`.src.rpm\*(C'" 4 +.el .IP "\fBopenpkg dev unpack\fR [\f(CW\*(C`\-l\*(C'\fR \fIlayout\fR] [\f(CW\*(C`\-b\*(C'\fR \fIbasedir\fR] [\f(CW\*(C`\-s\*(C'\fR] [\f(CW\*(C`\-d\*(C'\fR] \fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.src.rpm\*(C'\fR" 4 +.IX Item "openpkg dev unpack [-l layout] [-b basedir] [-s] [-d] name-version-release.src.rpm" +Unpacks an OpenPKG source \s-1RPM\s0 package +\&\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.src.rpm\*(C'\fR into \fIbasedir\fR +(default is \fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR) +using \fIlayout\fR (default is \fIstructured\fR). +Additionally, +\&\fIfile-rpmmacros\fR +configuration file is generated where +\&\f(CW\*(C`\-s\*(C'\fR enables shared mode and +\&\f(CW\*(C`\-d\*(C'\fR enables debug mode, see \fIfile-rpmmacros\fR. +.SS "\s-1SOURCE\s0 \s-1PACKAGE\s0 \s-1DEVELOPMENT\s0" +.IX Subsection "SOURCE PACKAGE DEVELOPMENT" +.IP "\fBopenpkg dev shell\fR" 4 +.IX Item "openpkg dev shell" +This is a convenience command which enters an interactive \fB\s-1GNU\s0 Bash\fR +shell which provides the following work environment: +.RS 4 +.IP "\fBEnvironment Variables:\fR" 4 +.IX Item "Environment Variables:" +.Vb 5 +\& OPENPKG_PREFIX "" +\& PS1 "\e\e[\e\ee[31;1m\e\e]\e\eu\e\e[\e\ee[0m\e\e]@\e\eh:\e\ew [OPENPKG_PREFIX=$OPENPKG_PREFIX]\en\e\e\e$ " +\& T %{_tmppath} +\& S %{_specdir} +\& D %{_sourcedir} +.Ve +.IP "\fBCommand-Line Aliases:\fR" 4 +.IX Item "Command-Line Aliases:" +.Vb 2 +\& openpkg "${OPENPKG_PREFIX}/bin/openpkg" +\& opd "${OPENPKG_PREFIX}/bin/openpkg dev" +.Ve +.IP "\fBCommand-Line Keystrokes:\fR" 4 +.IX Item "Command-Line Keystrokes:" +.Vb 10 +\& ESC+x "opd unpack\en" +\& ESC+v "opd edit\en" +\& ESC+t "opd build \-s track\en" +\& ESC+f "opd build \-s fetch\en" +\& ESC+b "opd build\en" +\& ESC+1 "opd build \-s prep\en" +\& ESC+2 "opd build \-s compile\en" +\& ESC+3 "opd build \-s install\en" +\& ESC+4 "opd build \-s binary\en" +\& ESC+s "opd build \-s source\en" +\& ESC+p "opd peek\en" +\& ESC+d "opd diff\en" +\& ESC+i "opd install\en" +\& ESC+e "opd erase\en" +\& ESC+l "opd lint\en" +\& ESC+r "opd release\en" +.Ve +.RE +.RS 4 +.Sp +If option \f(CW\*(C`\-s\*(C'\fR is passed to \fBopenpkg dev shell\fR and \fIscreen\fR\|(1) is +available in \f(CW$PATH\fR, the interactive development shell is started up +in a convenient virtual screen environment. +.RE +.IP "\fBopenpkg dev edit\fR" 4 +.IX Item "openpkg dev edit" +Load spec file into editor. +.RS 4 +.IP "\fBEnvironment Variables:\fR" 4 +.IX Item "Environment Variables:" +.Vb 1 +\& EDITOR "vi" +.Ve +.RE +.RS 4 +.RE +.ie n .IP "\fBopenpkg dev build\fR [\*(C`\-s\*(C' \fIstep\fR] [\*(C`\-D\*(C' \fIdefine\fR[=\fIvalue\fR]] [\*(C`\-w\*(C' \fIvariant\fR]" 4 +.el .IP "\fBopenpkg dev build\fR [\f(CW\*(C`\-s\*(C'\fR \fIstep\fR] [\f(CW\*(C`\-D\*(C'\fR \fIdefine\fR[=\fIvalue\fR]] [\f(CW\*(C`\-w\*(C'\fR \fIvariant\fR]" 4 +.IX Item "openpkg dev build [-s step] [-D define[=value]] [-w variant]" +Builds package steps. Default \fIstep\fR is \f(CW\*(C`all\*(C'\fR. Option \f(CW\*(C`\-D\*(C'\fR translated +into "\f(CW\*(C`\-\-define \*(Aq\f(CIdefine\f(CW \f(CIvalue\f(CW\*(Aq\*(C'\fR" while option \f(CW\*(C`\-w\*(C'\fR translated +into "\f(CW\*(C`\-\-with\*(C'\fR \fIvariant\fR". The \fIstep\fR arguments translate into the +following \s-1RPM\s0 options: +.Sp +.Vb 8 +\& track: \-bt +\& fetch: \-bf +\& prep: \-bp +\& compile: \-bc \-\-short\-circuit +\& install: \-bi \-\-short\-circuit +\& binary: \-bb \-\-short\-circuit +\& source: \-bs +\& all: \-ba +.Ve +.IP "\fBopenpkg dev peek\fR" 4 +.IX Item "openpkg dev peek" +Peeks file list from package and tags configuration and documentation files. +.IP "\fBopenpkg dev diff\fR" 4 +.IX Item "openpkg dev diff" +Shows modifications with the help of a possibly underlying Version +Control System (\s-1VCS\s0) like \s-1CVS\s0, Subversion, Monotone, Git, Mercurial or +(as a fallback ) \s-1OSSP\s0 svs. +.ie n .IP "\fBopenpkg dev install\fR [\*(C`\-f\*(C'] [\*(C`\-o\*(C'] [\*(C`\-n\*(C'] [\*(C`\-s\*(C']" 4 +.el .IP "\fBopenpkg dev install\fR [\f(CW\*(C`\-f\*(C'\fR] [\f(CW\*(C`\-o\*(C'\fR] [\f(CW\*(C`\-n\*(C'\fR] [\f(CW\*(C`\-s\*(C'\fR]" 4 +.IX Item "openpkg dev install [-f] [-o] [-n] [-s]" +Installs package. +Option +\&\f(CW\*(C`\-f\*(C'\fR adds \f(CW\*(C`\-\-force\*(C'\fR, +\&\f(CW\*(C`\-n\*(C'\fR adds \f(CW\*(C`\-\-nodeps\*(C'\fR and +\&\f(CW\*(C`\-o\*(C'\fR adds \f(CW\*(C`\-\-oldpackage\*(C'\fR +to the underlying \f(CW\*(C`rpm\*(C'\fR call. +Option \f(CW\*(C`\-s\*(C'\fR prefixes the command with \fIsudo\fR\|(1). +.ie n .IP "\fBopenpkg dev erase\fR [\*(C`\-f\*(C'] [\*(C`\-o\*(C'] [\*(C`\-a\*(C'] [\*(C`\-s\*(C']" 4 +.el .IP "\fBopenpkg dev erase\fR [\f(CW\*(C`\-f\*(C'\fR] [\f(CW\*(C`\-o\*(C'\fR] [\f(CW\*(C`\-a\*(C'\fR] [\f(CW\*(C`\-s\*(C'\fR]" 4 +.IX Item "openpkg dev erase [-f] [-o] [-a] [-s]" +Erases package. +Option +\&\f(CW\*(C`\-f\*(C'\fR adds \f(CW\*(C`\-\-force\*(C'\fR, +\&\f(CW\*(C`\-n\*(C'\fR adds \f(CW\*(C`\-\-nodeps\*(C'\fR and +\&\f(CW\*(C`\-a\*(C'\fR adds \f(CW\*(C`\-\-allmatches\*(C'\fR +to the underlying \f(CW\*(C`rpm\*(C'\fR call. +Option \f(CW\*(C`\-s\*(C'\fR prefixes the command with \fIsudo\fR\|(1). +.ie n .IP "\fBopenpkg dev lint\fR [\*(C`\-v\*(C'] [\*(C`\-b\*(C']" 4 +.el .IP "\fBopenpkg dev lint\fR [\f(CW\*(C`\-v\*(C'\fR] [\f(CW\*(C`\-b\*(C'\fR]" 4 +.IX Item "openpkg dev lint [-v] [-b]" +Lints package sources \f(CW\*(C`*.spec\*(C'\fR, \f(CW\*(C`fsl.*\*(C'\fR, \f(CW\*(C`rc.*\*(C'\fR and binary package files. +Option \f(CW\*(C`\-v\*(C'\fR enables verboseness. +Option \f(CW\*(C`\-b\*(C'\fR disables the linting of an existing binary package file. +.ie n .IP "\fBopenpkg dev release\fR [\*(C`\-m\*(C' \fImessage\fR] [\*(C`\-n\*(C']" 4 +.el .IP "\fBopenpkg dev release\fR [\f(CW\*(C`\-m\*(C'\fR \fImessage\fR] [\f(CW\*(C`\-n\*(C'\fR]" 4 +.IX Item "openpkg dev release [-m message] [-n]" +Releases package specification to the repository. Unlike previous +incarnations of \*(L"openpkg dev\*(R" this one is not tied to any repository or +structure. The default message is created using the difference between +the previous and current version of the package specification. In order +to grab the previous version, the working directory and three levels +towards root are checked for signs of \s-1CVS\s0, Subversion, Monotone, Git, +Mercurial or \s-1SVS\s0 information, in that order. The appropriate command is +then executed to retrieve the data and the \s-1VCS\s0 found is passed to the +actual release command. +.Sp +Finally, the command specified by the environment variable +\&\f(CW\*(C`OPENPKG_DEV_RELEASE\*(C'\fR or, if omitted, specified by the rpm macro +\&\f(CW\*(C`%{openpkg_dev_release}\*(C'\fR is run and passed the following positional +arguments: +.RS 4 +.Sp +.Vb 12 +\& openpkg\-prefix +\& spec\-dir +\& source\-dir +\& binary\-rpm\-file +\& source\-rpm\-file +\& package\-name +\& package\-version +\& package\-release +\& package\-version\-old +\& package\-release\-old +\& commit\-message +\& vcs +.Ve +.RE +.RS 4 +.Sp +For a dry run, set \f(CW$OPENPKG_DEV_RELEASE\fR to \*(L"echo\*(R" or use option "\f(CW\*(C`\-n\*(C'\fR". +.RE +.SH "UNPACKED SOURCE RPM PACKAGE FILESYSTEM LAYOUT" +.IX Header "UNPACKED SOURCE RPM PACKAGE FILESYSTEM LAYOUT" +When an OpenPKG source \s-1RPM\s0 package +\&\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.src.rpm\*(C'\fR is unpacked to the +filesystem, the following distinct filesystem layouts are known: +.IP "\fBglobal\fR" 4 +.IX Item "global" +.RS 4 +.PD 0 +.ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/.openpkg/rpmmacros\*(C'" 4 +.el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4 +.IX Item "prefix/RPM/SRC/name/.openpkg/rpmmacros" +.ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4 +.el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4 +.IX Item "prefix/RPM/SRC/name/name.spec" +.ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4 +.el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4 +.IX Item "prefix/RPM/SRC/name/packaging-source-file" +.ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4 +.el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4 +.IX Item "prefix/RPM/SRC/name/thirdparty-distribution-file" +.ie n .IP "\fIprefix\fR\*(C`/RPM/PKG/\*(C'\fIbinary-rpm-package-file\fR" 4 +.el .IP "\fIprefix\fR\f(CW\*(C`/RPM/PKG/\*(C'\fR\fIbinary-rpm-package-file\fR" 4 +.IX Item "prefix/RPM/PKG/binary-rpm-package-file" +.ie n .IP "\fIprefix\fR\*(C`/RPM/PKG/\*(C'\fIsource-rpm-package-file\fR" 4 +.el .IP "\fIprefix\fR\f(CW\*(C`/RPM/PKG/\*(C'\fR\fIsource-rpm-package-file\fR" 4 +.IX Item "prefix/RPM/PKG/source-rpm-package-file" +.ie n .IP "\fIprefix\fR\*(C`/RPM/TMP/\*(C'\fItemporary-file\fR" 4 +.el .IP "\fIprefix\fR\f(CW\*(C`/RPM/TMP/\*(C'\fR\fItemporary-file\fR" 4 +.IX Item "prefix/RPM/TMP/temporary-file" +.RE +.RS 4 +.PD +.Sp +This is just the \*(L"simple\*(R" filesystem layout (see below) with the +\&\fIbase-dir\fR set to \fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR. +.Sp +This is the filesystem layout used by default for building OpenPKG +packages during \f(CW\*(C`openpkg build\*(C'\fR or the underlying \f(CW\*(C`openpkg rpm +\&\-\-rebuild\*(C'\fR commands. +.RE +.IP "\fBlocal\fR" 4 +.IX Item "local" +.RS 4 +.PD 0 +.ie n .IP "\fIbase-dir\fR\*(C`/.openpkg/rpmmacros\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4 +.IX Item "base-dir/.openpkg/rpmmacros" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4 +.IX Item "base-dir/name.spec" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4 +.IX Item "base-dir/packaging-source-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4 +.IX Item "base-dir/thirdparty-distribution-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIbinary-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIbinary-rpm-package-file\fR" 4 +.IX Item "base-dir/binary-rpm-package-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIsource-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIsource-rpm-package-file\fR" 4 +.IX Item "base-dir/source-rpm-package-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fItemporary-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fItemporary-file\fR" 4 +.IX Item "base-dir/temporary-file" +.RE +.RS 4 +.PD +.Sp +This puts everything into one directory. +.RE +.IP "\fBsimple\fR" 4 +.IX Item "simple" +.RS 4 +.PD 0 +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/.openpkg/rpmmacros\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4 +.IX Item "base-dir/name/.openpkg/rpmmacros" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4 +.IX Item "base-dir/name/name.spec" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4 +.IX Item "base-dir/name/packaging-source-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4 +.IX Item "base-dir/name/thirdparty-distribution-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIbinary-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIbinary-rpm-package-file\fR" 4 +.IX Item "base-dir/binary-rpm-package-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIsource-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIsource-rpm-package-file\fR" 4 +.IX Item "base-dir/source-rpm-package-file" +.ie n .IP "\fI\fI$TMPDIR\fI\fR\*(C`/openpkg/\*(C'\fItemporary-file\fR" 4 +.el .IP "\fI\f(CI$TMPDIR\fI\fR\f(CW\*(C`/openpkg/\*(C'\fR\fItemporary-file\fR" 4 +.IX Item "$TMPDIR/openpkg/temporary-file" +.RE +.RS 4 +.PD +.Sp +This is the simple filesystem layout of an unpacked +OpenPKG package. All files are simply put into a sub-directory with the +\&\fIname\fR of the package. +.Sp +This is the filesystem layout used for the quick patching of a single +OpenPKG package in a stand-alone environment. +.RE +.IP "\fBstructured\fR" 4 +.IX Item "structured" +.RS 4 +.PD 0 +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/.openpkg/rpmmacros\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4 +.IX Item "base-dir/name/.openpkg/rpmmacros" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/src/\*(C'\fIname\fR\*(C`.spec\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/src/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4 +.IX Item "base-dir/name/src/name.spec" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/src/\*(C'\fIpackaging-source-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/src/\*(C'\fR\fIpackaging-source-file\fR" 4 +.IX Item "base-dir/name/src/packaging-source-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/dst/\*(C'\fIthirdparty-distribution-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/dst/\*(C'\fR\fIthirdparty-distribution-file\fR" 4 +.IX Item "base-dir/name/dst/thirdparty-distribution-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/pkg/\*(C'[\*(C`bin/\*(C']\fIbinary-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/pkg/\*(C'\fR[\f(CW\*(C`bin/\*(C'\fR]\fIbinary-rpm-package-file\fR" 4 +.IX Item "base-dir/name/pkg/[bin/]binary-rpm-package-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/pkg/\*(C'[\*(C`src/\*(C']\fIsource-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/pkg/\*(C'\fR[\f(CW\*(C`src/\*(C'\fR]\fIsource-rpm-package-file\fR" 4 +.IX Item "base-dir/name/pkg/[src/]source-rpm-package-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/tmp/\*(C'\fItemporary-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/tmp/\*(C'\fR\fItemporary-file\fR" 4 +.IX Item "base-dir/name/tmp/temporary-file" +.RE +.RS 4 +.PD +.Sp +This is the structured (and default) filesystem layout of an unpacked +OpenPKG package. A top-level sub-directory with the \fIname\fR of the +package is created. There the package specification and all packaging +source files are put into the sub-directory \fIsrc\fR and all the +third-party distribution files are put into the sub-directory \fIdst\fR. +.Sp +This is the filesystem layout used for the development of a single +OpenPKG package in a stand-alone environment. +.RE +.IP "\fBdistributed\fR" 4 +.IX Item "distributed" +.RS 4 +.PD 0 +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`.openpkg/rpmmacros\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`.openpkg/rpmmacros\*(C'\fR" 4 +.IX Item "base-dir/.openpkg/rpmmacros" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`src/\*(C'\fIname\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`src/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4 +.IX Item "base-dir/src/name/name.spec" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`src/\*(C'\fIname\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`src/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4 +.IX Item "base-dir/src/name/packaging-source-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`dst/\*(C'\fIname\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`dst/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4 +.IX Item "base-dir/dst/name/thirdparty-distribution-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`pkg/\*(C'[\*(C`bin/\*(C']\fIbinary-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`pkg/\*(C'\fR[\f(CW\*(C`bin/\*(C'\fR]\fIbinary-rpm-package-file\fR" 4 +.IX Item "base-dir/pkg/[bin/]binary-rpm-package-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`pkg/\*(C'[\*(C`src/\*(C']\fIsource-rpm-package-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`pkg/\*(C'\fR[\f(CW\*(C`src/\*(C'\fR]\fIsource-rpm-package-file\fR" 4 +.IX Item "base-dir/pkg/[src/]source-rpm-package-file" +.ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`tmp/\*(C'\fItemporary-file\fR" 4 +.el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`tmp/\*(C'\fR\fItemporary-file\fR" 4 +.IX Item "base-dir/tmp/temporary-file" +.RE +.RS 4 +.PD +.Sp +This is the distributed filesystem layout of an unpacked OpenPKG +package. It is similar to the structured filesystem layout but the +\&\f(CW\*(C`src\*(C'\fR and \f(CW\*(C`dst\*(C'\fR directories and the \fIname\fR directory are swapped, +mainly with the intention of bundling together all third-party +distribution files of a large number of packages. +.Sp +This is the filesystem layout used for regular OpenPKG package +development. +.RE +.SH "LOCAL RPM MACROS FILE (.openpkg/rpmmacros)" +.IX Header "LOCAL RPM MACROS FILE (.openpkg/rpmmacros)" +OpenPKG supports local \s-1RPM\s0 macros files \fI.openpkg/rpmmacros\fR which +can be used to configure \s-1RPM\s0 in a local scope. This is especially +interesting to configure a local (even per-package) build environment +with the help of the \f(CW%openpkg_layout\fR macro. +.PP +\&\f(CW%openpkg_layout\fR +[\f(CW\*(C`macrosfile=\*(C'\fR\fIfilename\fR] +[\f(CW\*(C`basedir=\*(C'\fR\fIdirectory\fR] +[\f(CW\*(C`specdir=\*(C'\fR\fIdirectory\fR] +[\f(CW\*(C`sourcedir=\*(C'\fR\fIdirectory\fR] +[\f(CW\*(C`builddir=\*(C'\fR\fIdirectory\fR] +[\f(CW\*(C`tmpdir=\*(C'\fR\fIdirectory\fR] +[\f(CW\*(C`binrpmdir=\*(C'\fR\fIdirectory\fR] +[\f(CW\*(C`srcrpmdir=\*(C'\fR\fIdirectory\fR] +[\f(CW\*(C`shared=\*(C'\fR\fIyes-or-no\fR] +[\f(CW\*(C`debug=\*(C'\fR\fIyes-or-no\fR] +.ie n .IP "\*(C`macrosfile=\*(C'\fIfilename\fR" 4 +.el .IP "\f(CW\*(C`macrosfile=\*(C'\fR\fIfilename\fR" 4 +.IX Item "macrosfile=filename" +Absolute file path of the \f(CW\*(C`.openpkg/rpmmacros\*(C'\fR file where this +\&\f(CW%openpkg_layout\fR macro is defined. Usually, the intended usage is to +leverage from OpenPKG \s-1RPM\s0's special \f(CW\*(C`%{macrosfile}\*(C'\fR macro by simply +using \f(CW\*(C`macrosfile=%{macrosfile}\*(C'\fR. This parameter is important as +the default \f(CW\*(C`basename\*(C'\fR is derived from it. +.ie n .IP "\*(C`basedir=\*(C'\fIdirectory\fR" 4 +.el .IP "\f(CW\*(C`basedir=\*(C'\fR\fIdirectory\fR" 4 +.IX Item "basedir=directory" +Absolute directory path where the \f(CW\*(C`.openpkg/rpmmacros\*(C'\fR file is +located under. Usually, the intended usage is to not explicitly +set this parameter but let it be determined indirectly via +\&\f(CW\*(C`macrosfile\*(C'\fR. The effective default value is equal to a value like +\&\f(CW\*(C`%{realpath:%{dirname:%{realpath:%{macrosfile}}}/..}\*(C'\fR This parameter is +important as all standard filesystem layouts (see parameter \f(CW\*(C`layout\*(C'\fR) +are always at least partially based on this base directory in order +to provide absolute-path-independent flexible filesystem layouts. +.ie n .IP "\*(C`layout=\*(C'\fIlayout\fR" 4 +.el .IP "\f(CW\*(C`layout=\*(C'\fR\fIlayout\fR" 4 +.IX Item "layout=layout" +The name of the filesystem layout type to use. The following standard +filesystem layout types are pre-defined: \f(CW\*(C`global\*(C'\fR, \f(CW\*(C`local\*(C'\fR, \f(CW\*(C`simple\*(C'\fR, +\&\f(CW\*(C`structured\*(C'\fR (default) and \f(CW\*(C`distributed\*(C'\fR. +.Sp +.Vb 8 +\& global macrosdir /etc/openpkg +\& global macrosfile /etc/openpkg/rpmmacros +\& global specdir /RPM/SRC/$name +\& global sourcedir /RPM/SRC/$name +\& global builddir /RPM/TMP +\& global tmpdir /RPM/TMP +\& global binrpmdir /RPM/PKG +\& global srcrpmdir /RPM/PKG +\& +\& local macrosdir /.openpkg +\& local macrosfile /.openpkg/rpmmacros +\& local specdir +\& local sourcedir +\& local builddir +\& local tmpdir +\& local binrpmdir +\& local srcrpmdir +\& +\& simple macrosdir /.openpkg +\& simple macrosfile /.openpkg/rpmmacros +\& simple specdir +\& simple sourcedir +\& simple builddir +\& simple tmpdir +\& simple binrpmdir /.. +\& simple srcrpmdir /.. +\& +\& structured macrosdir /.openpkg +\& structured macrosfile /.openpkg/rpmmacros +\& structured specdir /src +\& structured sourcedir /dst +\& structured builddir /tmp +\& structured tmpdir /tmp +\& structured binrpmdir /pkg/bin +\& structured srcrpmdir /pkg/src +\& +\& distributed macrosdir /.openpkg +\& distributed macrosfile /.openpkg/rpmmacros +\& distributed specdir /src/ +\& distributed sourcedir /dst/ +\& distributed builddir /tmp +\& distributed tmpdir /tmp +\& distributed binrpmdir /pkg/bin +\& distributed srcrpmdir /pkg/src +.Ve +.ie n .IP "\*(C`specdir=\*(C'\fIdirectory-list\fR" 4 +.el .IP "\f(CW\*(C`specdir=\*(C'\fR\fIdirectory-list\fR" 4 +.IX Item "specdir=directory-list" +.PD 0 +.ie n .IP "\*(C`sourcedir=\*(C'\fIdirectory-list\fR" 4 +.el .IP "\f(CW\*(C`sourcedir=\*(C'\fR\fIdirectory-list\fR" 4 +.IX Item "sourcedir=directory-list" +.ie n .IP "\*(C`builddir=\*(C'\fIdirectory-list\fR" 4 +.el .IP "\f(CW\*(C`builddir=\*(C'\fR\fIdirectory-list\fR" 4 +.IX Item "builddir=directory-list" +.ie n .IP "\*(C`tmpdir=\*(C'\fIdirectory-list\fR" 4 +.el .IP "\f(CW\*(C`tmpdir=\*(C'\fR\fIdirectory-list\fR" 4 +.IX Item "tmpdir=directory-list" +.ie n .IP "\*(C`binrpmdir=\*(C'\fIdirectory-list\fR" 4 +.el .IP "\f(CW\*(C`binrpmdir=\*(C'\fR\fIdirectory-list\fR" 4 +.IX Item "binrpmdir=directory-list" +.ie n .IP "\*(C`srcrpmdir=\*(C'\fIdirectory-list\fR" 4 +.el .IP "\f(CW\*(C`srcrpmdir=\*(C'\fR\fIdirectory-list\fR" 4 +.IX Item "srcrpmdir=directory-list" +.PD +These parameters correspond to the six individual directories provided +by a standard layout and allow you to selectively adjust parts of a +standard layout to local needs and without having to define a full +standard layout yourself. +.Sp +The \fIdirectory-list\fR is a whitespace-separated list of +\&\fIdirectory\fR[\f(CW\*(C`:\*(C'\fR[\f(CW\*(C`+\*(C'\fR]\fIdirectory\fR] specifications which are +\&\*(L"first-match\*(R" searched for existence. The last directory in the list +is always taken as the fallback and if it is not existing it is +even created on-the-fly. The \fIdirectory-check\fR\f(CW\*(C`:\*(C'\fR\fIdirectory-use\fR +syntax variant allows the existence test to use \fIdirectory-check\fR, +but expands to \fIdirectory-use\fR (replace mode). The +\&\fIdirectory-check\fR\f(CW\*(C`:+\*(C'\fR\fIdirectory-use\fR syntax variant allows +the existence test to use \fIdirectory-check\fR, but expands to +\&\fIdirectory-check\fR\fIdirectory-use\fR (append mode). For instance +\&\f(CW\*(C`tmpdir="%{getenv:HOME)/tmp:+/openpkg %{getenv:TMPDIR}:+/openpkg +/tmp/%(echo $LOGNAME)/openpkg"\*(C'\fR will first check for ~/tmp (and then use +~/tmp/openpkg), then for \f(CW$TMPDIR\fR (and use \f(CW$TMPDIR\fR/openpkg) and finally +it will use /tmp/$LOGNAME/openpkg at last resort. +.Sp +Paths are usually assembled by using \s-1RPM\s0 macros like +\&\f(CW\*(C`%{l_prefix}\*(C'\fR (the instance prefix), \f(CW\*(C`%{_\|_openpkg_basename}\*(C'\fR (the +\&\fIbasename\fR parameter), \f(CW\*(C`%{realpath: