From: Jack H. <ho...@br...> - 2010-04-25 02:10:48
|
If I use the same approach as the dbXX package, a change like... --- gcc46-x86_64.info.current 2010-04-24 19:50:20.000000000 -0400 +++ gcc46-x86_64.info 2010-04-24 22:03:32.000000000 -0400 @@ -13,8 +13,8 @@ Architecture: x86_64 NoSetCPPFLAGS: True NoSetLDFLAGS: True -Conflicts: gcc4, gcc42, gcc43, gcc44, gcc45 -Replaces: gcc4, gcc42, gcc43, gcc44, gcc45 +Conflicts: gcc42, gcc43, gcc44, gcc45 +Replaces: gcc42, gcc43, gcc44, gcc45 Depends: gmp-shlibs (>= 4.3.1-1000), libgmpxx-shlibs (>= 4.3.1-1000), libmpfr1-shlibs (>= 2.4.1-1), %N-shlibs (>= %v-%r), libiconv, libgettext8-shlibs, ppl-shlibs (>= 0.10.2-1), cloog-shlibs (>= 0.15.9-1), libmpc2-shlibs (>= 0.8-1), xcode (>= 3.1.2) BuildDepends: gmp (>= 4.3.1-1000), libmpfr1 (>= 2.4.1-1), libiconv-dev, gettext-tools, libgettext8-dev, ppl (>= 0.10.2-1), cloog (>= 0.15.9-1), libmpc2 (>= 0.8-1), xcode (>= 3.1.2), fink (>= 0.27.2) ConfigureParams: << @@ -44,22 +44,11 @@ cd ../darwin_objdir make install DESTDIR=%d mkdir -p %i/bin - ln -s %p/lib/gcc4.6/bin/gfortran %i/bin/gfortran - ln -s %p/lib/gcc4.6/bin/gcc %i/bin/gcc-4 - ln -s %p/lib/gcc4.6/bin/g++ %i/bin/g++-4 - ln -s %p/lib/gcc4.6/bin/c++ %i/bin/c++-4 - ln -s %p/lib/gcc4.6/bin/cpp %i/bin/cpp-4 - ln -s %p/lib/gcc4.6/bin/gcov %i/bin/gcov-4 - ln -s %p/lib/gcc4.6/bin/gcj %i/bin/gcj - ln -s %p/lib/gcc4.6/bin/gcj-dbtool %i/bin/gcj-dbtool - ln -s %p/lib/gcc4.6/bin/gcjh %i/bin/gcjh - ln -s %p/lib/gcc4.6/bin/gij %i/bin/gij - ln -s %p/lib/gcc4.6/bin/gjnih %i/bin/gjnih - ln -s %p/lib/gcc4.6/bin/grmiregistry %i/bin/grmiregistry - ln -s %p/lib/gcc4.6/bin/grmic %i/bin/grmic - ln -s %p/lib/gcc4.6/bin/jcf-dump %i/bin/jcf-dump - ln -s %p/lib/gcc4.6/bin/jv-convert %i/bin/jv-convert - ln -s %p/lib/gcc4.6/bin/jv-scan %i/bin/jv-scan + mv %i/lib/gcc4.6/bin/gcc %i/lib/gcc4.6/bin/gcc-4 + mv %i/lib/gcc4.6/bin/g++ %i/lib/gcc4.6/bin/g++-4 + mv %i/lib/gcc4.6/bin/c++ %i/lib/gcc4.6/bin/c++-4 + mv %i/lib/gcc4.6/bin/cpp %i/lib/gcc4.6/bin/cpp-4 + mv %i/lib/gcc4.6/bin/gcov %i/lib/gcc4.6/bin/gcov-4 mv %i/share/info/cpp.info %i/share/info/cpp-4.info mv %i/share/info/gcc.info %i/share/info/gcc-4.info mv %i/share/man/man1/cpp.1 %i/share/man/man1/cpp-4.1 @@ -127,6 +116,28 @@ %p/lib/gcc4.6/lib/i386/gcj-4.6.0-12/libjvm.dylib 0.0.0 %n (>= 4.1-1) 32 << << +SplitOff2: << + Package: %N-bin + Conflicts: gcc42 (<= 4.2.4-1002), gcc43 (<= 4.3.4-1000), gcc44 (<= 4.4.2-1000), gcc45 (<= 4.5.0-1000), gcc42-bin (>> 4.2.4-1002), gcc43-bin (>> 4.3.4-1000), gcc44-bin (>> 4.4.2-1000), gcc45-bin (>> 4.5.0-1000) + Replaces: gcc42 (<= 4.2.4-1002), gcc43 (<= 4.3.4-1000), gcc44 (<= 4.4.2-1000), gcc45 (<= 4.5.0-1000), gcc42-bin (>> 4.2.4-1002), gcc43-bin (>> 4.3.4-1000), gcc44-bin (>> 4.4.2-1000), gcc45-bin (>> 4.5.0-1000) + Depends: %N (= %v-%r), %N-shlibs (= %v-%r) + Files: << + bin + << + PostInstScript: << + binfiles="gfortran gcc-4 g++-4 c++-4 cpp-4 gcov-4 gcj gcj-dbtool gcjh gij gjnih grmiregistry grmic jcf-dump jv-convert jv-scan" + priority=`echo %N | sed -e 's/[^0-9]//g'` + for binfile in $binfiles ; do + update-alternatives --install %p/bin/$binfile $binfile %p/lib/gcc-4.6/bin/$binfile $priority + done + << + PreRmScript: << + binfiles="gfortran gcc-4 g++-4 c++-4 cpp-4 gcov-4 gcj gcj-dbtool gcjh gij gjnih grmiregistry grmic jcf-dump jv-convert jv-scan" + for binfile in $binfiles ; do + update-alternatives --remove $binfile %p/bin/$binfile + done + << +<< License: GPL Description: GNU Compiler Collection Version 4.6 InfoDocs: cpp-4.info cppinternals.info gcc-4.info gccinstall.info gccint.info gcj.info gfortran.info This still leaves the issue of the man and info pages which will overlap if gcc4X packages can co-exist. Jack |