]>
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 | |
277d6078 | 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 |
f37e346d | 15 | Version: 1.3.14 |
d6defebf | 16 | Release: 10 |
93c0457c AF |
17 | License: LGPL v2.1 |
18 | Group: Libraries | |
19 | Source0: http://libguestfs.org/download/hivex/%{name}-%{version}.tar.gz | |
f37e346d | 20 | # Source0-md5: 9fb5ed4525d30a84b216a05150be1558 |
457ce10a | 21 | URL: http://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 | ||
158 | %build | |
d13f38dc JR |
159 | %{__aclocal} |
160 | %{__automake} | |
161 | %{__autoconf} | |
db1c42af JB |
162 | |
163 | %if %{with python3} | |
164 | install -d build-py3 | |
165 | cd build-py3 | |
166 | ../%configure \ | |
167 | PYTHON="%{__python3}" \ | |
141512df | 168 | --with-python-installdir=%{py3_sitedir} \ |
db1c42af JB |
169 | --disable-ocaml \ |
170 | --disable-perl \ | |
f5d44f26 JB |
171 | --disable-ruby \ |
172 | --disable-silent-rules | |
db1c42af JB |
173 | |
174 | %{__make} | |
175 | cd .. | |
176 | %endif | |
177 | ||
93c0457c | 178 | %configure \ |
7b1109ec | 179 | --disable-silent-rules \ |
141512df | 180 | --with-python-installdir=%{py_sitedir} \ |
7b1109ec | 181 | %{__enable_disable static_libs static} |
93c0457c AF |
182 | |
183 | %{__make} \ | |
184 | INSTALLDIRS=vendor | |
185 | ||
186 | %install | |
187 | rm -rf $RPM_BUILD_ROOT | |
188 | ||
db1c42af JB |
189 | %if %{with python3} |
190 | # lib is needed for relink on install | |
191 | %{__make} -C build-py3/lib install \ | |
192 | DESTDIR=$RPM_BUILD_ROOT | |
193 | %{__make} -C build-py3/python install \ | |
194 | DESTDIR=$RPM_BUILD_ROOT | |
f5d44f26 JB |
195 | |
196 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
197 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
db1c42af JB |
198 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la |
199 | %endif | |
200 | ||
93c0457c AF |
201 | %{__make} install \ |
202 | INSTALLDIRS=vendor \ | |
203 | DESTDIR=$RPM_BUILD_ROOT | |
204 | ||
205 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la \ | |
206 | $RPM_BUILD_ROOT%{py_sitedir}/*.la | |
207 | ||
5d1762e1 JB |
208 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
209 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
210 | %py_postclean | |
211 | ||
93c0457c AF |
212 | %find_lang %{name} |
213 | ||
214 | %clean | |
215 | rm -rf $RPM_BUILD_ROOT | |
216 | ||
217 | %post -p /sbin/ldconfig | |
218 | %postun -p /sbin/ldconfig | |
219 | ||
220 | %files -f %{name}.lang | |
221 | %defattr(644,root,root,755) | |
222 | %doc ChangeLog README TODO | |
223 | %attr(755,root,root) %{_bindir}/hivexget | |
224 | %attr(755,root,root) %{_bindir}/hivexml | |
225 | %attr(755,root,root) %{_bindir}/hivexsh | |
226 | %attr(755,root,root) %{_libdir}/libhivex.so.*.*.* | |
227 | %attr(755,root,root) %ghost %{_libdir}/libhivex.so.0 | |
228 | %{_mandir}/man1/hivexget.1* | |
229 | %{_mandir}/man1/hivexml.1* | |
230 | %{_mandir}/man1/hivexsh.1* | |
231 | ||
232 | %files devel | |
233 | %defattr(644,root,root,755) | |
5d1762e1 | 234 | %attr(755,root,root) %{_libdir}/libhivex.so |
93c0457c AF |
235 | %{_includedir}/hivex.h |
236 | %{_pkgconfigdir}/hivex.pc | |
237 | %{_mandir}/man3/hivex.3* | |
238 | ||
239 | %if %{with static_libs} | |
240 | %files static | |
241 | %defattr(644,root,root,755) | |
242 | %{_libdir}/libhivex.a | |
243 | %endif | |
244 | ||
5d1762e1 JB |
245 | %files -n ocaml-hivex |
246 | %defattr(644,root,root,755) | |
247 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmlhivex.so | |
248 | %{_libdir}/ocaml/stublibs/dllmlhivex.so.owner | |
249 | ||
250 | %files -n ocaml-hivex-devel | |
251 | %defattr(644,root,root,755) | |
252 | %dir %{_libdir}/ocaml/hivex | |
253 | %{_libdir}/ocaml/hivex/META | |
254 | %{_libdir}/ocaml/hivex/hivex.cmi | |
5d1762e1 JB |
255 | %{_libdir}/ocaml/hivex/hivex.mli |
256 | %{_libdir}/ocaml/hivex/libmlhivex.a | |
5d1762e1 | 257 | %{_libdir}/ocaml/hivex/mlhivex.cma |
c149d469 JR |
258 | %if %{with ocaml_opt} |
259 | %{_libdir}/ocaml/hivex/hivex.cmx | |
260 | %{_libdir}/ocaml/hivex/mlhivex.a | |
5d1762e1 | 261 | %{_libdir}/ocaml/hivex/mlhivex.cmxa |
c149d469 | 262 | %endif |
5d1762e1 | 263 | |
93c0457c AF |
264 | %files -n perl-hivex |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %{_bindir}/hivexregedit | |
3fc5b4cc AF |
267 | %dir %{perl_vendorarch}/Win |
268 | %dir %{perl_vendorarch}/Win/Hivex | |
93c0457c AF |
269 | %{perl_vendorarch}/Win/Hivex.pm |
270 | %{perl_vendorarch}/Win/Hivex/Regedit.pm | |
3fc5b4cc AF |
271 | %dir %{perl_vendorarch}/auto/Win |
272 | %dir %{perl_vendorarch}/auto/Win/Hivex | |
93c0457c AF |
273 | %attr(755,root,root) %{perl_vendorarch}/auto/Win/Hivex/Hivex.so |
274 | %{_mandir}/man1/hivexregedit.1* | |
277d6078 JB |
275 | %{_mandir}/man3/Win::Hivex.3pm* |
276 | %{_mandir}/man3/Win::Hivex::Regedit.3pm* | |
93c0457c AF |
277 | |
278 | %files -n python-hivex | |
279 | %defattr(644,root,root,755) | |
93c0457c | 280 | %attr(755,root,root) %{py_sitedir}/libhivexmod.so |
bbedaddb JB |
281 | %dir %{py_sitedir}/hivex |
282 | %{py_sitedir}/hivex/*.py[co] | |
7b1109ec | 283 | |
db1c42af JB |
284 | %if %{with python3} |
285 | %files -n python3-hivex | |
286 | %defattr(644,root,root,755) | |
287 | %attr(755,root,root) %{py3_sitedir}/libhivexmod.cpython-*.so | |
288 | %{py3_sitedir}/hivex | |
289 | %endif | |
290 | ||
265f46fc | 291 | %if %{with ruby} |
7b1109ec JB |
292 | %files -n ruby-hivex |
293 | %defattr(644,root,root,755) | |
d13f38dc JR |
294 | %attr(755,root,root) %{ruby_vendorarchdir}/_hivex.so |
295 | %{ruby_vendorlibdir}/hivex.rb | |
265f46fc | 296 | %endif |