]>
Commit | Line | Data |
---|---|---|
fbedd671 JB |
1 | # |
2 | # Conditional build: | |
f36312d1 JB |
3 | %bcond_without python # Python bindings (any) |
4 | %bcond_without python2 # CPython 2.x bindings | |
5 | %bcond_without python3 # CPython 3.x bindings | |
fbedd671 | 6 | # |
f36312d1 JB |
7 | %if %{without python} |
8 | %undefine with_python2 | |
9 | %undefine with_python3 | |
10 | %endif | |
11 | # see m4/${libname}.m4 />= for required version of particular library | |
12 | %define libbfio_ver 20160108 | |
13 | %define libcdata_ver 20181216 | |
14 | %define libcerror_ver 20120425 | |
15 | %define libcfile_ver 20160409 | |
16 | %define libclocale_ver 20120425 | |
17 | %define libcnotify_ver 20120425 | |
18 | %define libcpath_ver 20180716 | |
19 | %define libcsplit_ver 20120701 | |
20 | %define libcthreads_ver 20160404 | |
21 | %define libfcache_ver 20181010 | |
22 | %define libfdata_ver 20181009 | |
23 | %define libfvalue_ver 20160131 | |
24 | %define libhmac_ver 20160802 | |
25 | %define libuna_ver 20181006 | |
fbedd671 JB |
26 | Summary: Library to access the storage media (SM) (split) RAW format |
27 | Summary(pl.UTF-8): Biblioteka służąca do dostępu do surowego (dzielonego) formatu nośnika danych (SM) | |
28 | Name: libsmraw | |
f36312d1 | 29 | Version: 20181227 |
2c549558 | 30 | Release: 3 |
fbedd671 JB |
31 | License: LGPL v3+ |
32 | Group: Libraries | |
f36312d1 JB |
33 | #Source0Download: https://github.com/libyal/libsmraw/releases |
34 | Source0: https://github.com/libyal/libsmraw/releases/download/%{version}/%{name}-alpha-%{version}.tar.gz | |
35 | # Source0-md5: 510ccfd38ad5b13b173759224267fcfa | |
fbedd671 JB |
36 | URL: https://github.com/libyal/libsmraw/ |
37 | BuildRequires: autoconf >= 2.59 | |
38 | BuildRequires: automake >= 1.6 | |
39 | BuildRequires: gettext-tools >= 0.18.1 | |
f36312d1 JB |
40 | BuildRequires: libbfio-devel >= %{libbfio_ver} |
41 | BuildRequires: libcdata-devel >= %{libcdata_ver} | |
42 | BuildRequires: libcerror-devel >= %{libcerror_ver} | |
43 | BuildRequires: libcfile-devel >= %{libcfile_ver} | |
44 | BuildRequires: libclocale-devel >= %{libclocale_ver} | |
45 | BuildRequires: libcnotify-devel >= %{libcnotify_ver} | |
46 | BuildRequires: libcpath-devel >= %{libcpath_ver} | |
47 | BuildRequires: libcsplit-devel >= %{libcsplit_ver} | |
48 | BuildRequires: libcthreads-devel >= %{libcthreads_ver} | |
49 | BuildRequires: libfcache-devel >= %{libfcache_ver} | |
50 | BuildRequires: libfdata-devel >= %{libfdata_ver} | |
fbedd671 | 51 | BuildRequires: libfuse-devel >= 2.6 |
f36312d1 JB |
52 | BuildRequires: libfvalue-devel >= %{libfvalue_ver} |
53 | BuildRequires: libhmac-devel >= %{libhmac_ver} | |
54 | BuildRequires: libuna-devel >= %{libuna_ver} | |
fbedd671 JB |
55 | BuildRequires: libtool |
56 | BuildRequires: openssl-devel >= 1.0 | |
57 | BuildRequires: pkgconfig | |
f36312d1 JB |
58 | %{?with_python2:BuildRequires: python-devel >= 1:2.5} |
59 | %{?with_python3:BuildRequires: python3-devel >= 1:3.2} | |
60 | Requires: libbfio >= %{libbfio_ver} | |
61 | Requires: libcdata >= %{libcdata_ver} | |
62 | Requires: libcerror >= %{libcerror_ver} | |
63 | Requires: libcfile >= %{libcfile_ver} | |
64 | Requires: libclocale >= %{libclocale_ver} | |
65 | Requires: libcnotify >= %{libcnotify_ver} | |
66 | Requires: libcpath >= %{libcpath_ver} | |
67 | Requires: libcsplit >= %{libcsplit_ver} | |
68 | Requires: libcthreads >= %{libcthreads_ver} | |
69 | Requires: libfcache >= %{libfcache_ver} | |
70 | Requires: libfdata >= %{libfdata_ver} | |
71 | Requires: libfvalue >= %{libfvalue_ver} | |
72 | Requires: libuna >= %{libuna_ver} | |
fbedd671 JB |
73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
74 | ||
75 | %description | |
76 | libsmraw is a library to access the storage media (SM) (split) RAW | |
77 | format. | |
78 | ||
79 | %description -l pl.UTF-8 | |
80 | libsmraw to biblioteka służąca do dostępu do surowego (dzielonego) | |
81 | formatu nośnika danych (SM - Storage Media). | |
82 | ||
83 | %package devel | |
84 | Summary: Header files for libsmraw library | |
85 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libsmraw | |
86 | Group: Development/Libraries | |
87 | Requires: %{name} = %{version}-%{release} | |
f36312d1 JB |
88 | Requires: libbfio-devel >= %{libbfio_ver} |
89 | Requires: libcdata-devel >= %{libcdata_ver} | |
90 | Requires: libcerror-devel >= %{libcerror_ver} | |
91 | Requires: libcfile-devel >= %{libcfile_ver} | |
92 | Requires: libclocale-devel >= %{libclocale_ver} | |
93 | Requires: libcnotify-devel >= %{libcnotify_ver} | |
94 | Requires: libcpath-devel >= %{libcpath_ver} | |
95 | Requires: libcsplit-devel >= %{libcsplit_ver} | |
96 | Requires: libcthreads-devel >= %{libcthreads_ver} | |
97 | Requires: libfcache-devel >= %{libfcache_ver} | |
98 | Requires: libfdata-devel >= %{libfdata_ver} | |
99 | Requires: libfvalue-devel >= %{libfvalue_ver} | |
100 | Requires: libuna-devel >= %{libuna_ver} | |
fbedd671 JB |
101 | |
102 | %description devel | |
103 | Header files for libsmraw library. | |
104 | ||
105 | %description devel -l pl.UTF-8 | |
106 | Pliki nagłówkowe biblioteki libsmraw. | |
107 | ||
108 | %package static | |
109 | Summary: Static libsmraw library | |
110 | Summary(pl.UTF-8): Statyczna biblioteka libsmraw | |
111 | Group: Development/Libraries | |
112 | Requires: %{name}-devel = %{version}-%{release} | |
113 | ||
114 | %description static | |
115 | Static libsmraw library. | |
116 | ||
117 | %description static -l pl.UTF-8 | |
118 | Statyczna biblioteka libsmraw. | |
119 | ||
120 | %package tools | |
121 | Summary: Tools for libsmraw library | |
122 | Summary(pl.UTF-8): Narzędzia do biblioteki smraw | |
123 | Group: Applications/System | |
124 | Requires: %{name} = %{version}-%{release} | |
fbedd671 | 125 | Requires: libfuse >= 2.6 |
f36312d1 | 126 | Requires: libhmac >= %{libhmac_ver} |
fbedd671 JB |
127 | |
128 | %description tools | |
129 | Tools for libsmraw library. | |
130 | ||
131 | %description tools -l pl.UTF-8 | |
132 | Narzędzia do biblioteki smraw. | |
133 | ||
134 | %package -n python-pysmraw | |
f36312d1 JB |
135 | Summary: Python 2 bindings for libsmraw library |
136 | Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki libsmraw | |
fbedd671 JB |
137 | Group: Libraries/Python |
138 | Requires: %{name} = %{version}-%{release} | |
139 | ||
140 | %description -n python-pysmraw | |
f36312d1 | 141 | Python 2 bindings for libsmraw library. |
fbedd671 JB |
142 | |
143 | %description -n python-pysmraw -l pl.UTF-8 | |
f36312d1 JB |
144 | Wiązania Pythona 2 do biblioteki libsmraw. |
145 | ||
146 | %package -n python3-pysmraw | |
147 | Summary: Python 3 bindings for libsmraw library | |
148 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki libsmraw | |
149 | Group: Libraries/Python | |
150 | Requires: %{name} = %{version}-%{release} | |
151 | ||
152 | %description -n python3-pysmraw | |
153 | Python 3 bindings for libsmraw library. | |
154 | ||
155 | %description -n python3-pysmraw -l pl.UTF-8 | |
156 | Wiązania Pythona 3 do biblioteki libsmraw. | |
fbedd671 JB |
157 | |
158 | %prep | |
159 | %setup -q | |
fbedd671 JB |
160 | |
161 | %build | |
162 | %{__gettextize} | |
fbedd671 JB |
163 | %{__libtoolize} |
164 | %{__aclocal} -I m4 | |
165 | %{__autoconf} | |
166 | %{__autoheader} | |
167 | %{__automake} | |
168 | %configure \ | |
f36312d1 JB |
169 | %{?with_python2:--enable-python2} \ |
170 | %{?with_python3:--enable-python3} | |
fbedd671 JB |
171 | %{__make} |
172 | ||
173 | %install | |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
176 | %{__make} install \ | |
177 | DESTDIR=$RPM_BUILD_ROOT | |
178 | ||
179 | # obsoleted by pkg-config | |
180 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsmraw.la | |
181 | ||
f36312d1 | 182 | %if %{with python2} |
fbedd671 JB |
183 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pysmraw.{la,a} |
184 | %endif | |
f36312d1 JB |
185 | %if %{with python3} |
186 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/pysmraw.{la,a} | |
187 | %endif | |
fbedd671 JB |
188 | |
189 | %clean | |
190 | rm -rf $RPM_BUILD_ROOT | |
191 | ||
192 | %post -p /sbin/ldconfig | |
193 | %postun -p /sbin/ldconfig | |
194 | ||
195 | %files | |
196 | %defattr(644,root,root,755) | |
197 | %doc AUTHORS ChangeLog README | |
198 | %attr(755,root,root) %{_libdir}/libsmraw.so.*.*.* | |
199 | %attr(755,root,root) %ghost %{_libdir}/libsmraw.so.1 | |
200 | ||
201 | %files devel | |
202 | %defattr(644,root,root,755) | |
203 | %attr(755,root,root) %{_libdir}/libsmraw.so | |
204 | %{_includedir}/libsmraw | |
205 | %{_includedir}/libsmraw.h | |
206 | %{_pkgconfigdir}/libsmraw.pc | |
207 | %{_mandir}/man3/libsmraw.3* | |
208 | ||
209 | %files static | |
210 | %defattr(644,root,root,755) | |
211 | %{_libdir}/libsmraw.a | |
212 | ||
213 | %files tools | |
214 | %defattr(644,root,root,755) | |
215 | %attr(755,root,root) %{_bindir}/smrawmount | |
216 | %attr(755,root,root) %{_bindir}/smrawverify | |
217 | %{_mandir}/man1/smrawmount.1* | |
218 | ||
f36312d1 | 219 | %if %{with python2} |
fbedd671 JB |
220 | %files -n python-pysmraw |
221 | %defattr(644,root,root,755) | |
222 | %attr(755,root,root) %{py_sitedir}/pysmraw.so | |
223 | %endif | |
f36312d1 JB |
224 | |
225 | %if %{with python3} | |
226 | %files -n python3-pysmraw | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{py3_sitedir}/pysmraw.so | |
229 | %endif |