]>
Commit | Line | Data |
---|---|---|
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 | # |
14 | Summary: eXtensible Data Model and Format library | |
15 | Summary(pl.UTF-8): Biblioteka rozszerzalnego modelu i formatu danych (XDMF) | |
16 | Name: xdmf | |
a6e82770 JB |
17 | # see CMakeLists.txt /XDMF_VERSION |
18 | Version: 3.0.0 | |
19 | %define gitref 8d9c98081d89ac77a132d56bc8bef53581db4078 | |
20 | %define snap 20190115 | |
21 | %define rel 1 | |
27b966e2 | 22 | Release: 0.%{snap}.%{rel} |
a6e82770 | 23 | License: BSD-like |
8a4756ae | 24 | Group: Libraries |
a6e82770 JB |
25 | Source0: https://gitlab.kitware.com/xdmf/xdmf/-/archive/%{gitref}/xdmf-%{snap}.tar.bz2 |
26 | # Source0-md5: 32fbbd1f6b584e27bb5a30945f6b787a | |
27 | Patch0: %{name}-swig.patch | |
8a4756ae JB |
28 | URL: http://www.xdmf.org/ |
29 | BuildRequires: bzip2-devel | |
a6e82770 | 30 | BuildRequires: boost-devel |
8a4756ae JB |
31 | BuildRequires: cmake >= 2.4 |
32 | BuildRequires: hdf5-devel >= 1.8 | |
a6e82770 | 33 | %{?with_java:BuildRequires: jdk} |
8a4756ae | 34 | BuildRequires: libstdc++-devel |
a6e82770 | 35 | BuildRequires: libtiff-devel |
8a4756ae | 36 | BuildRequires: libxml2-devel >= 2 |
a6e82770 | 37 | %{?with_python:BuildRequires: python-devel >= 2} |
8a4756ae JB |
38 | BuildRequires: rpm-pythonprov |
39 | BuildRequires: 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 |
42 | BuildRequires: tar >= 1:1.22 |
43 | BuildRequires: xz | |
44 | BuildRequires: zlib-devel | |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
46 | ||
47 | %description | |
48 | eXtensible Data Model and Format library. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Biblioteka rozszerzalnego modelu i formatu danych (XDMF - eXtensible | |
52 | Data Model and Format). | |
53 | ||
54 | %package devel | |
55 | Summary: Header files for Xdmf library | |
56 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Xdmf | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | Requires: libstdc++-devel | |
60 | Requires: bzip2-devel | |
61 | Requires: zlib-devel | |
62 | ||
63 | %description devel | |
64 | Header files for Xdmf library. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pliki nagłówkowe biblioteki Xdmf. | |
68 | ||
a6e82770 JB |
69 | %package -n java-xdmf |
70 | Summary: Java binding for Xdmf library | |
71 | Summary(pl.UTF-8): Interfejs Javy do biblioteki Xdmf | |
72 | Group: Libraries/Python | |
73 | Requires: %{name} = %{version}-%{release} | |
74 | ||
75 | %description -n java-xdmf | |
76 | Java binding for Xdmf library. | |
77 | ||
78 | %description -n java-xdmf -l pl.UTF-8 | |
79 | Interfejs Javy do biblioteki Xdmf. | |
80 | ||
8a4756ae JB |
81 | %package -n python-xdmf |
82 | Summary: Python binding for Xdmf library | |
83 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki Xdmf | |
84 | Group: Libraries/Python | |
85 | Requires: %{name} = %{version}-%{release} | |
86 | ||
87 | %description -n python-xdmf | |
88 | Python binding for Xdmf library. | |
89 | ||
90 | %description -n python-xdmf -l pl.UTF-8 | |
91 | Pythonowy interfejs do biblioteki Xdmf. | |
92 | ||
93 | %prep | |
a6e82770 | 94 | %setup -q -n %{name}-%{gitref} |
8a4756ae | 95 | %patch0 -p1 |
8a4756ae JB |
96 | |
97 | %build | |
98 | mkdir build | |
99 | cd 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 | |
118 | rm -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 | |
130 | rm -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 |