]> git.pld-linux.org Git - packages/hivex.git/blob - hivex.spec
43071c97735c9325b00ac310a4cce5d5b69b85ef
[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 Summary:        Windows Registry "hive" extraction library
13 Summary(pl.UTF-8):      Biblioteka do wydobywania danych z plików "hive" Rejestru Windows
14 Name:           hivex
15 Version:        1.3.14
16 Release:        10
17 License:        LGPL v2.1
18 Group:          Libraries
19 Source0:        http://libguestfs.org/download/hivex/%{name}-%{version}.tar.gz
20 # Source0-md5:  9fb5ed4525d30a84b216a05150be1558
21 URL:            http://libguestfs.org/
22 BuildRequires:  autoconf >= 2.50
23 BuildRequires:  automake
24 BuildRequires:  gettext-tools >= 0.17
25 BuildRequires:  libtool
26 BuildRequires:  libxml2-devel >= 2.0
27 BuildRequires:  ocaml
28 BuildRequires:  ocaml-findlib
29 BuildRequires:  perl-ExtUtils-MakeMaker
30 BuildRequires:  perl-IO-stringy
31 BuildRequires:  perl-Test-Simple
32 BuildRequires:  perl-base
33 BuildRequires:  perl-tools-pod
34 BuildRequires:  pkgconfig
35 BuildRequires:  python >= 2
36 BuildRequires:  python-devel >= 2
37 %if %{with python3}
38 BuildRequires:  python3 >= 1:3.2
39 BuildRequires:  python3-devel >= 1:3.2
40 %endif
41 BuildRequires:  readline-devel
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 %if %{with ruby}
44 BuildRequires:  ruby-devel
45 BuildRequires:  ruby-rake
46 %endif
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         --with-python-installdir=%{py3_sitedir} \
169         --disable-ocaml \
170         --disable-perl \
171         --disable-ruby \
172         --disable-silent-rules
173
174 %{__make}
175 cd ..
176 %endif
177
178 %configure \
179         --disable-silent-rules \
180         --with-python-installdir=%{py_sitedir} \
181         %{__enable_disable static_libs static}
182
183 %{__make} \
184         INSTALLDIRS=vendor
185
186 %install
187 rm -rf $RPM_BUILD_ROOT
188
189 %if %{with python3}
190 # lib is needed for relink on install
191 %{__make} -C build-py3/lib install \
192         DESTDIR=$RPM_BUILD_ROOT
193 %{__make} -C build-py3/python install \
194         DESTDIR=$RPM_BUILD_ROOT
195
196 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
197 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
198 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la
199 %endif
200
201 %{__make} install \
202         INSTALLDIRS=vendor \
203         DESTDIR=$RPM_BUILD_ROOT
204
205 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la \
206         $RPM_BUILD_ROOT%{py_sitedir}/*.la
207
208 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
209 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
210 %py_postclean
211
212 %find_lang %{name}
213
214 %clean
215 rm -rf $RPM_BUILD_ROOT
216
217 %post   -p /sbin/ldconfig
218 %postun -p /sbin/ldconfig
219
220 %files -f %{name}.lang
221 %defattr(644,root,root,755)
222 %doc ChangeLog README TODO
223 %attr(755,root,root) %{_bindir}/hivexget
224 %attr(755,root,root) %{_bindir}/hivexml
225 %attr(755,root,root) %{_bindir}/hivexsh
226 %attr(755,root,root) %{_libdir}/libhivex.so.*.*.*
227 %attr(755,root,root) %ghost %{_libdir}/libhivex.so.0
228 %{_mandir}/man1/hivexget.1*
229 %{_mandir}/man1/hivexml.1*
230 %{_mandir}/man1/hivexsh.1*
231
232 %files devel
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/libhivex.so
235 %{_includedir}/hivex.h
236 %{_pkgconfigdir}/hivex.pc
237 %{_mandir}/man3/hivex.3*
238
239 %if %{with static_libs}
240 %files static
241 %defattr(644,root,root,755)
242 %{_libdir}/libhivex.a
243 %endif
244
245 %files -n ocaml-hivex
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmlhivex.so
248 %{_libdir}/ocaml/stublibs/dllmlhivex.so.owner
249
250 %files -n ocaml-hivex-devel
251 %defattr(644,root,root,755)
252 %dir %{_libdir}/ocaml/hivex
253 %{_libdir}/ocaml/hivex/META
254 %{_libdir}/ocaml/hivex/hivex.cmi
255 %{_libdir}/ocaml/hivex/hivex.mli
256 %{_libdir}/ocaml/hivex/libmlhivex.a
257 %{_libdir}/ocaml/hivex/mlhivex.cma
258 %if %{with ocaml_opt}
259 %{_libdir}/ocaml/hivex/hivex.cmx
260 %{_libdir}/ocaml/hivex/mlhivex.a
261 %{_libdir}/ocaml/hivex/mlhivex.cmxa
262 %endif
263
264 %files -n perl-hivex
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_bindir}/hivexregedit
267 %dir %{perl_vendorarch}/Win
268 %dir %{perl_vendorarch}/Win/Hivex
269 %{perl_vendorarch}/Win/Hivex.pm
270 %{perl_vendorarch}/Win/Hivex/Regedit.pm
271 %dir %{perl_vendorarch}/auto/Win
272 %dir %{perl_vendorarch}/auto/Win/Hivex
273 %attr(755,root,root) %{perl_vendorarch}/auto/Win/Hivex/Hivex.so
274 %{_mandir}/man1/hivexregedit.1*
275 %{_mandir}/man3/Win::Hivex.3pm*
276 %{_mandir}/man3/Win::Hivex::Regedit.3pm*
277
278 %files -n python-hivex
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{py_sitedir}/libhivexmod.so
281 %dir %{py_sitedir}/hivex
282 %{py_sitedir}/hivex/*.py[co]
283
284 %if %{with python3}
285 %files -n python3-hivex
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{py3_sitedir}/libhivexmod.cpython-*.so
288 %{py3_sitedir}/hivex
289 %endif
290
291 %if %{with ruby}
292 %files -n ruby-hivex
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{ruby_vendorarchdir}/_hivex.so
295 %{ruby_vendorlibdir}/hivex.rb
296 %endif
This page took 0.069197 seconds and 3 git commands to generate.