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