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