From 3c3231d840c4cbbc8a457b0e5c8314fb68b27f9a Mon Sep 17 00:00:00 2001 From: pertusus Date: May 26 2007 19:33:09 +0000 Subject: - add link to $CERN_ROOT/bin/dzeX11 - use %{name} in the Requires - Provides %{name}-static - allow utilities to have another suffix than libs. This allows to have the utilities compiled with g77 and the default libraries compiled with gfortran --- diff --git a/cernlib.spec b/cernlib.spec index bf5e2a5..c29c4a9 100644 --- a/cernlib.spec +++ b/cernlib.spec @@ -6,9 +6,14 @@ # compiler is used to disambiguate package names and executables %if %{with gfortran} +# allows to use a suffix for the library different from the suffix +# for the utilities +# %%define utils_suffix -gfortran %else %define compiler -g77 -%define compat compat- +# no compat prefix, the utilities compiled with gfortran are non functionnal +# see Bug 241416 +#%%define compat compat- %endif # verdir is the directory used for libraries and replaces the version # in some files and file names @@ -17,7 +22,7 @@ Name: %{?compat}cernlib%{?compiler} Version: 2006 -Release: 13%{?dist} +Release: 14%{?dist} Summary: General purpose CERN library and associated binaries Group: Development/Libraries # As explained in the cernlib on debian FAQ, cfortran can be considered LGPL. @@ -341,6 +346,7 @@ Requires: xbae-devel libXaw-devel Requires: libXau-devel %endif Requires: %{name} = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} Group: Development/Libraries # for the m4 macro directory ownership @@ -369,11 +375,11 @@ This package will conflict with other versions, therefore if you want to have different compile script and different environments for different versions of the library you have to set them by hand. -%package -n %{?compat}paw%{?compiler} +%package -n %{?compat}paw%{?utils_suffix} Group: Applications/Engineering Summary: A program for the analysis and presentation of data -%description -n %{?compat}paw%{?compiler} +%description -n %{?compat}paw%{?utils_suffix} PAW is conceived as an instrument to assist physicists in the analysis and presentation of their data. It provides interactive graphical presentation and statistical or mathematical analysis, working on objects familiar to @@ -383,7 +389,8 @@ based on several components of the CERN Program Library. %package -n %{?compat}geant321%{?compiler} Summary: Particle detector description and simulation tool Group: Applications/Engineering -Requires: cernlib-devel cernlib-utils +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-utils = %{version}-%{release} %description -n %{?compat}geant321%{?compiler} Geant simulates the passage of subatomic particles through matter, for instance, particle detectors. For maximum flexibility, Geant simulations @@ -392,12 +399,12 @@ libraries, then running the resulting executable. This package includes gxint, the script used to perform this linking step. -%package -n %{?compat}kuipc%{?compiler} +%package -n %{?compat}kuipc%{?utils_suffix} Summary: Cernlib's Kit for a User Interface Package (KUIP) compiler Group: Development/Languages -Requires: cernlib-devel +Requires: %{name}-devel = %{version}-%{release} -%description -n %{?compat}kuipc%{?compiler} +%description -n %{?compat}kuipc%{?utils_suffix} KUIPC, the Kit for a User Interface Package Compiler, is a tool to simplify the writing of a program's user interface code. It takes as input a Command Definition File (CDF) that describes the commands to be understood by the @@ -416,11 +423,11 @@ Library. According to the responsible of the cernlib debian package, some of these utilities may have security flaws. -%package -n %{?compat}patchy%{?compiler} +%package -n %{?compat}patchy%{?utils_suffix} Group: Applications/Archiving Summary: The patchy utilities -%description -n %{?compat}patchy%{?compiler} +%description -n %{?compat}patchy%{?utils_suffix} Utilities for extracting sources from patchy cards and cradles. @@ -733,7 +740,10 @@ sed -i -e 's:"/cern":"%{_libdir}/cernlib/":' -e 's:"pro":"%{verdir}":' \ # substitute version in gxint with the right version # substitute includedir in gxint to conform to FHS, and gxint.o to gxint.f -sed -i -e 's/"pro"/%{version}/' -e 's:\${CERN}/\${ver}/lib/gxint\${gvs}\.\$_o:%{_includedir}/cernlib/\${ver}/gxint.f:' src/scripts/gxint +# and substitue the name of the cernlib link script +sed -i -e 's/"pro"/%{version}/' -e 's:\${CERN}/\${ver}/lib/gxint\${gvs}\.\$_o:%{_includedir}/cernlib/\${ver}/gxint.f:' \ + -e 's/`cernlib /cernlib%{?compiler} /' \ + src/scripts/gxint # substitute DATADIR in source files to conform to FHS sed -i -e 's:DATADIR:%{_datadir}/cernlib/%{version}:' \ @@ -907,16 +917,25 @@ cd %{version} # avoid name conflicts for files in bin -if [ 'z%{?compiler}' != 'z' ]; then +# first move cernlib and gxint scripts out of the way +for file in cernlib cernlib-static gxint; do + mv %{buildroot}%{_bindir}/$file $file%{?compiler} +done + +# then modify utilities names +if [ 'z%{?utils_suffix}' != 'z' ]; then for file in %{buildroot}%{_bindir}/*; do - mv $file ${file}%{compiler} + mv $file ${file}%{utils_suffix} done fi +# move gxint and cernlib scripts back +mv cernlib%{?compiler} cernlib-static%{?compiler} gxint%{?compiler} \ + %{buildroot}%{_bindir}/ - -# add a link to pawX11 from %{_libdir}/cernlib/%{verdir}/bin +# add a link to pawX11 and dzeX11 from %{_libdir}/cernlib/%{verdir}/bin %{__install} -d -m755 %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/ -%{__ln_s} %{_bindir}/pawX11%{?compiler} %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/pawX11 +%{__ln_s} %{_bindir}/pawX11%{?utils_suffix} %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/pawX11 +%{__ln_s} %{_bindir}/dzeX11%{?utils_suffix} %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/dzeX11 # to preserve symlinks and timestamps (cd lib && tar cf - *.a) | (cd %{buildroot}%{_libdir}/cernlib/%{verdir}/lib && tar xf -) @@ -967,11 +986,11 @@ done %{__install} -d -m755 %{buildroot}/%{_datadir}/X11/app-defaults %{__install} -p -m644 ../../*/debian/add-ons/app-defaults/* %{buildroot}/%{_datadir}/X11/app-defaults/ -sed -e 's/Exec=paw++/Exec=paw++%{?compiler}/' -e 's/PAW++/PAW++%{?compiler}/' \ - ../../paw*/debian/add-ons/misc/paw++.desktop > paw++%{?compiler}.desktop +sed -e 's/Exec=paw++/Exec=paw++%{?utils_suffix}/' -e 's/PAW++/PAW++%{?utils_suffix}/' \ + ../../paw*/debian/add-ons/misc/paw++.desktop > paw++%{?utils_suffix}.desktop desktop-file-install --vendor="fedora" \ --dir=%{buildroot}/%{_datadir}/applications \ - paw++%{?compiler}.desktop + paw++%{?utils_suffix}.desktop %{__install} -d -m755 %{buildroot}/%{_datadir}/pixmaps @@ -1021,11 +1040,11 @@ rm -rf %{buildroot} %postun -p /sbin/ldconfig -%post -n %{?compat}paw%{?compiler} +%post -n %{?compat}paw%{?utils_suffix} touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : -%postun -n %{?compat}paw%{?compiler} +%postun -n %{?compat}paw%{?utils_suffix} touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : @@ -1064,15 +1083,15 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_sysconfdir}/profile.d/cernlib-%{verdir}.csh %{_mandir}/man1/cernlib*.1* -%files -n %{?compat}paw%{?compiler} +%files -n %{?compat}paw%{?utils_suffix} %defattr(-,root,root,-) %doc paw.README -%{_bindir}/paw++%{?compiler} -%{_bindir}/paw%{?compiler} -%{_bindir}/pawX11%{?compiler} -%{_bindir}/pawX11.dynamic%{?compiler} -%{_bindir}/paw++.dynamic%{?compiler} -# paw doesn't depend on the main package, so it must own the dirs +%{_bindir}/paw++%{?utils_suffix} +%{_bindir}/paw%{?utils_suffix} +%{_bindir}/pawX11%{?utils_suffix} +%{_bindir}/pawX11.dynamic%{?utils_suffix} +%{_bindir}/paw++.dynamic%{?utils_suffix} +# paw doesn't explicitly depend on the main package, so it owns the dirs %dir %{_libdir}/cernlib/%{verdir} %dir %{_libdir}/cernlib/%{verdir}/bin %{_libdir}/cernlib/%{verdir}/bin/pawX11 @@ -1088,31 +1107,35 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_datadir}/X11/app-defaults/*Geant++ %{_mandir}/man1/gxint.1* -%files -n %{?compat}kuipc%{?compiler} +%files -n %{?compat}kuipc%{?utils_suffix} %defattr(-,root,root,-) -%{_bindir}/kuipc%{?compiler} +%{_bindir}/kuipc%{?utils_suffix} %{_mandir}/man1/kuipc.1* %files packlib %defattr(-,root,root,-) %doc cernlib-2006.dfsg.2/debian/debhelper/zftp.README.debian -%{_bindir}/cdbackup%{?compiler} -%{_bindir}/cdserv%{?compiler} -%{_bindir}/dzedit%{?compiler} -%{_bindir}/dzeX11%{?compiler} -%{_bindir}/fatmen%{?compiler} -%{_bindir}/fatsrv%{?compiler} -%{_bindir}/kuesvr%{?compiler} -%{_bindir}/zserv%{?compiler} -%{_bindir}/cdmake%{?compiler} -%{_bindir}/fatnew%{?compiler} -%{_bindir}/pawserv%{?compiler} -%{_bindir}/cdmove%{?compiler} -%{_bindir}/fatback%{?compiler} -%{_bindir}/fatsend%{?compiler} -%{_bindir}/hepdb%{?compiler} -%{_bindir}/kxterm%{?compiler} -%{_bindir}/zftp%{?compiler} +%{_bindir}/cdbackup%{?utils_suffix} +%{_bindir}/cdserv%{?utils_suffix} +%{_bindir}/dzedit%{?utils_suffix} +# packlib doesn't explicitly depend on the main package, so it owns the dirs +%dir %{_libdir}/cernlib/%{verdir} +%dir %{_libdir}/cernlib/%{verdir}/bin +%{_libdir}/cernlib/%{verdir}/bin/dzeX11 +%{_bindir}/dzeX11%{?utils_suffix} +%{_bindir}/fatmen%{?utils_suffix} +%{_bindir}/fatsrv%{?utils_suffix} +%{_bindir}/kuesvr%{?utils_suffix} +%{_bindir}/zserv%{?utils_suffix} +%{_bindir}/cdmake%{?utils_suffix} +%{_bindir}/fatnew%{?utils_suffix} +%{_bindir}/pawserv%{?utils_suffix} +%{_bindir}/cdmove%{?utils_suffix} +%{_bindir}/fatback%{?utils_suffix} +%{_bindir}/fatsend%{?utils_suffix} +%{_bindir}/hepdb%{?utils_suffix} +%{_bindir}/kxterm%{?utils_suffix} +%{_bindir}/zftp%{?utils_suffix} %{_datadir}/X11/app-defaults/KXterm %{_datadir}/pixmaps/kxterm*.xpm %{_mandir}/man1/kxterm.1* @@ -1121,40 +1144,48 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_mandir}/man1/zftp.1* %{_mandir}/man8/*.8* -%files -n %{?compat}patchy%{?compiler} +%files -n %{?compat}patchy%{?utils_suffix} %defattr(-,root,root,-) -%{_bindir}/fcasplit%{?compiler} -%{_bindir}/nycheck%{?compiler} -%{_bindir}/nydiff%{?compiler} -%{_bindir}/nyindex%{?compiler} -%{_bindir}/nylist%{?compiler} -%{_bindir}/nymerge%{?compiler} -%{_bindir}/nypatchy%{?compiler} -%{_bindir}/nyshell%{?compiler} -%{_bindir}/nysynopt%{?compiler} -%{_bindir}/nytidy%{?compiler} -%{_bindir}/yexpand%{?compiler} -%{_bindir}/ycompar%{?compiler} -%{_bindir}/yedit%{?compiler} -%{_bindir}/yfrceta%{?compiler} -%{_bindir}/yindex%{?compiler} -%{_bindir}/yindexb%{?compiler} -%{_bindir}/ylist%{?compiler} -%{_bindir}/ylistb%{?compiler} -%{_bindir}/ypatchy%{?compiler} -%{_bindir}/ysearch%{?compiler} -%{_bindir}/yshift%{?compiler} -%{_bindir}/ytobcd%{?compiler} -%{_bindir}/ytobin%{?compiler} -%{_bindir}/ytoceta%{?compiler} +%{_bindir}/fcasplit%{?utils_suffix} +%{_bindir}/nycheck%{?utils_suffix} +%{_bindir}/nydiff%{?utils_suffix} +%{_bindir}/nyindex%{?utils_suffix} +%{_bindir}/nylist%{?utils_suffix} +%{_bindir}/nymerge%{?utils_suffix} +%{_bindir}/nypatchy%{?utils_suffix} +%{_bindir}/nyshell%{?utils_suffix} +%{_bindir}/nysynopt%{?utils_suffix} +%{_bindir}/nytidy%{?utils_suffix} +%{_bindir}/yexpand%{?utils_suffix} +%{_bindir}/ycompar%{?utils_suffix} +%{_bindir}/yedit%{?utils_suffix} +%{_bindir}/yfrceta%{?utils_suffix} +%{_bindir}/yindex%{?utils_suffix} +%{_bindir}/yindexb%{?utils_suffix} +%{_bindir}/ylist%{?utils_suffix} +%{_bindir}/ylistb%{?utils_suffix} +%{_bindir}/ypatchy%{?utils_suffix} +%{_bindir}/ysearch%{?utils_suffix} +%{_bindir}/yshift%{?utils_suffix} +%{_bindir}/ytobcd%{?utils_suffix} +%{_bindir}/ytobin%{?utils_suffix} +%{_bindir}/ytoceta%{?utils_suffix} %changelog +* Sat May 26 2007 Patrice Dumas 2006-14 +- add link to $CERN_ROOT/bin/dzeX11 +- use %%{name} in the Requires +- Provides %%{name}-static +- allow utilities to have another suffix than libs. This allows to + have the utilities compiled with g77 and the default libraries compiled + with gfortran + * Wed May 23 2007 Patrice Dumas 2006-13 - remove reference to %%{_libdir} and X11R6 path in cernlib script - apply cernlib-static script patch - add packlib-lesstif only if Motif driver is selected. This driver - is selected in the default case for geant321, packlib and pawlib + is selected in the default case for geant321 and pawlib - build and ship the graflib utilities * Mon May 14 2007 Patrice Dumas 2006-11