OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src openpkg-web Date: 08-Jul-2003 14:19:10 Branch: HEAD Handle: 2003070813190801 Modified files: openpkg-src/openpkg HISTORY openpkg.spec rpmmacros rpmtool rpmtool.8 rpmtool.pod openpkg-web news.txt Log: provide append/prepend feature for %{l_cppflags} and %{l_ldflags} macros Summary: Revision Changes Path 1.6 +2 -0 openpkg-src/openpkg/HISTORY 1.167 +1 -1 openpkg-src/openpkg/openpkg.spec 1.35 +5 -5 openpkg-src/openpkg/rpmmacros 1.18 +142 -86 openpkg-src/openpkg/rpmtool 1.5 +176 -213 openpkg-src/openpkg/rpmtool.8 1.8 +39 -7 openpkg-src/openpkg/rpmtool.pod 1.5440 +1 -0 openpkg-web/news.txt ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/openpkg/HISTORY ============================================================================ $ cvs diff -u -r1.5 -r1.6 HISTORY --- openpkg-src/openpkg/HISTORY 6 Jun 2003 12:13:26 -0000 1.5 +++ openpkg-src/openpkg/HISTORY 8 Jul 2003 12:19:09 -0000 1.6 @@ -2,6 +2,8 @@ 2003 ==== +20030708 provide append/prepend feature for %{l_cppflags} and %{l_ldflags} macros +20030707 remove now officially deprecated usage of %{name} macro 20030606 correctly support "use_cxx" for setting the "c++" path 20030604 fix "{s,m,r,r}{u,g}id" handling on initial bootstrapping via .src.sh. 20030604 better support SuSE @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/openpkg.spec ============================================================================ $ cvs diff -u -r1.166 -r1.167 openpkg.spec --- openpkg-src/openpkg/openpkg.spec 7 Jul 2003 13:52:36 -0000 1.166 +++ openpkg-src/openpkg/openpkg.spec 8 Jul 2003 12:19:09 -0000 1.167 @@ -39,7 +39,7 @@ # o any cc(1) # the package version/release -%define V_openpkg 20030707 +%define V_openpkg 20030708 # the used software versions %define V_rpm 4.0.2 @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpmmacros ============================================================================ $ cvs diff -u -r1.34 -r1.35 rpmmacros --- openpkg-src/openpkg/rpmmacros 6 Jun 2003 12:13:26 -0000 1.34 +++ openpkg-src/openpkg/rpmmacros 8 Jul 2003 12:19:09 -0000 1.35 @@ -159,11 +159,11 @@ %l_xmkmf %{l_tool_locate xmkmf xmkmf} # tool options -%l_mflags(O) %(%{l_sane_env}; %{l_rpmtool} flags -m %{-O:-O} %{l_make}) -%l_cflags(O) %(%{l_sane_env}; %{l_rpmtool} flags -c %{-O:-O} %{l_cc}) -%l_cxxflags(O) %(%{l_sane_env}; %{l_rpmtool} flags -c %{-O:-O} %{l_cxx}) -%l_cppflags() %(flags="-I%{l_prefix}/include"; for pkg in . %*; do test ".$pkg" = .. && continue; flags="$flags -I%{l_prefix}/include/$pkg"; done; echo $flags) -%l_ldflags() %(flags="-L%{l_prefix}/lib"; for pkg in . %*; do test ".$pkg" = .. && continue; flags="$flags -L%{l_prefix}/lib/$pkg"; done; echo $flags) +%l_mflags(O) %(%{l_sane_env}; %{l_rpmtool} mflags %{-O:-O} %{l_make}) +%l_cflags(O) %(%{l_sane_env}; %{l_rpmtool} cflags %{-O:-O} %{l_cc}) +%l_cxxflags(O) %(%{l_sane_env}; %{l_rpmtool} cflags %{-O:-O} %{l_cxx}) +%l_cppflags() %(%{l_sane_env}; %{l_rpmtool} cppflags -p%{l_prefix} -- %*) +%l_ldflags() %(%{l_sane_env}; %{l_rpmtool} ldflags -p%{l_prefix} -- %*) # OSSP fake syslog library %l_fsl_ldflags() %(if [ ".%{with_fsl}" = ".yes" ]; then flags=`%{l_prefix}/bin/fsl-config --all --ldflags`; else flags=''; fi; echo $flags) @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpmtool ============================================================================ $ cvs diff -u -r1.17 -r1.18 rpmtool --- openpkg-src/openpkg/rpmtool 17 Mar 2003 12:22:58 -0000 1.17 +++ openpkg-src/openpkg/rpmtool 8 Jul 2003 12:19:09 -0000 1.18 @@ -46,7 +46,10 @@ echo '' echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:' echo ' platform' - echo ' flags [-m] [-c] [-O] <tool>' + echo ' mflags [-O] <tool>' + echo ' cflags [-O] <tool>' + echo ' cppflags [-p <prefix>] -- [[+-]<subdir> ...]' + echo ' ldflags [-p <prefix>] -- [[+-]<subdir> ...]' echo ' files [-v] [-o <outfile>] [-r <buildroot>] [<filelist>]' echo ' user [-c] [-d] [-p <passwd>] [-n <realname>] [-d <homedir>]' echo ' [-s <shell>] [-u <min-uid>] <username>' @@ -79,14 +82,30 @@ arg_spec="0=" opt_spec="" ;; - flags ) - str_usage="[-m] [-c] [-O] <tool>" + mflags ) + str_usage="[-O] <tool>" arg_spec="1=" - opt_spec="m.c.O." - opt_m=no - opt_c=no + opt_spec="O." opt_O=no ;; + cflags ) + str_usage="[-O] <tool>" + arg_spec="1=" + opt_spec="O." + opt_O=no + ;; + cppflags ) + str_usage="[<subdir> ...]" + arg_spec="0+" + opt_spec="p:" + opt_p="/" + ;; + ldflags ) + str_usage="[<subdir> ...]" + arg_spec="0+" + opt_spec="p:" + opt_p="/" + ;; files ) gen_tmpfile=yes str_usage="[-v] [-o <outfile>] [-r <buildroot>] [<filelist>]" @@ -318,107 +337,144 @@ echo "${m}-${s}${r}" ;; - flags ) + mflags ) tool="$1" - if [ ".$opt_m" = .yes ]; then - isgmake=no - if [ ".`$tool -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" != . ]; then - isgmake=yes - fi - mflags='' - if [ ".$isgmake" = .yes ]; then - mflags="--no-print-directory" - fi - if [ ".$opt_O" = .yes ]; then - case $platform in - *:SunOS:5.*:* | *:OSF1:*:* ) - if [ ".$isgmake" = .yes ]; then - n=`(/bin/uname -X) 2>/dev/null | grep -i NumCPU | awk '{ print $3; }'` - if [ ".$n" != . ]; then - if [ $n -gt 1 ]; then - n=`expr $n \* 2` - mflags="$mflags -j$n" - fi - fi - fi - ;; - *:FreeBSD:4.*:* ) - n=`/sbin/sysctl hw.ncpu | awk '{ print $2; }'` + isgmake=no + if [ ".`$tool -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" != . ]; then + isgmake=yes + fi + mflags='' + if [ ".$isgmake" = .yes ]; then + mflags="--no-print-directory" + fi + if [ ".$opt_O" = .yes ]; then + case $platform in + *:SunOS:5.*:* | *:OSF1:*:* ) + if [ ".$isgmake" = .yes ]; then + n=`(/bin/uname -X) 2>/dev/null | grep -i NumCPU | awk '{ print $3; }'` if [ ".$n" != . ]; then if [ $n -gt 1 ]; then n=`expr $n \* 2` mflags="$mflags -j$n" - if [ ".$isgmake" = .no ]; then - mflags="$mflags -B" - fi fi fi - ;; - *:NetBSD:1.5*:* ) - n=`/sbin/sysctl hw.ncpu | awk '{ print $3; }'` - if [ ".$n" != . ]; then - if [ $n -gt 1 ]; then - n=`expr $n \* 2` - mflags="$mflags -j$n" - if [ ".$isgmake" = .no ]; then - mflags="$mflags -B" - fi + fi + ;; + *:FreeBSD:4.*:* ) + n=`/sbin/sysctl hw.ncpu | awk '{ print $2; }'` + if [ ".$n" != . ]; then + if [ $n -gt 1 ]; then + n=`expr $n \* 2` + mflags="$mflags -j$n" + if [ ".$isgmake" = .no ]; then + mflags="$mflags -B" fi fi - ;; - *:Linux:*:* ) - n=`cat /proc/cpuinfo | grep processor | wc -l | awk '{ print $1; }'` - if [ ".$n" != . ]; then - if [ $n -gt 1 ]; then - n=`expr $n \* 2` - mflags="$mflags -j$n" + fi + ;; + *:NetBSD:1.5*:* ) + n=`/sbin/sysctl hw.ncpu | awk '{ print $3; }'` + if [ ".$n" != . ]; then + if [ $n -gt 1 ]; then + n=`expr $n \* 2` + mflags="$mflags -j$n" + if [ ".$isgmake" = .no ]; then + mflags="$mflags -B" fi fi - ;; - *:HP-UX:*:* ) - n=1 # FIXME - ;; - *:IRIX64:6.*:* ) - if [ ".$isgmake" = .yes ]; then - n=`/usr/sbin/sysconf | awk '/NUM_PROCESSORS/ { print $2; }'` - if [ ".$n" != . ]; then - if [ $n -gt 1 ]; then - n=`expr $n \* 2` - mflags="$mflags -j$n" - fi - fi + fi + ;; + *:Linux:*:* ) + n=`cat /proc/cpuinfo | grep processor | wc -l | awk '{ print $1; }'` + if [ ".$n" != . ]; then + if [ $n -gt 1 ]; then + n=`expr $n \* 2` + mflags="$mflags -j$n" fi - ;; - *:Darwin:*:* ) - n=`/usr/sbin/sysctl hw.ncpu | awk '{ print $3; }'` + fi + ;; + *:HP-UX:*:* ) + n=1 # FIXME + ;; + *:IRIX64:6.*:* ) + if [ ".$isgmake" = .yes ]; then + n=`/usr/sbin/sysconf | awk '/NUM_PROCESSORS/ { print $2; }'` if [ ".$n" != . ]; then if [ $n -gt 1 ]; then n=`expr $n \* 2` mflags="$mflags -j$n" - if [ ".$isgmake" = .no ]; then - mflags="$mflags -B" - fi fi fi - ;; - esac + fi + ;; + *:Darwin:*:* ) + n=`/usr/sbin/sysctl hw.ncpu | awk '{ print $3; }'` + if [ ".$n" != . ]; then + if [ $n -gt 1 ]; then + n=`expr $n \* 2` + mflags="$mflags -j$n" + if [ ".$isgmake" = .no ]; then + mflags="$mflags -B" + fi + fi + fi + ;; + esac + fi + echo "x$mflags" | sed -e 's;^x;;' + ;; + + cflags ) + tool="$1" + isgcc=no + if [ ".`$tool --version 2>/dev/null | egrep '(2.[7-9]|3.[0-3])'`" != . ]; then + isgcc=yes + fi + cflags='' + if [ ".$opt_O" = .yes ]; then + if [ ".$isgcc" = .yes ]; then + cflags="-O2 -pipe" + else + cflags="-O" fi - echo "$mflags" - elif [ ".$opt_c" = .yes ]; then - isgcc=no - if [ ".`$tool --version 2>/dev/null | egrep '(2.[7-9]|3.[0-3])'`" != . ]; then - isgcc=yes + fi + echo "x$cflags" | sed -e 's;^x;;' + ;; + + cppflags ) + cppflags="-I${opt_p}/include" + for pkg in . $*; do + [ ".$pkg" = .. ] && continue + pos="+" + eval `echo "x$pkg" |\ + sed -e 's/^x//' \ + -e 's/^\([^+-]\)/+\1/' \ + -e 's/^\([+-]\)\(.*\)$/pos="\1"; pkg="\2";/'` + if [ ".$pos" = ".-" ]; then + cppflags="-I${opt_p}/include/$pkg $cppflags" + else + cppflags="$cppflags -I${opt_p}/include/$pkg" fi - cflags='' - if [ ".$opt_O" = .yes ]; then - if [ ".$isgcc" = .yes ]; then - cflags="-O2 -pipe" - else - cflags="-O" - fi + done + echo "x$cppflags" | sed -e 's;^x;;' + ;; + + ldflags ) + ldflags="-L${opt_p}/lib" + for pkg in . $*; do + [ ".$pkg" = .. ] && continue + pos="+" + eval `echo "x$pkg" |\ + sed -e 's/^x//' \ + -e 's/^\([^+-]\)/+\1/' \ + -e 's/^\([+-]\)\(.*\)$/pos="\1"; pkg="\2";/'` + if [ ".$pos" = ".-" ]; then + ldflags="-L${opt_p}/lib/$pkg $ldflags" + else + ldflags="$ldflags -L${opt_p}/lib/$pkg" fi - echo "$cflags" - fi + done + echo "x$ldflags" | sed -e 's;^x;;' ;; files ) @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpmtool.8 ============================================================================ $ cvs diff -u -r1.4 -r1.5 rpmtool.8 --- openpkg-src/openpkg/rpmtool.8 28 May 2002 19:04:58 -0000 1.4 +++ openpkg-src/openpkg/rpmtool.8 8 Jul 2003 12:19:09 -0000 1.5 @@ -1,9 +1,8 @@ -.rn '' }` -''' $RCSfile$$Revision$$Date$ -''' -''' $Log$ -''' -.de Sh +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading .br .if t .Sp .ne 5 @@ -11,150 +10,98 @@ \fB\\$1\fR .PP .. -.de Sp +.de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. -.de Ip -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.de Vb +.de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. -.de Ve +.de Ve \" End verbatim text .ft R - .fi .. -''' -''' -''' Set up \*(-- to give an unbreakable dash; -''' string Tr holds user defined translation string. -''' Bell System Logo is used as a dummy character. -''' +.\" 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. | will give a +.\" real vertical bar. \*(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-|\(bv\*(Tr +.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" "" -''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of -''' \*(L" and \*(R", except that they are used on ".xx" lines, -''' such as .IP and .SH, which do another additional levels of -''' double-quote interpretation -.ds M" """ -.ds S" """ -.ds N" """"" -.ds T" """"" -.ds L' ' -.ds R' ' -.ds M' ' -.ds S' ' -.ds N' ' -.ds T' ' +. 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\| -.tr \*(Tr -.ds L" `` -.ds R" '' -.ds M" `` -.ds S" '' -.ds N" `` -.ds T" '' -.ds L' ` -.ds R' ' -.ds M' ` -.ds S' ' -.ds N' ` -.ds T' ' -.ds PI \(*p +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' 'br\} -.\" If the F register is turned on, we'll generate -.\" index entries out stderr for the following things: -.\" TH Title -.\" SH Header -.\" Sh Subsection -.\" Ip Item -.\" X<> Xref (embedded -.\" Of course, you have to process the output yourself -.\" in some meaninful fashion. -.if \nF \{ -.de IX -.tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -.nr % 0 -.rr F +. nr % 0 +. rr F .\} -.TH RPMTOOL 1 "perl 5.005, patch 03" "28/May/2002" "User Contributed Perl Documentation" -.UC -.if n .hy 0 +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 .if n .na -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.de CQ \" put $1 in typewriter font -.ft CW -'if n "\c -'if t \\&\\$1\c -'if n \\&\\$1\c -'if n \&" -\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 -'.ft R -.. -.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2 -. \" AM - accent mark definitions -.bd B 3 -. \" fudge factors for nroff and troff +.\" +.\" 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 +. 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 #] \& +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& .\} -. \" simple accents for nroff and troff +. \" simple accents for nroff and troff .if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds ? ? -. ds ! ! -. ds / -. ds q +. 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 ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10' -. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10' +. 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 +. \" 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 v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#] -.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u' -.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u' -.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#] .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' @@ -162,47 +109,46 @@ .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 -.ds oe o\h'-(\w'o'u*4/10)'e -.ds Oe O\h'-(\w'O'u*4/10)'E -. \" corrections for vroff +. \" 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) +. \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ -. ds : e -. ds 8 ss -. ds v \h'-1'\o'\(aa\(ga' -. ds _ \h'-1'^ -. ds . \h'-1'. -. ds 3 3 -. 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 -. ds oe oe -. ds Oe OE +. 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 "RPMTOOL 1" +.TH RPMTOOL 1 "2003-07-08" "perl v5.8.0" "User Contributed Perl Documentation" .SH "NAME" -\fBrpmtool\fR \- RPM Auxiliary Tool +\&\fBrpmtool\fR \- RPM Auxiliary Tool .SH "SYNOPSIS" -\fBrpmtool\fR -\fIcommand\fR +.IX Header "SYNOPSIS" +\&\fBrpmtool\fR +\&\fIcommand\fR [\fIcommand-options\fR] .SH "DESCRIPTION" -This is an auxiliary tool to the RedHat Package Manager (RPM). It -provides additional functionality for use in RPM \fIspec\fR files while +.IX Header "DESCRIPTION" +This is an auxiliary tool to the RedHat Package Manager (\s-1RPM\s0). It +provides additional functionality for use in \s-1RPM\s0 \fIspec\fR files while building packages. The following \fIcommand\fRs are available: -.Ip "\fBplatform\fR " 4 +.IP "\fBplatform\fR" 4 +.IX Item "platform" This command outputs a unique platform id in the format -\*(L"<architecture>\-<system><release>\*(R". For instance, the output on a -FreeBSD platform can be \*(L"i386-freebsd4.2\*(R", the output on a Linux -platform can be \*(L"i686-linux2.2.16\*(R", the output on a Solaris platform can -be \*(L"sun4u-sunos5.8\*(R", etc. +\&\*(L"<architecture>\-<system><release>\*(R". For instance, the output on a +FreeBSD platform can be \*(L"i386\-freebsd4.2\*(R", the output on a Linux +platform can be \*(L"i686\-linux2.2.16\*(R", the output on a Solaris platform can +be \*(L"sun4u\-sunos5.8\*(R", etc. .Sp Example: .Sp @@ -213,57 +159,103 @@ \& *-linux2.[24].* ) ... ;; \& esac .Ve -.Ip "\fBflags\fR [\fB\-m\fR] [\fB\-c\fR] [\fB\-O\fR] \fItool\fR" 4 -This command outputs additional flags for make (\fB\-m\fR) or compiler (\fB\-c\fR) for -use with the program \fItool\fR. For \fB\-m\fR it provides only standard flags which +.IP "\fBmflags\fR [\fB\-O\fR] \fItool\fR" 4 +.IX Item "mflags [-O] tool" +This command outputs additional flags for \fImake\fR\|(1) for +use with the program \fItool\fR. It provides only standard flags which always can be used. In conjunction with \fB\-O\fR (optimization), it also provides reasonable job control for use on multi-processor platforms (for instance it 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). -For \fB\-c\fR it provides only standard flags which always can be used. In -conjunction with \fB\-O\fR it provides also optimization flags (for instance it -outputs \*(L"\-O2 \-pipe\*(R" for \s-1GNU\s0 C/\*(C+ compiler). .Sp Example: .Sp .Vb 1 -\& CC="$CC" CFLAGS=`rpmtool -c -O $CC` ./configure ... +\& make `rpmtool mflags -O make` .Ve -.Ip "\fBfiles\fR [\fB\-v\fR] [\fB\-o\fR \fIoutfile\fR] [\fB\-r\fR \fIbuild-root\fR] [\fIentry\fR ...]" 4 +.IP "\fBcflags\fR [\fB\-O\fR] \fItool\fR" 4 +.IX Item "cflags [-O] tool" +This command outputs additional flags for \fIcc\fR\|(1) for use with the program +\&\fItool\fR. It provides only standard flags which always can be used. +conjunction with \fB\-O\fR it provides also optimization flags (for instance +it outputs \*(L"\-O2 \-pipe\*(R" for \s-1GNU\s0 C/\*(C+ compiler). +.Sp +Example: +.Sp +.Vb 1 +\& CC="$CC" CFLAGS=`rpmtool mflags -O $CC` ./configure ... +.Ve +.ie n .IP "\fBcppflags\fR [\fB\-p\fR \fIprefix\fR] [[""+|\-""\fR\fIsubdir ...]" 4 +.el .IP "\fBcppflags\fR [\fB\-p\fR \fIprefix\fR] [[\f(CW+|\-\fR\fIsubdir\fR ...]" 4 +.IX Item "cppflags [-p prefix] [[+|-subdir ...]" +This command output \fIcpp\fR\|(1) \f(CW\*(C`\-I\*(C'\fR options for the OpenPKG instance +\&\fIprefix\fR. It optionally can prefix or suffix with one or more \fIsubdir\fR +related options, too. If \fIsubdir\fR is prefixed with \f(CW\*(C`+\*(C'\fR (or not +prefixed at all), the generated option is appended. If \fIsubdir\fR is +prefixed with \f(CW\*(C`\-\*(C'\fR the generated option is prepended. +.Sp +Example: +.Sp +.Vb 1 +\& rpmtool cppflags -p /foo bar -baz +quux +.Ve +.ie n .IP "\fBldflags\fR [\fB\-p\fR \fIprefix\fR] [[""+|\-""\fR\fIsubdir ...]" 4 +.el .IP "\fBldflags\fR [\fB\-p\fR \fIprefix\fR] [[\f(CW+|\-\fR\fIsubdir\fR ...]" 4 +.IX Item "ldflags [-p prefix] [[+|-subdir ...]" +This command output \fIld\fR\|(1) \f(CW\*(C`\-L\*(C'\fR options for the OpenPKG instance +\&\fIprefix\fR. It optionally can prefix or suffix with one or more \fIsubdir\fR +related options, too. If \fIsubdir\fR is prefixed with \f(CW\*(C`+\*(C'\fR (or not +prefixed at all), the generated option is appended. If \fIsubdir\fR is +prefixed with \f(CW\*(C`\-\*(C'\fR the generated option is prepended. +.Sp +Example: +.Sp +.Vb 1 +\& rpmtool ldflags -p /foo bar -baz +quux +.Ve +.IP "\fBfiles\fR [\fB\-v\fR] [\fB\-o\fR \fIoutfile\fR] [\fB\-r\fR \fIbuild-root\fR] [\fIentry\fR ...]" 4 +.IX Item "files [-v] [-o outfile] [-r build-root] [entry ...]" This is a dynamic variant of the \s-1RPM\s0 \f(CW%files\fR section, i.e., it dynamically creates the contents of the \f(CW%files\fR section for use with -the \f(CW%files -f\fR command. For this the file list entries are read from +the \f(CW\*(C`%files \-f\*(C'\fR command. For this the file list entries are read from the command line (or from stdin if no arguments are given or a single -argument \f(CW-\fR is given) and written to stdout (if no \fB\-o\fR option is -given or its \fIoutfile\fR argument is \f(CW-\fR) or to \fIoutfile\fR. +argument \f(CW\*(C`\-\*(C'\fR is given) and written to stdout (if no \fB\-o\fR option is +given or its \fIoutfile\fR argument is \f(CW\*(C`\-\*(C'\fR) or to \fIoutfile\fR. .Sp The trick of this approach is to be able to use additional features in the file list which \s-1RPM\s0 does not provide. The following features are provided: -.Ip "\fBTrailing Tags\fR" 8 -\s-1RPM\s0 requires that all tags (like \f(CW%attr(...)\fR or \f(CW%dir\fR) preceed the +.RS 4 +.IP "\fBTrailing Tags\fR" 4 +.IX Item "Trailing Tags" +\&\s-1RPM\s0 requires that all tags (like \f(CW\*(C`%attr(...)\*(C'\fR or \f(CW%dir\fR) preceed the path in a file list entry. This sometimes leads to ugly and unreadable -file lists, because all paths cannot be left-aligned. With \fIrpmtool\fR\|(1) +file lists, because all paths cannot be left\-aligned. With \fIrpmtool\fR\|(1) tags in the input file list can be at leading and trailing positions. The output file list will nevertheless have all tags in leading positions for \s-1RPM\s0. -.Ip "\fBSyntactical Set Pattern\fR" 8 -\s-1RPM\s0 supports simple wildcard patterns like \f(CW/path/*\fR or \f(CW/path/[a-z]\fR, +.IP "\fBSyntactical Set Pattern\fR" 4 +.IX Item "Syntactical Set Pattern" +\&\s-1RPM\s0 supports simple wildcard patterns like \f(CW\*(C`/path/*\*(C'\fR or \f(CW\*(C`/path/[a\-z]\*(C'\fR, etc. Sometimes it is convienient, to also have (in addition to character -sets) string sets like \f(CW/path/{foo,bar,quux}\fR. \fIrpmtool\fR\|(1) provides this +sets) string sets like \f(CW\*(C`/path/{foo,bar,quux}\*(C'\fR. \fIrpmtool\fR\|(1) provides this by syntactically (without checking the filesystem) expanding those string sets. -.Ip "\fBOverriding Entries\fR" 8 +.IP "\fBOverriding Entries\fR" 4 +.IX Item "Overriding Entries" This is the most important feature and the reason why \fIshtool\fR\|(1)'s -\fBfiles\fR command was implemented. Although \s-1RPM\s0 allows one to specify a +\&\fBfiles\fR command was implemented. Although \s-1RPM\s0 allows one to specify a directory in a file list and then implicitly expands this recursively into its contents, it unfortunately does not allow one to later explcitly override particular entries (usually if an individual -\f(CW%attr(...)\fR tag is required). \fIrpmtool\fR\|(1) now supports overriding +\&\f(CW\*(C`%attr(...)\*(C'\fR tag is required). \fIrpmtool\fR\|(1) now supports overriding entries, i.e., if a path occurs multiple times, only the last occurance is kept. -.Ip "\fBNegation Tag\fR" 8 +.IP "\fBNegation Tag\fR" 4 +.IX Item "Negation Tag" This provides an additional tag \f(CW%not\fR which can be used to explicitly exclude a previously implicitly added entry. +.RE +.RS 4 .Sp Example: .Sp @@ -277,58 +269,29 @@ \& '%not %dir {%{prefix},%{prefix}/*,%{prefix}/man/*}' \e \& '%not %{prefix}/info/dir' .Ve +.Sp .Vb 1 \& %files -f files .Ve -.Ip "\fBuser\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-p\fR \fIpasswd\fR] [\fB\-n\fR \fIrealname\fR] [\fB\-d\fR \fIhomedir\fR] [\fB\-s\fR \fIshell\fR] [\fB\-u\fR \fImin-uid\fR] \fIusername\fR" 4 +.RE +.IP "\fBuser\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-p\fR \fIpasswd\fR] [\fB\-n\fR \fIrealname\fR] [\fB\-d\fR \fIhomedir\fR] [\fB\-s\fR \fIshell\fR] [\fB\-u\fR \fImin-uid\fR] \fIusername\fR" 4 +.IX Item "user [-a] [-r] [-p passwd] [-n realname] [-d homedir] [-s shell] [-u min-uid] username" This adds (\fB\-a\fR) or removes (\fB\-r\fR) the user \fIusername\fR in the system database. -.Ip "\fBgroup\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-g\fR \fImin-gid\fR] \fIgroupname\fR [\fIusername\fR ...]" 4 +.IP "\fBgroup\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-g\fR \fImin-gid\fR] \fIgroupname\fR [\fIusername\fR ...]" 4 +.IX Item "group [-a] [-r] [-g min-gid] groupname [username ...]" This adds (\fB\-a\fR) or removes (\fB\-r\fR) the group \fIgroupname\fR in the system database. -.Ip "\fBmsg\fR [\fB\-b\fR]" 4 +.IP "\fBmsg\fR [\fB\-b\fR]" 4 +.IX Item "msg [-b]" This displays the contents of \fIstdin\fR as a boxed message. If option -\fB\-b\fR is given it additionally beeps once before displaying the box. +\&\fB\-b\fR is given it additionally beeps once before displaying the box. .SH "HISTORY" +.IX Header "HISTORY" This tool was created in November 2000 for use in OpenPKG, the -cross-platform RPM\-based Unix software packaging facility. +cross-platform RPM-based Unix software packaging facility. .SH "AUTHOR" -.PP +.IX Header "AUTHOR" .Vb 3 \& Ralf S. Engelschall \& [EMAIL PROTECTED] \& www.engelschall.com .Ve - -.rn }` '' -.IX Title "RPMTOOL 1" -.IX Name "B<rpmtool> - RPM Auxiliary Tool" - -.IX Header "NAME" - -.IX Header "SYNOPSIS" - -.IX Header "DESCRIPTION" - -.IX Item "\fBplatform\fR " - -.IX Item "\fBflags\fR [\fB\-m\fR] [\fB\-c\fR] [\fB\-O\fR] \fItool\fR" - -.IX Item "\fBfiles\fR [\fB\-v\fR] [\fB\-o\fR \fIoutfile\fR] [\fB\-r\fR \fIbuild-root\fR] [\fIentry\fR ...]" - -.IX Item "\fBTrailing Tags\fR" - -.IX Item "\fBSyntactical Set Pattern\fR" - -.IX Item "\fBOverriding Entries\fR" - -.IX Item "\fBNegation Tag\fR" - -.IX Item "\fBuser\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-p\fR \fIpasswd\fR] [\fB\-n\fR \fIrealname\fR] [\fB\-d\fR \fIhomedir\fR] [\fB\-s\fR \fIshell\fR] [\fB\-u\fR \fImin-uid\fR] \fIusername\fR" - -.IX Item "\fBgroup\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-g\fR \fImin-gid\fR] \fIgroupname\fR [\fIusername\fR ...]" - -.IX Item "\fBmsg\fR [\fB\-b\fR]" - -.IX Header "HISTORY" - -.IX Header "AUTHOR" - @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpmtool.pod ============================================================================ $ cvs diff -u -r1.7 -r1.8 rpmtool.pod --- openpkg-src/openpkg/rpmtool.pod 30 Dec 2002 22:05:34 -0000 1.7 +++ openpkg-src/openpkg/rpmtool.pod 8 Jul 2003 12:19:09 -0000 1.8 @@ -59,20 +59,52 @@ *-linux2.[24].* ) ... ;; esac -=item B<flags> [B<-m>] [B<-c>] [B<-O>] I<tool> +=item B<mflags> [B<-O>] I<tool> -This command outputs additional flags for make (B<-m>) or compiler (B<-c>) for -use with the program I<tool>. For B<-m> it provides only standard flags which +This command outputs additional flags for make(1) for +use with the program I<tool>. It provides only standard flags which always can be used. In conjunction with B<-O> (optimization), it also provides reasonable job control for use on multi-processor platforms (for instance it outputs "-j4" on an SMP system with 2 CPUs if GNU make or BSD pmake is used). -For B<-c> it provides only standard flags which always can be used. In -conjunction with B<-O> it provides also optimization flags (for instance it -outputs "-O2 -pipe" for GNU C/C++ compiler). Example: - CC="$CC" CFLAGS=`rpmtool -c -O $CC` ./configure ... + make `rpmtool mflags -O make` + +=item B<cflags> [B<-O>] I<tool> + +This command outputs additional flags for cc(1) for use with the program +I<tool>. It provides only standard flags which always can be used. +conjunction with B<-O> it provides also optimization flags (for instance +it outputs "-O2 -pipe" for GNU C/C++ compiler). + +Example: + + CC="$CC" CFLAGS=`rpmtool mflags -O $CC` ./configure ... + +=item B<cppflags> [B<-p> I<prefix>] [[C<+|->I<subdir> ...] + +This command output cpp(1) C<-I> options for the OpenPKG instance +I<prefix>. It optionally can prefix or suffix with one or more I<subdir> +related options, too. If I<subdir> is prefixed with C<+> (or not +prefixed at all), the generated option is appended. If I<subdir> is +prefixed with C<-> the generated option is prepended. + +Example: + + rpmtool cppflags -p /foo bar -baz +quux + +=item B<ldflags> [B<-p> I<prefix>] [[C<+|->I<subdir> ...] + +This command output ld(1) C<-L> options for the OpenPKG instance +I<prefix>. It optionally can prefix or suffix with one or more I<subdir> +related options, too. If I<subdir> is prefixed with C<+> (or not +prefixed at all), the generated option is appended. If I<subdir> is +prefixed with C<-> the generated option is prepended. + +Example: + + rpmtool ldflags -p /foo bar -baz +quux =item B<files> [B<-v>] [B<-o> I<outfile>] [B<-r> I<build-root>] [I<entry> ...] @@ . patch -p0 <<'@@ .' Index: openpkg-web/news.txt ============================================================================ $ cvs diff -u -r1.5439 -r1.5440 news.txt --- openpkg-web/news.txt 8 Jul 2003 12:00:47 -0000 1.5439 +++ openpkg-web/news.txt 8 Jul 2003 12:19:08 -0000 1.5440 @@ -1,3 +1,4 @@ +08-Jul-2003: Upgraded package: P<openpkg-20030708-20030708> 08-Jul-2003: Upgraded package: P<cfengine-2.0.7-20030708> 08-Jul-2003: Upgraded package: P<gnuplot-3.7.3-20030708> 08-Jul-2003: New package: P<kcd-7.0.0-20030708> @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]