]> git.pld-linux.org Git - packages/xdmf.git/blob - xdmf.spec
- updated to 3.0.0 snapshot
[packages/xdmf.git] / xdmf.spec
1 # TODO: parallel (MPI, MPI4PY, H5FDdsm)?
2 # - use exodusii
3 # - python3 module
4 # - system loki library?
5 #
6 # Conditional build:
7 %bcond_without  apidocs # Doxygen docs
8 %bcond_without  fortran # Fortran support in XdmfUtils
9 %bcond_without  metis   # Metis partitioner in XdmfUtils
10 %bcond_with     mpi     # MPI support
11 %bcond_without  java    # Java wrappers
12 %bcond_without  python  # Python wrappers
13 #
14 Summary:        eXtensible Data Model and Format library
15 Summary(pl.UTF-8):      Biblioteka rozszerzalnego modelu i formatu danych (XDMF)
16 Name:           xdmf
17 # see CMakeLists.txt /XDMF_VERSION
18 Version:        3.0.0
19 %define gitref  8d9c98081d89ac77a132d56bc8bef53581db4078
20 %define snap    20190115
21 %define rel     1
22 Release:        0.%{snap}.%{rel}
23 License:        BSD-like
24 Group:          Libraries
25 Source0:        https://gitlab.kitware.com/xdmf/xdmf/-/archive/%{gitref}/xdmf-%{snap}.tar.bz2
26 # Source0-md5:  32fbbd1f6b584e27bb5a30945f6b787a
27 Patch0:         %{name}-swig.patch
28 URL:            http://www.xdmf.org/
29 BuildRequires:  bzip2-devel
30 BuildRequires:  boost-devel
31 BuildRequires:  cmake >= 2.4
32 BuildRequires:  hdf5-devel >= 1.8
33 %{?with_java:BuildRequires:     jdk}
34 BuildRequires:  libstdc++-devel
35 BuildRequires:  libtiff-devel
36 BuildRequires:  libxml2-devel >= 2
37 %{?with_python:BuildRequires:   python-devel >= 2}
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.219
40 %{?with_java:BuildRequires:     swig >= 2.0.0}
41 %{?with_python:BuildRequires:   swig-python >= 2.0.0}
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
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
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
94 %setup -q -n %{name}-%{gitref}
95 %patch0 -p1
96
97 %build
98 mkdir build
99 cd build
100 %cmake .. \
101         -DREQUESTED_PYTHON_VERSION=2 \
102         %{?with_apidocs:-DXDMF_BUILD_DOCUMENTATION=ON} \
103         %{?with_fortran:-DXDMF_BUILD_FORTRAN=ON} \
104         %{!?with_mpi:-DXDMF_BUILD_MPI=OFF} \
105         %{?with_metis:-DXDMF_BUILD_PARTITIONER=ON} \
106         -DXDMF_BUILD_UTILS=ON \
107         -DXDMF_SYSTEM_HDF5=ON \
108         -DXDMF_SYSTEM_LIBXML2=ON \
109         -DXDMF_SYSTEM_ZLIB=ON \
110         -DXDMF_USE_RPATH=OFF \
111         %{?with_java:-DXDMF_WRAP_JAVA=ON} \
112         %{?with_python:-DXDMF_WRAP_PYTHON=ON}
113 # TODO: -DXDMF_BUILD_EXODUS_IO=ON BR: Exodus-devel
114
115 %{__make}
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119
120 %{__make} -C build install \
121         DESTDIR=$RPM_BUILD_ROOT
122
123 %if %{with python}
124 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
125 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
126 %py_postclean
127 %endif
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)
137 %doc Copyright.txt README.md
138 %if %{with metis}
139 %attr(755,root,root) %{_bindir}/XdmfPartitioner
140 %endif
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
147
148 %files devel
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libXdmf.so
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
172 %endif
173
174 %if %{with python}
175 %files -n python-xdmf
176 %defattr(644,root,root,755)
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]
184 %endif
This page took 0.052595 seconds and 3 git commands to generate.