+%bcond_without perl
+%bcond_without python # required by prewikka
+
%include /usr/lib/rpm/macros.perl
Summary: The Prelude library
Summary(pl): Biblioteka Prelude
Name: libprelude
-Version: 0.9.8
+Version: 0.9.12
Release: 1
License: GPL
Group: Libraries
Source0: http://www.prelude-ids.org/download/releases/%{name}-%{version}.tar.gz
-# Source0-md5: d46527e7b036d20c3cc72c887486d773
+# Source0-md5: 2e8769cd05d51d3e69380bf234e6efef
URL: http://www.prelude-ids.org/
BuildRequires: bison
BuildRequires: flex
-BuildRequires: gnutls-devel >= 1.2.5
+BuildRequires: gnutls-devel >= 1.0.17
BuildRequires: gtk-doc
-BuildRequires: perl-devel
-BuildRequires: python-devel
+%{?with_perl:BuildRequires: perl-devel}
+%{?with_python:BuildRequires: python-devel}
BuildRequires: rpm-perlprov
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%configure \
--enable-shared \
--enable-static \
- --enable-perl \
- --enable-python \
--enable-gtk-doc \
+ --with-perl%{!?with_perl:=no} \
+ --with-python%{!?with_python:=no} \
--with-html-dir=%{_gtkdocdir}/libprelude
# first make the perl makefile otherwise with jobserver strange things happen:
# Makefile out-of-date with respect to Makefile.PL
+%if %{with perl}
%{__make} -C bindings perl/Makefile
+%endif
%{__make}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%if %{with perl}
cd bindings/perl && %{__perl} Makefile.PL \
INSTALLDIRS=vendor
cd ../..
%{__make} -C bindings/perl install \
DESTDIR=$RPM_BUILD_ROOT
+%endif
+%if %{with python}
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/prelude-adduser
%attr(755,root,root) %{_libdir}/lib*.so.*.*
+# needed in normal operational
+%{_libdir}/lib*.la
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/libprelude-config
%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
%{_includedir}/libprelude
%{_aclocaldir}/*.m4
%{_gtkdocdir}/libprelude
%defattr(644,root,root,755)
%{_libdir}/lib*.a
+%if %{with perl}
%files -n perl-libprelude
%defattr(644,root,root,755)
%dir %{perl_vendorarch}/auto/Prelude
%attr(755,root,root) %{perl_vendorarch}/auto/Prelude/*.so
%{perl_vendorarch}/auto/Prelude/*.bs
%{perl_vendorarch}/Prelude.pm
+%endif
+%if %{with python}
%files -n python-libprelude
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/*.so
%{py_sitedir}/*.py[co]
+%endif