3.6.2 has a new build system supporting shared libs

epel9
Ed Hill 18 years ago
parent 99a097d169
commit b312e36dc6

@ -1 +1 @@
netcdf-3.6.1.tar.gz netcdf-3.6.2.tar.bz2

@ -1,22 +1,27 @@
Name: netcdf Name: netcdf
Version: 3.6.1 Version: 3.6.2
Release: 4%{?dist} Release: 1%{?dist}
Summary: Libraries for the Unidata network Common Data Form (NetCDF v3) Summary: Libraries for the Unidata network Common Data Form (NetCDF v3)
Group: Applications/Engineering Group: Applications/Engineering
License: NetCDF License: NetCDF
URL: http://my.unidata.ucar.edu/content/software/netcdf/index.html URL: http://my.unidata.ucar.edu/content/software/netcdf/index.html
Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.6.1.tar.gz Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.6.2.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran BuildRequires: gcc-gfortran
BuildRequires: compat-gcc-34-g77 # BuildRequires: compat-gcc-34-g77
%package devel %package devel
Summary: Development files for netcdf-3 Summary: Development files for netcdf-3
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%package static
Summary: Static libs for netcdf-3
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description %description
NetCDF-3 (network Common Data Form ver3) is an interface for NetCDF-3 (network Common Data Form ver3) is an interface for
array-oriented data access and a freely-distributed collection of array-oriented data access and a freely-distributed collection of
@ -49,78 +54,71 @@ NetCDF data is:
access the same NetCDF file. access the same NetCDF file.
%description devel %description devel
This package contains the netCDF-3 header files, static libs, and man This package contains the netCDF-3 header files, shared devel libs, and
pages. man pages.
%description static
This package contains the netCDF-3 static libs.
%prep %prep
%setup -q %setup -q
%build %build
cd src
export FC="g77"
export F90=
export CPPFLAGS="-fPIC -Df2cFortran"
export FFLAGS="-fPIC"
%configure
# WARNING!
# The parallel build was tested and it does NOT work.
# make %{?_smp_mflags}
make
mkdir lib_g77
cp libsrc/libnetcdf.a lib_g77
make clean
export FC="gfortran" export FC="gfortran"
export F90="gfortran" export F90="gfortran"
export CPPFLAGS="-fPIC -DpgiFortran" export CPPFLAGS="-fPIC"
%configure export FFLAGS="-fPIC ${RPM_OPT_FLAGS}"
make export F90FLAGS="$FFLAGS"
# The below seems to work but I worry that it would lead to odd runtime export FCFLAGS="$FFLAGS"
# errors due to possible symbol collisions in the "cfortran.h" bits. %configure --enable-shared
# The safer thing to do is to simply build and install two libraries, make %{?_smp_mflags}
# one for the older g77 and one for gfortran.
# ar cru libsrc/libnetcdf.a lib_g77/libnetcdf.a
unset FC
unset F90
unset CPPFLAGS
unset FFLAGS
%install %install
rm -rf ${RPM_BUILD_ROOT} %makeinstall
mkdir ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3 mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3 /bin/mv ${RPM_BUILD_ROOT}%{_includedir}/*.* \
mkdir -p ${RPM_BUILD_ROOT}%{_datadir} ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3
mkdir -p ${RPM_BUILD_ROOT}%{_mandir} /bin/rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
cd src #
%makeinstall INCDIR=${RPM_BUILD_ROOT}%{_includedir}/netcdf-3 \ # Does the /usr/include/netcdf-3/netcdf.mod file really belong in
LIBDIR=${RPM_BUILD_ROOT}%{_libdir}/netcdf-3 \ # /usr/include/netcdf-3/ or should it go in /usr/lib/netcdf-3 ???
MANDIR=${RPM_BUILD_ROOT}%{_mandir} # I suppose this should be decided on after some testing since the
cp lib_g77/libnetcdf.a ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3/libnetcdf_g77.a # gfortran *.mod file appears to be ACSII text, not a binary file.
rm -rf ${RPM_BUILD_ROOT}%{_mandir}/man3f* #
find ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3 -type f | xargs chmod 644 # mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3
find ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3 -type f | xargs chmod 644 # /bin/mv -f ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3/*.mod
find ${RPM_BUILD_ROOT}%{_mandir} -type f | xargs chmod 644 # ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3
%clean %clean
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc src/COPYRIGHT src/README %doc COPYRIGHT README
%{_bindir}/* %{_bindir}/*
%{_libdir}/*.so.*
%{_mandir}/man1/* %{_mandir}/man1/*
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_includedir}/netcdf-3 %{_includedir}/netcdf-3
%{_libdir}/netcdf-3 %{_libdir}/*.so
%{_mandir}/man3/* %{_mandir}/man3/*
%files static
%defattr(-,root,root,-)
%{_libdir}/*.a
%changelog %changelog
* Sat Mar 17 2007 Ed Hill <ed@eh3.com> - 3.6.2-1
- 3.6.2 has a new build system supporting shared libs
* Sat Sep 2 2006 Ed Hill <ed@eh3.com> - 3.6.1-4 * Sat Sep 2 2006 Ed Hill <ed@eh3.com> - 3.6.1-4
- switch to compat-gcc-34-g77 instead of compat-gcc-32-g77 - switch to compat-gcc-34-g77 instead of compat-gcc-32-g77

@ -1 +1 @@
07a9db424337c5e4833fb84136e09a1e netcdf-3.6.1.tar.gz 1eca0ea1e81e14ebc5bb93e5dd25c364 netcdf-3.6.2.tar.bz2

Loading…
Cancel
Save