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