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