]> git.pld-linux.org Git - packages/xdmf.git/blob - xdmf.spec
ceab9384815ab88179a7bb7b241ba8afac6055cb
[packages/xdmf.git] / xdmf.spec
1 # TODO: MPI
2 # fix utils:
3 # - installs libmetis conflicting with system metis
4 # - wants preinstalled libvtk{NetCDF,exoIIc} or installs own versions
5 # - installs headers to /usr/include/utils/Xdmf* (too generic dir name)
6 #
7 # Conditional build:
8 %bcond_with     mpi     # MPI support
9 %bcond_with     utils   # build XdmfUtils (see TODO above)
10 #
11 %define         rel 5
12 Summary:        eXtensible Data Model and Format library
13 Summary(pl.UTF-8):      Biblioteka rozszerzalnego modelu i formatu danych (XDMF)
14 Name:           xdmf
15 # Debian says 2.1, but no version information anywhere in sources/CVS
16 Version:        0
17 %define snap    20100330
18 Release:        0.%{snap}.%{rel}
19 # specified in libsrc/{gzstream,bz2stream}.*
20 License:        LGPL v2.1+
21 Group:          Libraries
22 # cvs -d :pserver:anonymous:xdmf@public.kitware.com:/cvsroot/Xdmf co Xdmf
23 Source0:        %{name}.tar.xz
24 # Source0-md5:  63f99d11bea8d56d4185cb8facd44ca2
25 Patch0:         %{name}-include.patch
26 Patch1:         %{name}-soname.patch
27 Patch2:         %{name}-log2.patch
28 Patch3:         %{name}-destdir.patch
29 Patch4:         %{name}-format.patch
30 Patch5:         %{name}-lib.patch
31 URL:            http://www.xdmf.org/
32 BuildRequires:  bzip2-devel
33 BuildRequires:  cmake >= 2.4
34 BuildRequires:  hdf5-devel >= 1.8
35 BuildRequires:  libstdc++-devel
36 BuildRequires:  libxml2-devel >= 2
37 BuildRequires:  python-devel >= 2
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.219
40 BuildRequires:  tar >= 1:1.22
41 BuildRequires:  xz
42 BuildRequires:  zlib-devel
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 eXtensible Data Model and Format library.
47
48 %description -l pl.UTF-8
49 Biblioteka rozszerzalnego modelu i formatu danych (XDMF - eXtensible
50 Data Model and Format).
51
52 %package devel
53 Summary:        Header files for Xdmf library
54 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Xdmf
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       libstdc++-devel
58 Requires:       bzip2-devel
59 Requires:       zlib-devel
60
61 %description devel
62 Header files for Xdmf library.
63
64 %description devel -l pl.UTF-8
65 Pliki nagłówkowe biblioteki Xdmf.
66
67 %package -n python-xdmf
68 Summary:        Python binding for Xdmf library
69 Summary(pl.UTF-8):      Pythonowy interfejs do biblioteki Xdmf
70 Group:          Libraries/Python
71 Requires:       %{name} = %{version}-%{release}
72
73 %description -n python-xdmf
74 Python binding for Xdmf library.
75
76 %description -n python-xdmf -l pl.UTF-8
77 Pythonowy interfejs do biblioteki Xdmf.
78
79 %prep
80 %setup -q -n Xdmf
81 %patch0 -p1
82 %patch1 -p1
83 %patch2 -p1
84 %patch3 -p1
85 %patch4 -p1
86 %patch5 -p1
87
88 %build
89 mkdir build
90 cd build
91 %cmake .. \
92         -DPythonLibs_FIND_VERSION=2 \
93         -DPythonLibs_FIND_VERSION_MAJOR=2 \
94         %{!?with_mpi:-DXDMF_BUILD_MPI=OFF} \
95         %{?with_utils:-DXDMF_BUILD_UTILS=ON} \
96         -DXDMF_SYSTEM_HDF5=ON \
97         -DXDMF_SYSTEM_LIBXML2=ON \
98         -DXDMF_SYSTEM_ZLIB=ON \
99         -DXDMF_USE_RPATH=OFF \
100         -DXDMF_WRAP_PYTHON=ON
101
102 %{__make}
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 %{__make} -C build install \
108         DESTDIR=$RPM_BUILD_ROOT
109
110 # cmake compiles only to .pyc
111 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
112 %py_postclean
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %files
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libXdmf.so.2
123 %if %{with utils}
124 %attr(755,root,root) %{_libdir}/libXdmfUtils.so
125 %attr(755,root,root) %{_libdir}/libmetis.so
126 %attr(755,root,root) %{_libdir}/libvtkNetCDF.so
127 %attr(755,root,root) %{_libdir}/libvtkexoIIc.so
128 %attr(755,root,root) %{_bindir}/XdmfDiff
129 %attr(755,root,root) %{_bindir}/XdmfExodusConverter
130 %attr(755,root,root) %{_bindir}/XdmfPartitioner
131 %endif
132
133 %files devel
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_libdir}/libXdmf.so
136 %{_libdir}/XdmfCMake
137 %{_includedir}/Xdmf*.h
138 %{_includedir}/bz2stream.h
139 %{_includedir}/gzstream.h
140 %if %{with utils}
141 %{_includedir}/XdmfSTLConverter.txx
142 # FIXME: too generic dir
143 %dir %{_includedir}/utils
144 %{_includedir}/utils/Xdmf*.h
145 # FIXME: conflict with system metis
146 %{_includedir}/metis
147 %{_includedir}/vtkexodus2
148 %{_includedir}/vtknetcdf
149 %endif
150
151 %files -n python-xdmf
152 %defattr(644,root,root,755)
153 %dir %{py_sitedir}/Xdmf
154 %attr(755,root,root) %{py_sitedir}/Xdmf/_Xdmf.so
155 %{py_sitedir}/Xdmf/Xdmf.py[co]
156 %{py_sitedir}/Xdmf/__init__.py[co]
157 %if %{with utils}
158 %attr(755,root,root) %{py_sitedir}/Xdmf/_XdmfUtils.so
159 %{py_sitedir}/Xdmf/XdmfUtils.py[co]
160 %endif
This page took 0.060221 seconds and 2 git commands to generate.