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