%define __build_nypatchy 1 %ifarch ppc ppc64 %define __arch ppc %else %define __arch x86_64 %endif Summary: CERNLIB Name: cernlib Version: 2006 Release: 10.12%{?dist}5b Source0: localhost:/2006_src.tar.gz Patch0: localhost:/cernlib2006-2006b-14.patch Patch1: localhost:/cernlib-2006-macosx10.9.patch Patch2: localhost:/cernlib-2006-macosx10.11.patch URL: http://wwwasd.web.cern.ch/wwwasd/cernlib/ Group: Development/Libraries License: CERN, INFN %define __prefix /cern Prefix: %{__prefix} %if %{__build_nypatchy} BuildRequires: patchy %endif BuildRoot: %{_tmppath}/%{name}-root %description The CERN Program Library is a large collection of general purpose libraries and modules maintained and offered in both source and object code form on the CERN central computers. The two most popular applications based on CERNLIB are PAW and GEANT 3.21. Most of these programs were developed at CERN and are therefore oriented towards the needs of a physics research laboratory that is general mathematics, data analysis, detectors simulation, data-handling etc... applicable to a wide range of problems. Some tools like cfortran.h are developed outside CERN. Some commercial softwares (e.g: NAG etc ...) have also been acquired. For any questions about CERNLIB contact Heplib.Support@cern.ch. %if %{__build_nypatchy} %package -n cernlib-nypatchy Summary: CERNLIB's nypatchy Group: Development/Libraries %description -n cernlib-nypatchy CERNLIB's source code management system. %endif %prep %setup -c %{name}-%{version} -q -a 0 ln -s 2006 pro ln -s 2006 new cd 2006/src %patch0 -p1 -b .m64 %patch1 -p1 -b .osx %patch2 -p1 -b .osx11 cd .. mkdir bin lib work cd lib ln -s /usr/lib/liblapack.dylib liblapack3.a ln -s /usr/lib/libblas.dylib libblas.a rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{__prefix}/2006 %build export CERN=`pwd` cd 2006 export CVSCOSRC=$CERN/2006/src cp $CVSCOSRC/scripts/cernlib bin/ cd work $CVSCOSRC/config/imake_boot export PATH=$PATH:$CERN/2006/bin make tree HAVE_MOTIF='YES' pushd packlib/kuip/programs/kuipc make make install.bin popd make %{?_smp_mflags} HAVE_MOTIF='YES' \ EXTRA_INCLUDES="-I/opt/X11/include/freetype2" cd packlib make %{?_smp_mflags} install.bin HAVE_MOTIF='YES' \ PACKAGE_LIB="$CERN/2006/lib/libpacklib.a" \ EXTRA_LOAD_FLAGS='-L/opt/osxws/lib -lgfortran' cd ../pawlib make %{?_smp_mflags} install.bin HAVE_MOTIF='YES' \ PACKAGE_LIB="$CERN/2006/lib/libpawlib.a" \ EXTRA_INCLUDES="-I$CERN/2006/src/pawlib/comis -I/opt/X11/include/freetype2" cd ../graflib make %{?_smp_mflags} install.bin HAVE_MOTIF='YES' \ EXTRA_INCLUDES="-I/opt/X11/include/freetype2" \ PACKAGE_LIB="$CERN/2006/lib/libgraflib.a" cd ../scripts make install.bin HAVE_MOTIF='YES' cd .. make install.include CERN_INCLUDEDIR=$CERN/2006/include %install export CERN=`pwd` cd 2006 tar -zcf - bin | tar -zxvf - -C $RPM_BUILD_ROOT%{__prefix}/2006 tar -zcf - lib | tar -zxvf - -C $RPM_BUILD_ROOT%{__prefix}/2006 tar -zcf - include | tar -zxvf - -C $RPM_BUILD_ROOT%{__prefix}/2006 find $RPM_BUILD_ROOT -type d | sed -e "s;$RPM_BUILD_ROOT;%dir ;" \ | grep -ve '^%dir %{__prefix}$' \ | grep -ve '^%dir /$' \ | grep -ve '^%dir $' > list.f find $RPM_BUILD_ROOT -type f | sed -e "s;$RPM_BUILD_ROOT;;" >> list.f find $RPM_BUILD_ROOT -type l | sed -e "s;$RPM_BUILD_ROOT;;" >> list.f mv list.f .. %if %{__build_nypatchy} # nypatchy export CVSCOSRC=$CERN/2006/src export PATH=$PATH:$CERN/2006/bin:%{__prefix}/patchy/4.15/bin cd work/patchy make %{?_smp_mflags} install.bin cp -p ../../bin/fcasplit $RPM_BUILD_ROOT%{__prefix}/2006/bin/ cp -p ../../bin/ny* $RPM_BUILD_ROOT%{__prefix}/2006/bin/ cp -p ../../bin/yexpand $RPM_BUILD_ROOT%{__prefix}/2006/bin/ %endif %clean rm -rf $RPM_BUILD_ROOT %files -f list.f %defattr(-,root,wheel) %if %{__build_nypatchy} %files -n cernlib-nypatchy %{__prefix}/2006/bin/fcasplit %{__prefix}/2006/bin/ny* %{__prefix}/2006/bin/yexpand %endif %changelog * Mon Dec 26 2016 Keisuke Fujii 2006-10.12hepx5b - 2nd release of automatic built version on MacOS X 10.12 for Intel Macs - built with OSXWS 10.12 * Sun Dec 18 2016 Keisuke Fujii 2006-10.12hepx5a - 1st release of automatic built version on MacOS X 10.12 for Intel Macs - built with OSXWS 10.11 - added a flag to switch on and off nypatchy. * Mon Feb 08 2016 Keisuke Fujii 2006-10.11hepx4a - 1st release of automatic built version on MacOS X 10.11 for Intel Macs - added cernlib-2006-macosx10.11.patch. * Wed Dec 24 2014 Keisuke Fujii 2006-10.10hepx3a - 1st release of automatic built version on MacOS X 10.10 for Intel Macs * Wed Aug 06 2014 Keisuke Fujii 2006-10.9hepx2b - 2nd release of automatic built version on MacOS X 10.9 for Intel Macs * Sun Dec 15 2013 Keisuke Fujii 2006-10.9hepx2a - 1st release of automatic built version on MacOS X 10.9 for Intel Macs - now nyptachy is built together with the main body cernlib. * Fri Nov 29 2013 Keisuke Fujii 2006-10.9hepx1a - 1st release on MacOS X 10.9 for Intel Macs * Wed May 02 2012 Keisuke Fujii 2006-10.7hepx1a - 1st release on MacOS X 10.7 for Intel Macs - now built for x86_64 * Tue Jan 25 2011 Keisuke Fujii 2006-10.6hepx1d - 4th release on MacOS X 10.6 for Intel Macs - rebuilt with gcc4.5.1 and linked against libgfortran.dylib * Sat Nov 13 2010 Keisuke Fujii 2006-10.6hepx1c - 3rd release on MacOS X 10.6 for Intel Macs - rebuilt with gcc4.5.1 * Fri Oct 01 2010 Keisuke Fujii 2006-10.6hepx1b - 2nd release on MacOS X 10.6 for Intel Macs - rebuilt with gcc4.5.1 * Sun Mar 07 2010 Keisuke Fujii 2006-10.6hepx1a - 1st release on MacOS X 10.6 for PPC Macs with paw++ and nypatchy. * Thu Aug 14 2008 Keisuke Fujii 2006-10.5hepx1e - 3rd release on MacOS X 10.5 for PPC Macs with paw++ and nypatchy. * Fri Aug 8 2008 Keisuke Fujii 2006-10.5hepx1d - 3rd release on MacOS X 10.5 for Intel Macs with paw++. - Fixed double-free problem in kmfile.c. * Mon Aug 4 2008 Keisuke Fujii 2006-10.5hepx1c - 2nd release on MacOS X 10.5 for Intel Macs with paw++. * Thu Mar 27 2008 Keisuke Fujii 2006-10.5hepx1b - 1st release on MacOS X 10.5 for PPC Macs. * Wed Mar 26 2008 Keisuke Fujii 2006-10.5hepx1a - 1st release on MacOS X 10.5 for Intel Macs. * Wed Apr 18 2007 Keisuke Fujii 2006-1b - 2nd release on MacOS X 10.4 for Intel Macs. * Wed Mar 7 2007 Keisuke Fujii 2006-1a - 1st release on MacOS X 10.4 for Intel Macs.