]> git.pld-linux.org Git - packages/xdmf.git/blame - xdmf.spec
- updated to 3.0.0 snapshot
[packages/xdmf.git] / xdmf.spec
CommitLineData
a6e82770
JB
1# TODO: parallel (MPI, MPI4PY, H5FDdsm)?
2# - use exodusii
3# - python3 module
4# - system loki library?
8a4756ae
JB
5#
6# Conditional build:
a6e82770
JB
7%bcond_without apidocs # Doxygen docs
8%bcond_without fortran # Fortran support in XdmfUtils
9%bcond_without metis # Metis partitioner in XdmfUtils
8a4756ae 10%bcond_with mpi # MPI support
a6e82770
JB
11%bcond_without java # Java wrappers
12%bcond_without python # Python wrappers
8a4756ae
JB
13#
14Summary: eXtensible Data Model and Format library
15Summary(pl.UTF-8): Biblioteka rozszerzalnego modelu i formatu danych (XDMF)
16Name: xdmf
a6e82770
JB
17# see CMakeLists.txt /XDMF_VERSION
18Version: 3.0.0
19%define gitref 8d9c98081d89ac77a132d56bc8bef53581db4078
20%define snap 20190115
21%define rel 1
27b966e2 22Release: 0.%{snap}.%{rel}
a6e82770 23License: BSD-like
8a4756ae 24Group: Libraries
a6e82770
JB
25Source0: https://gitlab.kitware.com/xdmf/xdmf/-/archive/%{gitref}/xdmf-%{snap}.tar.bz2
26# Source0-md5: 32fbbd1f6b584e27bb5a30945f6b787a
27Patch0: %{name}-swig.patch
8a4756ae
JB
28URL: http://www.xdmf.org/
29BuildRequires: bzip2-devel
a6e82770 30BuildRequires: boost-devel
8a4756ae
JB
31BuildRequires: cmake >= 2.4
32BuildRequires: hdf5-devel >= 1.8
a6e82770 33%{?with_java:BuildRequires: jdk}
8a4756ae 34BuildRequires: libstdc++-devel
a6e82770 35BuildRequires: libtiff-devel
8a4756ae 36BuildRequires: libxml2-devel >= 2
a6e82770 37%{?with_python:BuildRequires: python-devel >= 2}
8a4756ae
JB
38BuildRequires: rpm-pythonprov
39BuildRequires: rpmbuild(macros) >= 1.219
a6e82770
JB
40%{?with_java:BuildRequires: swig >= 2.0.0}
41%{?with_python:BuildRequires: swig-python >= 2.0.0}
8a4756ae
JB
42BuildRequires: tar >= 1:1.22
43BuildRequires: xz
44BuildRequires: zlib-devel
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48eXtensible Data Model and Format library.
49
50%description -l pl.UTF-8
51Biblioteka rozszerzalnego modelu i formatu danych (XDMF - eXtensible
52Data Model and Format).
53
54%package devel
55Summary: Header files for Xdmf library
56Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Xdmf
57Group: Development/Libraries
58Requires: %{name} = %{version}-%{release}
59Requires: libstdc++-devel
60Requires: bzip2-devel
61Requires: zlib-devel
62
63%description devel
64Header files for Xdmf library.
65
66%description devel -l pl.UTF-8
67Pliki nagłówkowe biblioteki Xdmf.
68
a6e82770
JB
69%package -n java-xdmf
70Summary: Java binding for Xdmf library
71Summary(pl.UTF-8): Interfejs Javy do biblioteki Xdmf
72Group: Libraries/Python
73Requires: %{name} = %{version}-%{release}
74
75%description -n java-xdmf
76Java binding for Xdmf library.
77
78%description -n java-xdmf -l pl.UTF-8
79Interfejs Javy do biblioteki Xdmf.
80
8a4756ae
JB
81%package -n python-xdmf
82Summary: Python binding for Xdmf library
83Summary(pl.UTF-8): Pythonowy interfejs do biblioteki Xdmf
84Group: Libraries/Python
85Requires: %{name} = %{version}-%{release}
86
87%description -n python-xdmf
88Python binding for Xdmf library.
89
90%description -n python-xdmf -l pl.UTF-8
91Pythonowy interfejs do biblioteki Xdmf.
92
93%prep
a6e82770 94%setup -q -n %{name}-%{gitref}
8a4756ae 95%patch0 -p1
8a4756ae
JB
96
97%build
98mkdir build
99cd build
100%cmake .. \
a6e82770
JB
101 -DREQUESTED_PYTHON_VERSION=2 \
102 %{?with_apidocs:-DXDMF_BUILD_DOCUMENTATION=ON} \
103 %{?with_fortran:-DXDMF_BUILD_FORTRAN=ON} \
8a4756ae 104 %{!?with_mpi:-DXDMF_BUILD_MPI=OFF} \
a6e82770
JB
105 %{?with_metis:-DXDMF_BUILD_PARTITIONER=ON} \
106 -DXDMF_BUILD_UTILS=ON \
8a4756ae
JB
107 -DXDMF_SYSTEM_HDF5=ON \
108 -DXDMF_SYSTEM_LIBXML2=ON \
109 -DXDMF_SYSTEM_ZLIB=ON \
110 -DXDMF_USE_RPATH=OFF \
a6e82770
JB
111 %{?with_java:-DXDMF_WRAP_JAVA=ON} \
112 %{?with_python:-DXDMF_WRAP_PYTHON=ON}
113# TODO: -DXDMF_BUILD_EXODUS_IO=ON BR: Exodus-devel
8a4756ae
JB
114
115%{__make}
116
117%install
118rm -rf $RPM_BUILD_ROOT
119
120%{__make} -C build install \
121 DESTDIR=$RPM_BUILD_ROOT
122
a6e82770
JB
123%if %{with python}
124%py_comp $RPM_BUILD_ROOT%{py_sitedir}
8a4756ae
JB
125%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
126%py_postclean
a6e82770 127%endif
8a4756ae
JB
128
129%clean
130rm -rf $RPM_BUILD_ROOT
131
132%post -p /sbin/ldconfig
133%postun -p /sbin/ldconfig
134
135%files
136%defattr(644,root,root,755)
a6e82770
JB
137%doc Copyright.txt README.md
138%if %{with metis}
8a4756ae
JB
139%attr(755,root,root) %{_bindir}/XdmfPartitioner
140%endif
a6e82770
JB
141%attr(755,root,root) %{_libdir}/libXdmf.so.*.*.*
142%attr(755,root,root) %ghost %{_libdir}/libXdmf.so.3
143%attr(755,root,root) %{_libdir}/libXdmfCore.so.*.*.*
144%attr(755,root,root) %ghost %{_libdir}/libXdmfCore.so.3
145%attr(755,root,root) %{_libdir}/libXdmfUtils.so.*.*.*
146%attr(755,root,root) %ghost %{_libdir}/libXdmfUtils.so.3
8a4756ae
JB
147
148%files devel
149%defattr(644,root,root,755)
150%attr(755,root,root) %{_libdir}/libXdmf.so
a6e82770
JB
151%attr(755,root,root) %{_libdir}/libXdmfCore.so
152%attr(755,root,root) %{_libdir}/libXdmfUtils.so
153%{_libdir}/cmake/Xdmf
154%{_includedir}/ProjectVersion.hpp
155%{_includedir}/Xdmf*.hpp
156%{_includedir}/Xdmf*.i
157%{_includedir}/XdmfArray.tpp
158%{_includedir}/loki
159%if %{with fortran}
160%{_includedir}/Xdmf.f
161%endif
162
163%if %{with java}
164%files -n java-xdmf
165%defattr(644,root,root,755)
166%{_libdir}/java/Xdmf.jar
167%{_libdir}/java/XdmfCore.jar
168%{_libdir}/java/XdmfUtils.jar
169%attr(755,root,root) %{_libdir}/java/libXdmfJava.so
170%attr(755,root,root) %{_libdir}/java/libXdmfCoreJava.so
171%attr(755,root,root) %{_libdir}/java/libXdmfUtilsJava.so
8a4756ae
JB
172%endif
173
a6e82770 174%if %{with python}
8a4756ae
JB
175%files -n python-xdmf
176%defattr(644,root,root,755)
a6e82770
JB
177%dir %{py_sitedir}/xdmf
178%attr(755,root,root) %{py_sitedir}/xdmf/_Xdmf.so
179%attr(755,root,root) %{py_sitedir}/xdmf/_XdmfCore.so
180%attr(755,root,root) %{py_sitedir}/xdmf/_XdmfUtils.so
181%{py_sitedir}/xdmf/Xdmf.py[co]
182%{py_sitedir}/xdmf/XdmfCore.py[co]
183%{py_sitedir}/xdmf/XdmfUtils.py[co]
8a4756ae 184%endif
This page took 0.051319 seconds and 4 git commands to generate.