]>
Commit | Line | Data |
---|---|---|
93c0457c | 1 | # |
93c0457c | 2 | # Conditional build: |
f5d44f26 | 3 | %bcond_without static_libs # static library |
db1c42af | 4 | %bcond_without python3 # CPython 3 module |
73f7d20f | 5 | %bcond_without ocaml # OCaml bindings |
f5d44f26 JB |
6 | %bcond_without ocaml_opt # OCaml native optimized binaries (bytecode is always built) |
7 | %bcond_without ruby # Ruby bindings | |
c149d469 | 8 | |
ea3e9486 | 9 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
c149d469 JR |
10 | %undefine with_ocaml_opt |
11 | %endif | |
93c0457c | 12 | # |
93c0457c | 13 | Summary: Windows Registry "hive" extraction library |
5d1762e1 | 14 | Summary(pl.UTF-8): Biblioteka do wydobywania danych z plików "hive" Rejestru Windows |
93c0457c | 15 | Name: hivex |
ea3e9486 | 16 | Version: 1.3.19 |
0a49d821 | 17 | Release: 2 |
93c0457c AF |
18 | License: LGPL v2.1 |
19 | Group: Libraries | |
ea3e9486 JB |
20 | Source0: https://download.libguestfs.org/hivex/%{name}-%{version}.tar.gz |
21 | # Source0-md5: bfbce53beb2a2d8ef29cbdfec5157633 | |
22 | URL: https://libguestfs.org/ | |
7b1109ec | 23 | BuildRequires: autoconf >= 2.50 |
5d1762e1 | 24 | BuildRequires: automake |
61982e1d | 25 | BuildRequires: gettext-tools >= 0.17 |
93c0457c | 26 | BuildRequires: libtool |
7b1109ec | 27 | BuildRequires: libxml2-devel >= 2.0 |
73f7d20f | 28 | %if %{with ocaml} |
93c0457c | 29 | BuildRequires: ocaml |
5d1762e1 | 30 | BuildRequires: ocaml-findlib |
73f7d20f | 31 | %endif |
5d1762e1 JB |
32 | BuildRequires: perl-ExtUtils-MakeMaker |
33 | BuildRequires: perl-IO-stringy | |
34 | BuildRequires: perl-Test-Simple | |
41fde608 | 35 | BuildRequires: perl-base |
5d1762e1 | 36 | BuildRequires: perl-tools-pod |
d8915a05 | 37 | BuildRequires: pkgconfig |
db1c42af JB |
38 | BuildRequires: python >= 2 |
39 | BuildRequires: python-devel >= 2 | |
40 | %if %{with python3} | |
41 | BuildRequires: python3 >= 1:3.2 | |
42 | BuildRequires: python3-devel >= 1:3.2 | |
43 | %endif | |
5d1762e1 | 44 | BuildRequires: readline-devel |
f5d44f26 | 45 | BuildRequires: rpmbuild(macros) >= 1.714 |
265f46fc | 46 | %if %{with ruby} |
7b1109ec JB |
47 | BuildRequires: ruby-devel |
48 | BuildRequires: ruby-rake | |
265f46fc | 49 | %endif |
93c0457c AF |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %description | |
53 | Hivex is a library for extracting the contents of Windows Registry | |
54 | "hive" files. It is designed to be secure against buggy or malicious | |
55 | registry files. | |
56 | ||
5d1762e1 JB |
57 | %description -l pl.UTF-8 |
58 | Hivex to biblioteka do wydobywania zawartości plików "hive" Rejestru | |
59 | Windows. Została zaprojektowana w celu ochrony przez błędnymi lub | |
60 | niebezpiecznymi plikami rejestru. | |
61 | ||
93c0457c AF |
62 | %package devel |
63 | Summary: Header files for hivex library | |
64 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki hivex | |
65 | Group: Development/Libraries | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | ||
68 | %description devel | |
69 | Header files for hivex library. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | Pliki nagłówkowe biblioteki hivex. | |
73 | ||
74 | %package static | |
75 | Summary: Static hivex library | |
76 | Summary(pl.UTF-8): Statyczna biblioteka hivex | |
77 | Group: Development/Libraries | |
78 | Requires: %{name}-devel = %{version}-%{release} | |
79 | ||
80 | %description static | |
81 | Static hivex library. | |
82 | ||
83 | %description static -l pl.UTF-8 | |
84 | Statyczna biblioteka hivex. | |
85 | ||
5d1762e1 JB |
86 | %package -n ocaml-hivex |
87 | Summary: OCaml bindings for hivex library | |
88 | Summary(pl.UTF-8): Wiązania OCamla do biblioteki hivex | |
89 | Group: Libraries | |
90 | Requires: %{name} = %{version}-%{release} | |
91 | ||
92 | %description -n ocaml-hivex | |
93 | OCaml bindings for hivex library. | |
94 | ||
95 | %description -n ocaml-hivex -l pl.UTF-8 | |
96 | Wiązania OCamla do biblioteki hivex. | |
97 | ||
98 | %package -n ocaml-hivex-devel | |
99 | Summary: Development files for hivex OCaml bindings | |
100 | Summary(pl.UTF-8): Pliki programistyczne wiązań OCamla do biblioteki hivex | |
101 | Group: Development/Libraries | |
102 | Requires: ocaml-hivex = %{version}-%{release} | |
103 | ||
104 | %description -n ocaml-hivex-devel | |
105 | Development files for hivex OCaml bindings. | |
106 | ||
107 | %description -n ocaml-hivex-devel -l pl.UTF-8 | |
108 | Pliki programistyczne wiązań OCamla do biblioteki hivex. | |
109 | ||
93c0457c AF |
110 | %package -n perl-hivex |
111 | Summary: Perl bindings for hivex library | |
5d1762e1 | 112 | Summary(pl.UTF-8): Wiązania Perla do biblioteki hivex |
93c0457c AF |
113 | Group: Development/Languages/Perl |
114 | Requires: %{name} = %{version}-%{release} | |
115 | ||
116 | %description -n perl-hivex | |
117 | Perl bindings for hivex library. | |
118 | ||
5d1762e1 JB |
119 | %description -n perl-hivex -l pl.UTF-8 |
120 | Wiązania Perla do biblioteki hivex. | |
121 | ||
93c0457c | 122 | %package -n python-hivex |
db1c42af JB |
123 | Summary: Python 2 bindings for hivex library |
124 | Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki hivex | |
93c0457c AF |
125 | Group: Development/Languages/Python |
126 | Requires: %{name} = %{version}-%{release} | |
127 | ||
128 | %description -n python-hivex | |
db1c42af | 129 | Python 2 bindings for hivex library. |
93c0457c | 130 | |
5d1762e1 | 131 | %description -n python-hivex -l pl.UTF-8 |
db1c42af JB |
132 | Wiązania Pythona 2 do biblioteki hivex. |
133 | ||
134 | %package -n python3-hivex | |
135 | Summary: Python 3 bindings for hivex library | |
136 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki hivex | |
137 | Group: Development/Languages/Python | |
138 | Requires: %{name} = %{version}-%{release} | |
139 | ||
140 | %description -n python3-hivex | |
141 | Python 3 bindings for hivex library. | |
142 | ||
143 | %description -n python3-hivex -l pl.UTF-8 | |
144 | Wiązania Pythona 3 do biblioteki hivex. | |
93c0457c | 145 | |
7b1109ec JB |
146 | %package -n ruby-hivex |
147 | Summary: Ruby bindings for hivex library | |
148 | Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki hivex | |
149 | Group: Development/Languages | |
150 | Requires: %{name} = %{version}-%{release} | |
151 | ||
152 | %description -n ruby-hivex | |
153 | Ruby bindings for hivex library. | |
154 | ||
155 | %description -n ruby-hivex -l pl.UTF-8 | |
156 | Wiązania języka Ruby do biblioteki hivex. | |
157 | ||
93c0457c AF |
158 | %prep |
159 | %setup -q | |
160 | ||
366b10ba JR |
161 | %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \ |
162 | regedit/hivexregedit | |
163 | ||
93c0457c | 164 | %build |
d13f38dc JR |
165 | %{__aclocal} |
166 | %{__automake} | |
167 | %{__autoconf} | |
db1c42af JB |
168 | |
169 | %if %{with python3} | |
170 | install -d build-py3 | |
171 | cd build-py3 | |
172 | ../%configure \ | |
173 | PYTHON="%{__python3}" \ | |
141512df | 174 | --with-python-installdir=%{py3_sitedir} \ |
db1c42af JB |
175 | --disable-ocaml \ |
176 | --disable-perl \ | |
f5d44f26 JB |
177 | --disable-ruby \ |
178 | --disable-silent-rules | |
db1c42af JB |
179 | |
180 | %{__make} | |
181 | cd .. | |
182 | %endif | |
183 | ||
93c0457c | 184 | %configure \ |
7b1109ec | 185 | --disable-silent-rules \ |
141512df | 186 | --with-python-installdir=%{py_sitedir} \ |
73f7d20f | 187 | %{__enable_disable ocaml} \ |
7b1109ec | 188 | %{__enable_disable static_libs static} |
93c0457c AF |
189 | |
190 | %{__make} \ | |
191 | INSTALLDIRS=vendor | |
192 | ||
193 | %install | |
194 | rm -rf $RPM_BUILD_ROOT | |
195 | ||
db1c42af JB |
196 | %if %{with python3} |
197 | # lib is needed for relink on install | |
198 | %{__make} -C build-py3/lib install \ | |
199 | DESTDIR=$RPM_BUILD_ROOT | |
200 | %{__make} -C build-py3/python install \ | |
201 | DESTDIR=$RPM_BUILD_ROOT | |
f5d44f26 JB |
202 | |
203 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
204 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
db1c42af JB |
205 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la |
206 | %endif | |
207 | ||
93c0457c AF |
208 | %{__make} install \ |
209 | INSTALLDIRS=vendor \ | |
210 | DESTDIR=$RPM_BUILD_ROOT | |
211 | ||
212 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la \ | |
213 | $RPM_BUILD_ROOT%{py_sitedir}/*.la | |
214 | ||
5d1762e1 JB |
215 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
216 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
217 | %py_postclean | |
218 | ||
93c0457c AF |
219 | %find_lang %{name} |
220 | ||
221 | %clean | |
222 | rm -rf $RPM_BUILD_ROOT | |
223 | ||
224 | %post -p /sbin/ldconfig | |
225 | %postun -p /sbin/ldconfig | |
226 | ||
227 | %files -f %{name}.lang | |
228 | %defattr(644,root,root,755) | |
229 | %doc ChangeLog README TODO | |
230 | %attr(755,root,root) %{_bindir}/hivexget | |
231 | %attr(755,root,root) %{_bindir}/hivexml | |
232 | %attr(755,root,root) %{_bindir}/hivexsh | |
233 | %attr(755,root,root) %{_libdir}/libhivex.so.*.*.* | |
234 | %attr(755,root,root) %ghost %{_libdir}/libhivex.so.0 | |
235 | %{_mandir}/man1/hivexget.1* | |
236 | %{_mandir}/man1/hivexml.1* | |
237 | %{_mandir}/man1/hivexsh.1* | |
238 | ||
239 | %files devel | |
240 | %defattr(644,root,root,755) | |
5d1762e1 | 241 | %attr(755,root,root) %{_libdir}/libhivex.so |
93c0457c AF |
242 | %{_includedir}/hivex.h |
243 | %{_pkgconfigdir}/hivex.pc | |
244 | %{_mandir}/man3/hivex.3* | |
245 | ||
246 | %if %{with static_libs} | |
247 | %files static | |
248 | %defattr(644,root,root,755) | |
249 | %{_libdir}/libhivex.a | |
250 | %endif | |
251 | ||
73f7d20f | 252 | %if %{with ocaml} |
5d1762e1 JB |
253 | %files -n ocaml-hivex |
254 | %defattr(644,root,root,755) | |
255 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmlhivex.so | |
256 | %{_libdir}/ocaml/stublibs/dllmlhivex.so.owner | |
257 | ||
258 | %files -n ocaml-hivex-devel | |
259 | %defattr(644,root,root,755) | |
260 | %dir %{_libdir}/ocaml/hivex | |
261 | %{_libdir}/ocaml/hivex/META | |
262 | %{_libdir}/ocaml/hivex/hivex.cmi | |
5d1762e1 JB |
263 | %{_libdir}/ocaml/hivex/hivex.mli |
264 | %{_libdir}/ocaml/hivex/libmlhivex.a | |
5d1762e1 | 265 | %{_libdir}/ocaml/hivex/mlhivex.cma |
c149d469 JR |
266 | %if %{with ocaml_opt} |
267 | %{_libdir}/ocaml/hivex/hivex.cmx | |
268 | %{_libdir}/ocaml/hivex/mlhivex.a | |
5d1762e1 | 269 | %{_libdir}/ocaml/hivex/mlhivex.cmxa |
c149d469 | 270 | %endif |
73f7d20f | 271 | %endif |
5d1762e1 | 272 | |
93c0457c AF |
273 | %files -n perl-hivex |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{_bindir}/hivexregedit | |
3fc5b4cc AF |
276 | %dir %{perl_vendorarch}/Win |
277 | %dir %{perl_vendorarch}/Win/Hivex | |
93c0457c AF |
278 | %{perl_vendorarch}/Win/Hivex.pm |
279 | %{perl_vendorarch}/Win/Hivex/Regedit.pm | |
3fc5b4cc AF |
280 | %dir %{perl_vendorarch}/auto/Win |
281 | %dir %{perl_vendorarch}/auto/Win/Hivex | |
93c0457c AF |
282 | %attr(755,root,root) %{perl_vendorarch}/auto/Win/Hivex/Hivex.so |
283 | %{_mandir}/man1/hivexregedit.1* | |
277d6078 JB |
284 | %{_mandir}/man3/Win::Hivex.3pm* |
285 | %{_mandir}/man3/Win::Hivex::Regedit.3pm* | |
93c0457c AF |
286 | |
287 | %files -n python-hivex | |
288 | %defattr(644,root,root,755) | |
93c0457c | 289 | %attr(755,root,root) %{py_sitedir}/libhivexmod.so |
bbedaddb JB |
290 | %dir %{py_sitedir}/hivex |
291 | %{py_sitedir}/hivex/*.py[co] | |
7b1109ec | 292 | |
db1c42af JB |
293 | %if %{with python3} |
294 | %files -n python3-hivex | |
295 | %defattr(644,root,root,755) | |
296 | %attr(755,root,root) %{py3_sitedir}/libhivexmod.cpython-*.so | |
297 | %{py3_sitedir}/hivex | |
298 | %endif | |
299 | ||
265f46fc | 300 | %if %{with ruby} |
7b1109ec JB |
301 | %files -n ruby-hivex |
302 | %defattr(644,root,root,755) | |
d13f38dc JR |
303 | %attr(755,root,root) %{ruby_vendorarchdir}/_hivex.so |
304 | %{ruby_vendorlibdir}/hivex.rb | |
265f46fc | 305 | %endif |