med/med.spec

250 lines
8.0 KiB
RPMSpec
Raw Normal View History

2014-05-20 22:32:36 +00:00
Name: med
2018-03-09 23:02:37 +00:00
Version: 3.3.1
Release: 5%{?dist}
2014-05-20 22:32:36 +00:00
Summary: Library to exchange meshed data
License: LGPLv3+
2018-03-09 23:02:37 +00:00
URL: http://www.salome-platform.org/user-section/about/med
2014-05-20 22:32:36 +00:00
Source0: http://files.salome-platform.org/Salome/other/%{name}-%{version}.tar.gz
2014-05-21 22:22:14 +00:00
# Chars are unsigned on arm, but the tests do not appear to expect this
# Patch generated via
2014-05-21 22:22:56 +00:00
# find . -type f -print0 | xargs -0 sed -i "s|-e 's/H5T_STD_I8LE//g'|-e 's/H5T_STD_I8LE//g' -e 's/H5T_STD_U8LE//g'|g"
2016-02-06 11:46:03 +00:00
Patch0: med-3.0.7_tests.patch
2018-03-09 23:02:37 +00:00
# - Install headers in %%_includedir/med
# - Comment out missing test
# - Set library version
# - Use LIB_SUFFIX
# - Install cmake config files to %%_libdir/cmake
Patch1: med-3.3.1_cmake.patch
BuildRequires: gcc-c++
2018-03-09 23:02:37 +00:00
BuildRequires: cmake
BuildRequires: gcc
2014-05-20 22:32:36 +00:00
BuildRequires: gcc-gfortran
2018-03-09 23:02:37 +00:00
BuildRequires: hdf5-devel
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: swig
2015-01-03 18:26:04 +00:00
BuildRequires: zlib-devel
2014-05-20 22:32:36 +00:00
# For autoreconf
BuildRequires: autoconf automake libtool
%description
MED-fichier (Modélisation et Echanges de Données, in English Modelisation
and Data Exchange) is a library to store and exchange meshed data or
computation results. It uses the HDF5 file format to store the data.
2018-03-09 23:02:37 +00:00
%package -n python3-%{name}
Summary: Python3 bindings for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-%{name}
The python3-%{name} package contains python3 bindings for %{name}.
2014-05-20 22:32:36 +00:00
%package tools
Summary: Runtime tools for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: tk
%description tools
This package contains runtime tools for %{name}:
- mdump: a tool to dump MED files
- xmdump: graphical version of mdump.
- medconforme: a tool to validate a MED file
- medimport: a tool to convert a MED v2.1 or v2.2 file into a MED v2.3 file
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
2018-03-09 23:02:37 +00:00
Requires: cmake-filesystem
2014-05-20 22:32:36 +00:00
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation for %{name}
BuildArch: noarch
%description doc
The %{name}-doc package contains the documentation for %{name}.
%prep
2018-03-09 23:02:37 +00:00
%autosetup -p1 -n %{name}-%{version}_SRC
2014-05-20 22:32:36 +00:00
# Fix file not utf8
iconv --from=ISO-8859-1 --to=UTF-8 ChangeLog > ChangeLog.new && \
touch -r ChangeLog ChangeLog.new && \
mv ChangeLog.new ChangeLog
%build
2018-03-09 23:02:37 +00:00
# https://autotools.io/libtool/version.html
# -> On linux, current:revision:age translates to lib version (current-age).age.revision
libmedCRA=`grep -E "libmed_la_LDFLAGS.*version-info\s+([0-9]+:[0-9]+:[0-9]+)" src/Makefile.am | grep -Eo "[0-9]+:[0-9]+:[0-9]+"`
libmedSOVER=`echo $libmedCRA | awk -F':' '{print $1-$3}'`
libmedLIBVER=`echo $libmedCRA | awk -F':' '{print $1-$3"."$3"."$2}'`
libmedcCRA=`grep -E "libmedC_la_LDFLAGS.*version-info\s+([0-9]+:[0-9]+:[0-9]+)" src/Makefile.am | grep -Eo "[0-9]+:[0-9]+:[0-9]+"`
libmedcSOVER=`echo $libmedcCRA | awk -F':' '{print $1-$3}'`
libmedcLIBVER=`echo $libmedcCRA | awk -F':' '{print $1-$3"."$3"."$2}'`
libmedimportCRA=`grep -E "libmedimport_la_LDFLAGS.*version-info\s+([0-9]+:[0-9]+:[0-9]+)" tools/medimport/Makefile.am | grep -Eo "[0-9]+:[0-9]+:[0-9]+"`
libmedimportSOVER=`echo $libmedimportCRA | awk -F':' '{print $1-$3}'`
libmedimportLIBVER=`echo $libmedimportCRA | awk -F':' '{print $1-$3"."$3"."$2}'`
mkdir build_py3
pushd build_py3
%cmake -DMEDFILE_BUILD_PYTHON=1 \
-DPYTHON_EXECUTABLE=%{__python3} \
-DPYTHON_INCLUDE_DIR=%{_includedir}/python%{python3_version}m/ \
-DPYTHON_LIBRARY=%{_libdir}/libpython%{python3_version}m.so \
-DLIBMED_SOVER=$libmedSOVER -DLIBMED_LIBVER=$libmedLIBVER \
-DLIBMEDC_SOVER=$libmedcSOVER -DLIBMEDC_LIBVER=$libmedcLIBVER \
-DLIBMEDIMPORT_SOVER=$libmedimportSOVER -DLIBMEDIMPORT_LIBVER=$libmedimportLIBVER ..
2017-02-01 11:55:13 +00:00
%make_build
2018-03-09 23:02:37 +00:00
popd
2014-05-20 22:32:36 +00:00
%install
2018-03-09 23:02:37 +00:00
%make_install -C build_py3
2014-05-20 22:32:36 +00:00
# Install docs through %%doc
mkdir installed_docs
mv %{buildroot}%{_docdir}/* installed_docs
# Remove test-suite files
rm -rf %{buildroot}%{_bindir}/testc
rm -rf %{buildroot}%{_bindir}/testf
rm -rf %{buildroot}%{_bindir}/testpy
%check
2018-03-09 23:02:37 +00:00
make check -C build_py3 || :
2014-05-20 22:32:36 +00:00
%ldconfig_scriptlets
2014-05-20 22:32:36 +00:00
%files
2015-03-25 17:14:17 +00:00
%doc AUTHORS ChangeLog README
%license COPYING.LESSER
%{_libdir}/libmed.so.1*
%{_libdir}/libmedC.so.1*
%{_libdir}/libmedimport.so.0*
2014-05-20 22:32:36 +00:00
2018-03-09 23:02:37 +00:00
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
2014-05-20 22:32:36 +00:00
%files tools
2016-02-06 11:46:03 +00:00
%{_bindir}/*mdump*
%{_bindir}/medconforme
%{_bindir}/medimport
2014-05-20 22:32:36 +00:00
%files devel
%{_libdir}/*.so
2018-03-09 23:02:37 +00:00
%{_libdir}/libmedfwrap.a
%{_libdir}/cmake/MEDFile/
%{_includedir}/%{name}/
2014-05-20 22:32:36 +00:00
%files doc
2015-03-25 17:14:17 +00:00
%doc installed_docs/*
%license COPYING.LESSER
2014-05-20 22:32:36 +00:00
%changelog
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2018-10-03 14:21:32 +00:00
* Wed Oct 03 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-4
- Remvoe python2 subpackage (#1627343)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2018-06-19 08:47:32 +00:00
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-2
- Rebuilt for Python 3.7
2018-03-09 23:02:37 +00:00
* Fri Mar 09 2018 Sandro Mani <manisandro@gmail.com> - 3.3.1-1
- Update to 3.3.1
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2018-02-05 09:58:27 +00:00
* Mon Feb 05 2018 Jitka Plesnikova <jplesnik@redhat.com> - 3.2.1-4
- Rebuild for new gfortran
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2017-05-06 17:21:21 +00:00
* Sat May 06 2017 Sandro Mani <manisandro@gmail.com> - 3.2.1-1
- Update to 3.2.1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2017-02-01 11:55:13 +00:00
* Wed Feb 01 2017 Sandro Mani <manisandro@gmail.com> - 3.2.0-2
- Rebuild (gfortran)
2016-10-03 09:07:15 +00:00
* Mon Oct 03 2016 Sandro Mani <manisandro@gmail.com> - 3.2.0-1
- Update to 3.2.0
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2016-02-06 11:46:03 +00:00
* Sat Feb 06 2016 Sandro Mani <manisandro@gmail.com> - 3.1.0-1
- Update to 3.1.0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2016-01-21 19:11:51 +00:00
* Thu Jan 21 2016 Orion Poplawski <orion@cora.nwra.com> - 3.0.8-5
- Rebuild for hdf5 1.8.16
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2015-05-17 21:03:05 +00:00
* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 3.0.8-3
- Rebuild for hdf5 1.8.15
2015-05-02 13:56:54 +00:00
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.0.8-2
- Rebuilt for GCC 5 C++11 ABI change
2015-03-25 17:14:17 +00:00
* Wed Mar 25 2015 Sandro Mani <manisandro@gmail.com> - 3.0.8-1
- Update to 3.0.8
2015-01-07 20:38:57 +00:00
* Wed Jan 07 2015 Orion Poplawski <orion@cora.nwra.com> - 3.0.7-7
- Rebuild for hdf5 1.8.14
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-21 22:22:14 +00:00
* Wed May 21 2014 Sandro Mani <manisandro@gmail.com> - 3.0.7-4
- Fix tests on arm
2014-05-20 22:32:36 +00:00
* Tue May 20 2014 Sandro Mani <manisandro@gmail.com> - 3.0.7-3
- Removed -Wl,--as-needed again
- Fixed license LGPLv3 -> LGPLv3+
- BR python2-devel instead of python-devel
* Sat May 17 2014 Sandro Mani <manisandro@gmail.com> - 3.0.7-2
- Added -Wl,--as-needed to LDFLAGS
- Run autoreconf to remove rpath
- Fixed ChangeLog encoding
- Removed dependency on main package for -doc subpackage
* Sat May 17 2014 Sandro Mani <manisandro@gmail.com> - 3.0.7-1
- Initial package