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