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