eccodes/rpms/eccodes.spec.in

132 lines
4.0 KiB
Plaintext
Raw Normal View History

2013-03-25 12:04:10 +00:00
# -*- Mode:rpm-spec -*-
2015-02-20 13:54:12 +00:00
Summary: The ECMWF ecCodes package is an application program interface accessible from C, FORTRAN and Python programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
2013-03-25 12:04:10 +00:00
%define rel @RPM_RELEASE@
%define version @VERSION@
%define pkgname @PACKAGE@
%define prefix @prefix@
%define _prefix @prefix@
%define _target_platform @RPM_HOST_CPU@-@RPM_HOST_VENDOR@-@RPM_HOST_OS@
%define _target_cpu @RPM_HOST_CPU@
%define _enable_python %(test -z "@WITH_PYTHON_TRUE@" && echo 1 || echo 0)
%define _enable_fortran %(test -z "@WITH_FORTRAN_TRUE@" && echo 1 || echo 0)
%define _requires_openjpeg %(test -n "@LIB_OPENJPEG@" && echo 1 || echo 0)
%define _requires_jasper %(test -n "@LIB_JASPER@" && echo 1 || echo 0)
%define lt_release @LT_RELEASE@
%define lt_version @LT_CURRENT@.@LT_REVISION@.@LT_AGE@
%define __aclocal aclocal || aclocal -I ./macros
%define configure_args @RPM_CONFIGURE_ARGS@
Name: %{pkgname}
Version: %{version}
Release: %{rel}
Distribution: @LINUX_DISTRIBUTION_NAME@ @LINUX_DISTRIBUTION_VERSION@
Vendor: ECMWF
License: Apache Licence version 2.0
Group: Scientific/Libraries
Source: %{pkgname}-%{version}.tar.gz
%if %{_requires_jasper}
Requires: libjasper
%endif
%if %{_requires_openjpeg}
Requires: openjpeg
%endif
Buildroot: /tmp/%{pkgname}-root
URL: http://www.ecmwf.int
Prefix: %{prefix}
BuildArchitectures: %{_target_cpu}
Packager: Software Support <software.support@ecmwf.int>
%description
2015-02-20 13:54:12 +00:00
The ECMWF ecCodes package is an application program interface accessible from C, FORTRAN and Python programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
2013-03-25 12:04:10 +00:00
%changelog
* Thu Mar 15 2012 - Get the changelog from JIRA
- Multiple bugfixes
%prep
%setup
#%patch
%build
%configure %{?configure_args}
2013-03-25 12:04:10 +00:00
# This is why we copy the CFLAGS to the CXXFLAGS in configure.in
# CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{prefix}
make
%install
# To make things work with BUILDROOT
echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
rm -rf "$RPM_BUILD_ROOT"
make DESTDIR="$RPM_BUILD_ROOT" install
%clean
%files
%defattr(-, root, root)
%doc ChangeLog README AUTHORS NEWS LICENSE
#%doc doc/*
%prefix/bin/*
%prefix/lib*/libeccodes.so
%prefix/lib*/libeccodes.so.*
2015-02-18 13:44:34 +00:00
%prefix/share/eccodes/definitions/*
2013-03-25 12:04:10 +00:00
# If you install a library
%post -p /sbin/ldconfig
# If you install a library
%postun -p /sbin/ldconfig
%package devel
Summary: Development files for %{pkgname}
Group: Scientific/Libraries
Requires: grib_api
%description devel
Development files for %{pkgname}.
2015-02-20 13:54:12 +00:00
The ECMWF ecCodes package is an application program interface accessible from C, FORTRAN and Python programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
2013-03-25 12:04:10 +00:00
%files devel
%defattr(-, root, root)
#%doc doc
2013-05-17 14:00:31 +00:00
%prefix/include/grib_api.h
2015-02-18 17:36:29 +00:00
%prefix/include/eccodes_windef.h
%prefix/lib*/libeccodes.a
%prefix/lib*/libeccodes.la
2013-03-25 12:04:10 +00:00
%prefix/lib*/pkgconfig/*
2015-02-18 13:44:34 +00:00
%prefix/share/eccodes/samples/*
%prefix/share/eccodes/ifs_samples/*
2013-03-25 12:04:10 +00:00
# Only generate package if python is enabled
%if %{_enable_python}
%package python
Summary: Python interface for %{pkgname}
Group: Scientific/Libraries
Requires: grib_api
%description python
Python interface for %{pkgname}.
2015-02-20 13:54:12 +00:00
The ECMWF ecCodes package is an application program interface accessible from C, FORTRAN and Python programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
2013-03-25 12:04:10 +00:00
%files python
%defattr(-, root, root)
%prefix/lib*/python*/*
%endif
# Only generate package if fortran is enabled
%if %{_enable_fortran}
%package fortran
Summary: Fortran 90 interface for %{pkgname}
Group: Scientific/Libraries
Requires: grib_api
%description fortran
Fortran 90 interface for %{pkgname}.
2015-02-20 13:54:12 +00:00
The ECMWF ecCodes package is an application program interface accessible from C, FORTRAN and Python programs developed for encoding and decoding WMO FM-92 GRIB edition 1
2013-03-25 12:04:10 +00:00
and edition 2 messages.
%files fortran
%defattr(-, root,root)
2013-04-15 14:27:18 +00:00
%prefix/include/*.mod
2013-03-25 12:04:10 +00:00
%prefix/lib*/*f90*
%endif