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