]>
Commit | Line | Data |
---|---|---|
b2da6aab JB |
1 | Summary: Finite Element Data Model |
2 | Summary(pl.UTF-8): Model danych elementów skończonych (FE) | |
3 | Name: exodusii | |
4 | Version: 6.09.0 | |
5 | %define gitref f7b697abda26c05a5177c9ecf75c782f0b0f31e6 | |
6 | %define snap 20150604 | |
9fa80de7 JB |
7 | %define rel 2 |
8 | Release: 0.%{snap}.%{rel} | |
b2da6aab JB |
9 | License: BSD |
10 | Group: Libraries | |
11 | Source0: https://github.com/certik/exodus/archive/%{gitref}/%{name}-%{snap}.tar.gz | |
12 | # Source0-md5: 959f785e18f57aa999f637d4198e0047 | |
2cced5b2 | 13 | Patch0: %{name}-libdir.patch |
b2da6aab JB |
14 | # mirror; original project URL, sf.net/p/exodusii returns 403 |
15 | URL: https://github.com/certik/exodus | |
16 | BuildRequires: cmake >= 2.6 | |
17 | BuildRequires: curl-devel | |
18 | BuildRequires: hdf5-devel | |
19 | BuildRequires: netcdf-devel >= 4.2.1.1 | |
20 | BuildRequires: python >= 1:2.5 | |
9fa80de7 | 21 | BuildRequires: rpmbuild(macros) >= 1.752 |
b2da6aab JB |
22 | BuildRequires: zlib-devel |
23 | Requires: netcdf >= 4.2.1.1 | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | Finite Element data model. | |
28 | ||
29 | %description -l pl.UTF-8 | |
30 | Model danych elementów skończonych (FE). | |
31 | ||
32 | %package devel | |
33 | Summary: Header files for Exodus II libraries | |
34 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Exodus II | |
35 | Group: Development/Libraries | |
36 | Requires: %{name} = %{version}-%{release} | |
37 | Requires: netcdf-devel >= 4.2.1.1 | |
38 | ||
39 | %description devel | |
40 | Header files for Exodus II libraries. | |
41 | ||
42 | %description devel -l pl.UTF-8 | |
43 | Pliki nagłówkowe bibliotek Exodus II. | |
44 | ||
45 | %package -n python-exodus | |
46 | Summary: Python wrapper of some of the Exodus II library | |
47 | Summary(pl.UTF-8): Pythonowy interfejs do części biblioteki Exodus II | |
48 | Group: Libraries/Python | |
49 | Requires: %{name} = %{version}-%{release} | |
50 | # requires ctypes module; python 2 only for now | |
51 | Requires: python-modules >= 1:2.5 | |
52 | ||
53 | %description -n python-exodus | |
54 | Python wrapper of some of the Exodus II library. | |
55 | ||
56 | %description -n python-exodus -l pl.UTF-8 | |
57 | Pythonowy interfejs do części biblioteki Exodus II. | |
58 | ||
59 | %package doc | |
60 | Summary: Documentation for Exodus II libraries | |
61 | Summary(pl.UTF-8): Dokumentacja do bibliotek Exodus II | |
62 | Group: Documentation | |
d9204282 | 63 | BuildArch: noarch |
b2da6aab JB |
64 | |
65 | %description doc | |
66 | Documentation for Exodus II libraries. | |
67 | ||
68 | %description doc -l pl.UTF-8 | |
69 | Dokumentacja do bibliotek Exodus II. | |
70 | ||
71 | %prep | |
72 | %setup -q -n exodus-%{gitref} | |
2cced5b2 | 73 | %patch0 -p1 |
b2da6aab JB |
74 | |
75 | # expected by nemesis | |
76 | %{__mv} exodus exodusii | |
77 | ||
78 | %build | |
79 | TOPDIR="$(pwd)" | |
80 | install -d build/{exodusii,nemesis} | |
81 | cd build/exodusii | |
82 | %cmake ../../exodusii \ | |
83 | -DHDF5_LIBRARY=%{_libdir}/libhdf5.so \ | |
84 | -DHDF5HL_LIBRARY=%{_libdir}/libhdf5_hl.so \ | |
85 | -DNETCDF_INCLUDE_DIR=%{_includedir} \ | |
86 | -DNETCDF_LIBRARY=%{_libdir}/libnetcdf.so \ | |
87 | -DNETCDF_NCDUMP=%{_bindir}/ncdump \ | |
88 | -DPYTHON_INSTALL=%{py_sitescriptdir} | |
89 | ||
90 | %{__make} | |
91 | ||
92 | cd ../nemesis | |
93 | %cmake ../../nemesis \ | |
94 | -DEXODUS_LIBRARY="$TOPDIR/build/exodusii/cbind/libexodus.so" \ | |
95 | -DHDF5_LIBRARY=%{_libdir}/libhdf5.so \ | |
96 | -DHDF5HL_LIBRARY=%{_libdir}/libhdf5_hl.so \ | |
97 | -DMATH_LIBRARY=%{_libdir}/libm.so \ | |
98 | -DNETCDF_INCLUDE_DIR=%{_includedir} \ | |
99 | -DNETCDF_LIBRARY=%{_libdir}/libnetcdf.so \ | |
100 | -DNETCDF_NCDUMP=%{_bindir}/ncdump \ | |
101 | -DZ_LIBRARY=%{_libdir}/libz.so | |
102 | ||
103 | %{__make} | |
104 | ||
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %{__make} -C build/exodusii install \ | |
109 | DESTDIR=$RPM_BUILD_ROOT | |
110 | ||
111 | %{__make} -C build/nemesis install \ | |
112 | DESTDIR=$RPM_BUILD_ROOT | |
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 | %doc ChangeLog README.NEMESIS exodusii/{COPYRIGHT,README} | |
123 | %attr(755,root,root) %{_libdir}/libexodus.so | |
124 | %attr(755,root,root) %{_libdir}/libexoIIv2for.so | |
125 | %attr(755,root,root) %{_libdir}/libnemesis.so | |
126 | ||
127 | %files devel | |
128 | %defattr(644,root,root,755) | |
129 | %{_includedir}/exodusII*.h | |
130 | %{_includedir}/exodusII*.inc | |
131 | %{_includedir}/ne_nemesisI.h | |
132 | ||
133 | %files -n python-exodus | |
134 | %defattr(644,root,root,755) | |
135 | %doc exodusii/README.PYTHON | |
136 | # uses sys.dont_write_bytecode = True, so just .py packaged | |
137 | %{py_sitescriptdir}/exodus.py | |
138 | ||
139 | %files doc | |
140 | %defattr(644,root,root,755) | |
141 | %doc exodusii/doc/*.{txt,pdf} |