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