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