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