OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 05-Jun-2007 19:46:42
Branch: HEAD Handle: 2007060518464200
Modified files:
openpkg-src/openpkg-import
openpkg-import.spec
Log:
allow one to replace binutils and gcc
Summary:
Revision Changes Path
1.15 +33 -1 openpkg-src/openpkg-import/openpkg-import.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg-import/openpkg-import.spec
============================================================================
$ cvs diff -u -r1.14 -r1.15 openpkg-import.spec
--- openpkg-src/openpkg-import/openpkg-import.spec 1 Jan 2007 17:40:24
-0000 1.14
+++ openpkg-src/openpkg-import/openpkg-import.spec 5 Jun 2007 17:46:42
-0000 1.15
@@ -33,9 +33,11 @@
Group: System
License: GPL
Version: 0
-Release: 20061013
+Release: 20070605
# package options
+%option with_binutils no
+%option with_gcc no
%option with_mta no
%option with_mta_path sendmail
@@ -46,6 +48,12 @@
PreReq: OpenPKG, openpkg >= 20040130
AutoReq: no
AutoReqProv: no
+%if "%{with_binutils}" == "yes"
+Provides: binutils = 2.14-%{release}
+%endif
+%if "%{with_gcc}" == "yes"
+Provides: gcc = 4.0-%{release}
+%endif
%if "%{with_mta}" == "yes"
Provides: MTA
Conflicts: exim, postfix, sendmail, ssmtp
@@ -64,6 +72,30 @@
%install
rm -rf $RPM_BUILD_ROOT
+%if "%{with_binutils}" == "yes"
+ # with_binutils uses the system tool chain commands
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/bin
+ for tool_name in addr2line ar as gprof ld nm objcopy objdump ranlib
readelf size strings; do
+ tool_path="`%{l_shtool} path
-p/bin:/usr/bin:/sbin:/usr/sbin:/usr/ccs/bin $tool_name`"
+ if [ ".$tool_path" != . ]; then
+ ln -s $tool_path $RPM_BUILD_ROOT%{l_prefix}/bin/$tool_name
+ fi
+ done
+%endif
+
+%if "%{with_gcc}" == "yes"
+ # with_gcc uses the system compiler commands
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/bin
+ for tool_name in gcc g++ c%{l_nil}c c++ cpp; do
+ tool_path="`%{l_shtool} path
-p/bin:/usr/bin:/sbin:/usr/sbin:/usr/ccs/bin $tool_name`"
+ if [ ".$tool_path" != . ]; then
+ ln -s $tool_path $RPM_BUILD_ROOT%{l_prefix}/bin/$tool_name
+ fi
+ done
+%endif
+
%if "%{with_mta}" == "yes"
# with_mta tries with_mta_path when absolute or hunts for
with_mta_path in well known places
sendmail="%{with_mta_path}"
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]