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