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: 07-Sep-2003 10:25:56 Branch: HEAD Handle: 2003090709255402 Added files: openpkg-src/openpkg rpm-config.8 rpm-config.pod rpm-config.sh Modified files: openpkg-src/openpkg HISTORY openpkg.spec pod2man.sh openpkg-web news.txt Log: add rpm-config(8) utility and add librpmbeecrypt.a to installation tree Summary: Revision Changes Path 1.40 +1 -0 openpkg-src/openpkg/HISTORY 1.210 +48 -18 openpkg-src/openpkg/openpkg.spec 1.2 +4 -3 openpkg-src/openpkg/pod2man.sh 1.1 +220 -0 openpkg-src/openpkg/rpm-config.8 1.1 +126 -0 openpkg-src/openpkg/rpm-config.pod 1.1 +97 -0 openpkg-src/openpkg/rpm-config.sh 1.6433 +1 -0 openpkg-web/news.txt ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/openpkg/HISTORY ============================================================================ $ cvs diff -u -r1.39 -r1.40 HISTORY --- openpkg-src/openpkg/HISTORY 4 Sep 2003 12:08:50 -0000 1.39 +++ openpkg-src/openpkg/HISTORY 7 Sep 2003 08:25:56 -0000 1.40 @@ -2,6 +2,7 @@ 2003 ==== +20030907 add rpm-config(8) utility and add librpmbeecrypt.a to installation tree 20030904 apply new BeeCrypt and Bash patch files 20030904 remove obsoleted patch files from CVS 20030904 fix cut & paste typo in openpkg.spec related to VERBOSE function @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/openpkg.spec ============================================================================ $ cvs diff -u -r1.209 -r1.210 openpkg.spec --- openpkg-src/openpkg/openpkg.spec 4 Sep 2003 12:08:50 -0000 1.209 +++ openpkg-src/openpkg/openpkg.spec 7 Sep 2003 08:25:56 -0000 1.210 @@ -39,7 +39,7 @@ # o any cc(1) # the package version/release -%define V_openpkg 20030904 +%define V_openpkg 20030907 # the used software versions %define V_rpm 4.2.1 @@ -119,6 +119,9 @@ Source50: platform Source51: beecrypt.patch Source52: bash.patch +Source53: rpm-config.sh +Source54: rpm-config.pod +Source55: rpm-config.8 # build information Prefix: %{l_prefix} @@ -680,6 +683,8 @@ cp zlib-%{V_zlib}/libz.a $RPM_BUILD_ROOT%{l_prefix}/lib/librpmz.a cp bzip2-%{V_bzip2}/bzlib.h $RPM_BUILD_ROOT%{l_prefix}/include/rpm/ cp bzip2-%{V_bzip2}/libbz2.a $RPM_BUILD_ROOT%{l_prefix}/lib/librpmbz2.a + cp beecrypt-%{V_beecrypt}/beecrypt.h $RPM_BUILD_ROOT%{l_prefix}/include/rpm/ + cp beecrypt-%{V_beecrypt}/libbeecrypt.a $RPM_BUILD_ROOT%{l_prefix}/lib/librpmbeecrypt.a # display verbosity header VERBOSE "INSTALL: Post-Adjust Installation" @@ -716,6 +721,27 @@ <`SOURCE lsync.8` \ >$RPM_BUILD_ROOT%{l_prefix}/man/man8/lsync.8 + # install rpm-config tool + ( l_prefix="%{l_prefix}" + l_cc="%{l_cc}" + l_cflags="-DOPENPKG" + l_cppflags="-I${l_prefix}/include/rpm -I${l_prefix}/include" + l_ldflags="-L${l_prefix}/lib" + l_libs="-lrpmbuild -lrpm -lrpmio -lrpmpopt -lrpmbeecrypt -lrpmdb -lrpmbz2 -lrpmz" + sed -e "s:@l_prefix@:%{l_prefix}:g" \ + -e "s:@l_cc@:$l_cc:g" \ + -e "s:@l_cflags@:$l_cflags:g" \ + -e "s:@l_cppflags@:$l_cppflags:g" \ + -e "s:@l_ldflags@:$l_ldflags:g" \ + -e "s:@l_libs@:$l_libs:g" \ + <`SOURCE rpm-config.sh` \ + >$RPM_BUILD_ROOT%{l_prefix}/bin/rpm-config + ) || exit $? + chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/rpm-config + sed -e "s:RPM_VERSION:%{V_rpm}:g" \ + <`SOURCE rpm-config.8` \ + >$RPM_BUILD_ROOT%{l_prefix}/man/man8/rpm-config.8 + # install RPM extension ( cd rpm-%{V_rpm} cp file/file $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/file @@ -862,8 +888,9 @@ %dir %{l_prefix}/RPM/TMP %dir %{l_prefix}/cgi %dir %{l_prefix}/bin - %{l_prefix}/bin/rpm2cpio %{l_prefix}/bin/rpm + %{l_prefix}/bin/rpm-config + %{l_prefix}/bin/rpm2cpio %{l_prefix}/bin/rpmbuild %dir %{l_prefix}/etc %{l_prefix}/etc/rc @@ -878,9 +905,12 @@ %{l_prefix}/etc/openpkg/openpkg.pgp %dir %{l_prefix}/include %dir %{l_prefix}/include/rpm - %{l_prefix}/include/rpm/popt.h + %{l_prefix}/include/rpm/beecrypt.h + %{l_prefix}/include/rpm/bzlib.h + %{l_prefix}/include/rpm/db.h %{l_prefix}/include/rpm/header.h %{l_prefix}/include/rpm/misc.h + %{l_prefix}/include/rpm/popt.h %{l_prefix}/include/rpm/rpmbuild.h %{l_prefix}/include/rpm/rpmerr.h %{l_prefix}/include/rpm/rpmio.h @@ -892,23 +922,27 @@ %{l_prefix}/include/rpm/rpmurl.h %{l_prefix}/include/rpm/stringbuf.h %{l_prefix}/include/rpm/ugid.h - %{l_prefix}/include/rpm/db.h %{l_prefix}/include/rpm/zlib.h - %{l_prefix}/include/rpm/bzlib.h %dir %{l_prefix}/info %dir %{l_prefix}/lib %dir %{l_prefix}/lib/openpkg - %{l_prefix}/lib/openpkg/rc %{l_prefix}/lib/openpkg/bash %{l_prefix}/lib/openpkg/bzip2 + %{l_prefix}/lib/openpkg/config.guess + %{l_prefix}/lib/openpkg/config.sub %{l_prefix}/lib/openpkg/curl %{l_prefix}/lib/openpkg/file %{l_prefix}/lib/openpkg/gzip %{l_prefix}/lib/openpkg/macros %{l_prefix}/lib/openpkg/mkproxyrpm.pl %{l_prefix}/lib/openpkg/patch + %{l_prefix}/lib/openpkg/platform + %{l_prefix}/lib/openpkg/rc %{l_prefix}/lib/openpkg/rpmb %{l_prefix}/lib/openpkg/rpmd + %{l_prefix}/lib/openpkg/rpmdb_dump + %{l_prefix}/lib/openpkg/rpmdb_load + %{l_prefix}/lib/openpkg/rpmdb_verify %{l_prefix}/lib/openpkg/rpme %{l_prefix}/lib/openpkg/rpmi %{l_prefix}/lib/openpkg/rpmk @@ -918,23 +952,18 @@ %{l_prefix}/lib/openpkg/rpmtool %{l_prefix}/lib/openpkg/rpmu %{l_prefix}/lib/openpkg/rpmv - %{l_prefix}/lib/openpkg/rpmdb_load - %{l_prefix}/lib/openpkg/rpmdb_dump - %{l_prefix}/lib/openpkg/rpmdb_verify %{l_prefix}/lib/openpkg/rpmx.pl %{l_prefix}/lib/openpkg/rpmx.sh %{l_prefix}/lib/openpkg/shtool %{l_prefix}/lib/openpkg/tar - %{l_prefix}/lib/openpkg/config.guess - %{l_prefix}/lib/openpkg/config.sub - %{l_prefix}/lib/openpkg/platform - %{l_prefix}/lib/librpmpopt.a %{l_prefix}/lib/librpm.a + %{l_prefix}/lib/librpmbeecrypt.a %{l_prefix}/lib/librpmbuild.a + %{l_prefix}/lib/librpmbz2.a + %{l_prefix}/lib/librpmdb.a %{l_prefix}/lib/librpmio.a + %{l_prefix}/lib/librpmpopt.a %{l_prefix}/lib/librpmz.a - %{l_prefix}/lib/librpmdb.a - %{l_prefix}/lib/librpmbz2.a %dir %{l_prefix}/libexec %dir %{l_prefix}/man %dir %{l_prefix}/man/man1 @@ -955,11 +984,12 @@ %dir %{l_prefix}/man/cat7 %dir %{l_prefix}/man/cat8 %dir %{l_prefix}/man/cat9 + %{l_prefix}/man/man8/lsync.8 + %{l_prefix}/man/man8/rc.8 + %{l_prefix}/man/man8/rpm-config.8 %{l_prefix}/man/man8/rpm.8 - %{l_prefix}/man/man8/rpmbuild.8 %{l_prefix}/man/man8/rpm2cpio.8 - %{l_prefix}/man/man8/rc.8 - %{l_prefix}/man/man8/lsync.8 + %{l_prefix}/man/man8/rpmbuild.8 %dir %{l_prefix}/sbin %dir %{l_prefix}/pub %dir %{l_prefix}/share @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/pod2man.sh ============================================================================ $ cvs diff -u -r1.1 -r1.2 pod2man.sh --- openpkg-src/openpkg/pod2man.sh 18 Jul 2003 20:34:08 -0000 1.1 +++ openpkg-src/openpkg/pod2man.sh 7 Sep 2003 08:25:56 -0000 1.2 @@ -1,4 +1,5 @@ #!/bin/sh -pod2man --section=8 --center="OpenPKG" --release="RC(8)" --date="OpenPKG" --quotes=none rc.pod >rc.8 -pod2man --section=8 --center="OpenPKG" --release="RPMTOOL(8)" --date="OpenPKG" --quotes=none rpmtool.pod >rpmtool.8 -pod2man --section=8 --center="OpenPKG" --release="LSYNC(8)" --date="OpenPKG" --quotes=none lsync.pod >lsync.8 +pod2man --section=8 --center="OpenPKG" --release="RC(8)" --date="OpenPKG" --quotes=none rc.pod >rc.8 +pod2man --section=8 --center="OpenPKG" --release="RPMTOOL(8)" --date="OpenPKG" --quotes=none rpmtool.pod >rpmtool.8 +pod2man --section=8 --center="OpenPKG" --release="LSYNC(8)" --date="OpenPKG" --quotes=none lsync.pod >lsync.8 +pod2man --section=8 --center="OpenPKG" --release="RPM-CONFIG(8)" --date="OpenPKG" --quotes=none rpm-config.pod >rpm-config.8 @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpm-config.8 ============================================================================ $ cvs diff -u -r0 -r1.1 rpm-config.8 --- /dev/null 2003-09-07 10:25:56.000000000 +0200 +++ rpm-config.8 2003-09-07 10:25:56.000000000 +0200 @@ -0,0 +1,220 @@ +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.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. | 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" "" +. ds C` +. ds C' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" 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 +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" 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 "RPM-CONFIG 8" +.TH RPM-CONFIG 8 "OpenPKG" "RPM-CONFIG(8)" "OpenPKG" +.SH "NAME" +\&\fBrpm\-config\fR \- OpenPKG RPM library build utility +.SH "VERSION" +.IX Header "VERSION" +OpenPKG \s-1RPM\s0 \s-1RPM_VERSION\s0 +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBrpm-config\fR +[\fB\-\-help\fR] +[\fB\-\-version\fR] +[\fB\-\-cc\fR] +[\fB\-\-cppflags\fR] +[\fB\-\-cflags\fR] +[\fB\-\-ldflags\fR] +[\fB\-\-libs\fR] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +The \fBrpm-config\fR program is a little helper utility for easy +configuring and building applications based on the OpenPKG \s-1RPM\s0 library. +It can be used to query the C compiler and linker flags which are +required to correctly compile and link the application against the +\&\s-1RPM\s0 library. +.SH "OPTIONS" +.IX Header "OPTIONS" +\&\fBrpm-config\fR accepts the following options: +.IP "\fB\-\-help\fR" 4 +.IX Item "--help" +Prints the short usage information. +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +Prints the version number and date of the installed \s-1RPM\s0 library. +.IP "\fB\-\-cc\fR" 4 +.IX Item "--cc" +.PD 0 +.IP "\fB\-\-cppflags\fR" 4 +.IX Item "--cppflags" +.PD +Prints the C pre-processor flags (\f(CW\*(C`\-I\*(C'\fR) which are needed to compile the +RPM-based application. The output is usually added to the \f(CW\*(C`CPPFLAGS\*(C'\fR +variable of the applications \f(CW\*(C`Makefile\*(C'\fR. +.IP "\fB\-\-cflags\fR" 4 +.IX Item "--cflags" +Prints the C compiler flags which are needed to compile the RPM-based +application. The output is usually added to the \f(CW\*(C`CFLAGS\*(C'\fR variable of the +applications \f(CW\*(C`Makefile\*(C'\fR. +.IP "\fB\-\-ldflags\fR" 4 +.IX Item "--ldflags" +Prints the linker flags (\f(CW\*(C`\-L\*(C'\fR) which are needed to link the application with +the \s-1RPM\s0 library. The output is usually added to the \f(CW\*(C`LDFLAGS\*(C'\fR variable of +the applications \f(CW\*(C`Makefile\*(C'\fR. +.IP "\fB\-\-libs\fR" 4 +.IX Item "--libs" +Prints the library flags (\f(CW\*(C`\-l\*(C'\fR) which are needed to link the application with +the \s-1RPM\s0 library. The output is usually added to the \f(CW\*(C`LIBS\*(C'\fR variable of the +applications \f(CW\*(C`Makefile\*(C'\fR. +.SH "EXAMPLE" +.IX Header "EXAMPLE" +.Vb 5 +\& CC = `rpm-config --cc` +\& CPPFLAGS = `rpm-config --cppflags` +\& CFLAGS = `rpm-config --cflags` +\& LDFLAGS = `rpm-config --ldflags` +\& LIBS = `rpm-config --libs` +.Ve +.PP +.Vb 1 +\& all: foo +.Ve +.PP +.Vb 2 +\& foo: foo.o +\& $(CC) $(LDFLAGS) -o foo foo.o $(LIBS) +.Ve +.PP +.Vb 2 +\& foo.o: foo.c +\& $(CC) $(CPPFLAGS) $(CFLAGS) -o foo.o -c foo.c +.Ve +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIrpm\fR\|(1), \fIcc\fR\|(1). +.SH "AUTHOR" +.IX Header "AUTHOR" +.Vb 3 +\& Ralf S. Engelschall +\& [EMAIL PROTECTED] +\& www.engelschall.com +.Ve @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpm-config.pod ============================================================================ $ cvs diff -u -r0 -r1.1 rpm-config.pod --- /dev/null 2003-09-07 10:25:56.000000000 +0200 +++ rpm-config.pod 2003-09-07 10:25:56.000000000 +0200 @@ -0,0 +1,126 @@ +## +## rpm-config -- OpenPKG RPM Library Build Utility +## Copyright (c) 2003 The OpenPKG Project <http://www.openpkg.org/> +## Copyright (c) 2003 Ralf S. Engelschall <[EMAIL PROTECTED]> +## Copyright (c) 2003 Cable & Wireless <http://www.cw.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## +## rpm-config.pod: manual page +## + +=pod + +=head1 NAME + +B<rpm-config> - OpenPKG RPM library build utility + +=head1 VERSION + +OpenPKG RPM RPM_VERSION + +=head1 SYNOPSIS + +B<rpm-config> +[B<--help>] +[B<--version>] +[B<--cc>] +[B<--cppflags>] +[B<--cflags>] +[B<--ldflags>] +[B<--libs>] + +=head1 DESCRIPTION + +The B<rpm-config> program is a little helper utility for easy +configuring and building applications based on the OpenPKG RPM library. +It can be used to query the C compiler and linker flags which are +required to correctly compile and link the application against the +RPM library. + +=head1 OPTIONS + +B<rpm-config> accepts the following options: + +=over 4 + +=item B<--help> + +Prints the short usage information. + +=item B<--version> + +Prints the version number and date of the installed RPM library. + +=item B<--cc> + +=item B<--cppflags> + +Prints the C pre-processor flags (C<-I>) which are needed to compile the +RPM-based application. The output is usually added to the C<CPPFLAGS> +variable of the applications C<Makefile>. + +=item B<--cflags> + +Prints the C compiler flags which are needed to compile the RPM-based +application. The output is usually added to the C<CFLAGS> variable of the +applications C<Makefile>. + +=item B<--ldflags> + +Prints the linker flags (C<-L>) which are needed to link the application with +the RPM library. The output is usually added to the C<LDFLAGS> variable of +the applications C<Makefile>. + +=item B<--libs> + +Prints the library flags (C<-l>) which are needed to link the application with +the RPM library. The output is usually added to the C<LIBS> variable of the +applications C<Makefile>. + +=back + +=head1 EXAMPLE + + CC = `rpm-config --cc` + CPPFLAGS = `rpm-config --cppflags` + CFLAGS = `rpm-config --cflags` + LDFLAGS = `rpm-config --ldflags` + LIBS = `rpm-config --libs` + + all: foo + + foo: foo.o + $(CC) $(LDFLAGS) -o foo foo.o $(LIBS) + + foo.o: foo.c + $(CC) $(CPPFLAGS) $(CFLAGS) -o foo.o -c foo.c + +=head1 SEE ALSO + +rpm(1), cc(1). + +=head1 AUTHOR + + Ralf S. Engelschall + [EMAIL PROTECTED] + www.engelschall.com + +=cut + @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpm-config.sh ============================================================================ $ cvs diff -u -r0 -r1.1 rpm-config.sh --- /dev/null 2003-09-07 10:25:56.000000000 +0200 +++ rpm-config.sh 2003-09-07 10:25:56.000000000 +0200 @@ -0,0 +1,97 @@ +#!/bin/sh +## +## rpm-config -- OpenPKG RPM Library Build Utility +## Copyright (c) 2003 The OpenPKG Project <http://www.openpkg.org/> +## Copyright (c) 2003 Ralf S. Engelschall <[EMAIL PROTECTED]> +## Copyright (c) 2003 Cable & Wireless <http://www.cw.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## +## rpm-config.sh: program +## + +rpm_version="@l_version@" +rpm_cc="@l_cc@" +rpm_cppflags="@l_cppflags@" +rpm_cflags="@l_cflags@" +rpm_ldflags="@l_ldflags@" +rpm_libs="@l_libs@" + +usage="rpm-config" +usage="$usage [--cc] [--cppflags] [--cflags] [--ldflags] [--libs]" +usage="$usage [--help] [--version]" +if [ $# -eq 0 ]; then + echo "rpm-config:Error: Invalid option" 1>&2 + echo "rpm-config:Usage: $usage" 1>&2 + exit 1 +fi + +output='' +prev='' +for option +do + if [ ".$prev" != . ]; then + eval "$prev=\$option" + prev='' + continue + fi + case "$option" in + -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg='' ;; + esac + case "$option" in + --help|-h) + echo "Usage: $usage" + exit 0 + ;; + --version|-v) + echo "OpenPKG RPM $rpm_version" + exit 0 + ;; + --cc) + output="$output $rpm_cc" + ;; + --cppflags) + output="$output $rpm_cppflags" + ;; + --cflags) + output="$output $rpm_cflags" + ;; + --ldflags) + output="$output $rpm_ldflags" + ;; + --libs) + output="$output $rpm_libs" + ;; + * ) + echo "rpm-config:Error: Invalid option" 1>&2 + echo "rpm-config:Usage: $usage" 1>&2 + exit 1; + ;; + esac +done +if [ ".$prev" != . ]; then + echo "rpm-config:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2 + exit 1 +fi + +if [ ".$output" != . ]; then + echo "$output" | sed -e 's/^ *//' -e 's/ *$//' +fi + @@ . patch -p0 <<'@@ .' Index: openpkg-web/news.txt ============================================================================ $ cvs diff -u -r1.6432 -r1.6433 news.txt --- openpkg-web/news.txt 6 Sep 2003 15:41:32 -0000 1.6432 +++ openpkg-web/news.txt 7 Sep 2003 08:25:54 -0000 1.6433 @@ -1,3 +1,4 @@ +07-Sep-2003: Upgraded package: P<openpkg-20030907-20030907> 06-Sep-2003: Upgraded package: P<mplayer-1.0pre1-20030906> 06-Sep-2003: Upgraded package: P<qt-3.2.1-20030906> 06-Sep-2003: Upgraded package: P<pnetlib-0.5.12-20030906> @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]