OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-doc Date: 06-Mar-2003 14:18:19
Branch: HEAD Handle: 2003030613181800
Modified files:
openpkg-doc/handbook 00TODO
Log:
Remember sections on build variables, macros, and CLASSPATH.
Summary:
Revision Changes Path
1.24 +29 -1 openpkg-doc/handbook/00TODO
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-doc/handbook/00TODO
============================================================================
$ cvs diff -u -r1.23 -r1.24 00TODO
--- openpkg-doc/handbook/00TODO 26 Feb 2003 11:10:57 -0000 1.23
+++ openpkg-doc/handbook/00TODO 6 Mar 2003 13:18:18 -0000 1.24
@@ -24,6 +24,7 @@
- Uebersicht von .rpmmacros und verfugbare Variabeln.
- Pakherln Instance-abbreviation
- Update how many packages (about 500?)
+- Java path standards (%{l_prefix}/lib/java/ CLASSPATH), add to rc.j2se
Verschoben
- Index.
@@ -58,9 +59,36 @@
Using .rpmmacros to customize
"How can i override the CFLAGS default for all packages?"
You should be able to achieve this by overriding the l_cc and l_cflags
-variables in your ~/.rpmmacros
+variables in your ~/.rpmmacros. This is especially useful when bootstrapping
+platforms where OpenPKG does not initially find a C compiler in the path.
%l_cc gcc
+ (or) %l_cc /usr/local/bin/gcc
%l_cflags -pipe -O3 -march=i686 -funroll-loops
+Alternatively, you can override <tt>%l_cc</tt> for a single rebuild by defining
"with_cc".
+ .../rpm --define "with_cc /usr/local/bin/gcc" --rebuild ...
+
+Macros in specfile
+OpenPKG's RPM additionally provides a set of local macros (C<%{l_xxx}>)
+to abstract system specifics and also help in removing redundancy from
+packaging specifications. For example, the C<%{l_prefix}> is the file
+system I<prefix> of the associated OpenPKG instance. Using OpenPKG's
+local macros offers a clear advantage, because packages no longer need
+hard-coded path prefixes and can therefore be built for arbitrary
+OpenPKG instances.
+
+Macros exist for the most often used build variables. The C<%{l_cc}>
+macro expands to either I<prefix>C</bin/cc> (in case the OpenPKG C<gcc>
+package is installed) or defaults to just C<cc>. The same goes for
+C<%{l_cflags -O}>: it expands to the optimized C compiler flags. In
+case C<gcc> is installed, it expands to "C<-O2 -pipe>". Otherwise,
+it expands to just C<-O> by default. The variables C<%{l_make}> and
+C<%{l_mflags}> work together in a similar way. If C<%{l_make}> points
+to a known C<make> which supports parallel building and the underlying
+system has more than one CPU, then C<%{l_mflags -O}> expands to the
+necessary flags to leverage the system's multiple processing power. For
+example, on a 2 CPU FreeBSD 4.x machine with BSD make, C<%{l_mflags
+-O}> expands to C<-j4 -B> while on a 4 CPU Linux machine with GNU make,
+C<%{l_mflags -O}> expands to C<--no-print-directory -j8>.
Prerequisites in detail
jdk-sun is based in JDK package from Sun which is available binary only
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]