packages: libprelude/libprelude.spec, libprelude/libprelude-ruby.patch (NEW...
qboosh
qboosh at pld-linux.org
Sun Aug 7 19:53:13 CEST 2011
Author: qboosh Date: Sun Aug 7 17:53:13 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- refresh PreludeEasy python binding from SWIG sources (needed for gcc 4.6+)
- package perl PreludeEasy plugin
- package lua binding
- some work on ruby binding (not finished, not ready for ruby 1.9)
---- Files affected:
packages/libprelude:
libprelude.spec (1.30 -> 1.31) , libprelude-ruby.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/libprelude/libprelude.spec
diff -u packages/libprelude/libprelude.spec:1.30 packages/libprelude/libprelude.spec:1.31
--- packages/libprelude/libprelude.spec:1.30 Wed Aug 3 11:56:15 2011
+++ packages/libprelude/libprelude.spec Sun Aug 7 19:53:08 2011
@@ -1,8 +1,10 @@
# $Revision$, $Date$
#
# Conditional build:
-%bcond_without perl # don't build perl bindings
-%bcond_without python # don't build python bindings (required by prewikka)
+%bcond_without lua # Lua (5.1) bindings
+%bcond_without perl # Perl bindings
+%bcond_without python # Python bindings (required by prewikka)
+%bcond_with ruby # Ruby bindings (not ready for 1.9 yet)
#
%include /usr/lib/rpm/macros.perl
Summary: The Prelude library
@@ -16,6 +18,7 @@
Source0: http://www.prelude-ids.com/download/releases/libprelude/%{name}-%{version}.tar.gz
# Source0-md5: a5bb76538d240e5fac5f6ab0b7fabfe5
Patch0: %{name}-libtool.patch
+Patch1: %{name}-ruby.patch
URL: http://www.prelude-ids.com/
BuildRequires: autoconf >= 2.59
BuildRequires: automake
@@ -24,14 +27,19 @@
BuildRequires: gnutls-devel >= 1.0.17
BuildRequires: gtk-doc >= 1.0
BuildRequires: libgcrypt-devel >= 1.1.94
-BuildRequires: libltdl-devel
-BuildRequires: libtool
+BuildRequires: libltdl-devel >= 2:2.0
+BuildRequires: libtool >= 2:2.0
+%{?with_lua:BuildRequires: lua51-devel >= 5.1}
%{?with_perl:BuildRequires: perl-devel}
%{?with_python:BuildRequires: python-devel >= 1:2.5}
BuildRequires: rpm-perlprov
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
+%{?with_ruby:BuildRequires: ruby-devel >= 1.8, ruby-devel < 1.9}
+BuildRequires: sed >= 4.0
%{?with_perl:BuildRequires: swig-perl}
+%{?with_python:BuildRequires: swig-python}
+%{?with_ruby:BuildRequires: swig-ruby}
Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -95,6 +103,18 @@
%description static -l pl.UTF-8
Statyczna biblioteka libprelude.
+%package -n lua-prelude
+Summary: libprelude Lua bindings
+Summary(pl.UTF-8): Dowiązania języka Lua do libprelude
+Group: Development/Languages
+Requires: %{name} = %{version}-%{release}
+
+%description -n lua-prelude
+libprelude Lua bindings.
+
+%description -n lua-prelude -l pl.UTF-8
+Dowiązania języka Lua do libprelude.
+
%package -n perl-libprelude
Summary: libprelude Perl bindings
Summary(pl.UTF-8): Dowiązania Perla do libprelude
@@ -122,6 +142,20 @@
%prep
%setup -q
%patch0 -p1
+%{?with_ruby:%patch1 -p1}
+
+%if %{with python}
+# regenerate with fresh swig for gcc 4.6+
+%{__rm} bindings/python/{_PreludeEasy.cxx,PreludeEasy.py}
+%endif
+%if %{with ruby}
+# same for ruby 1.9
+sed -i -e 's,"rubyio.h","ruby/io.h",' bindings/ruby/libpreludecpp-ruby.i
+%{__rm} bindings/ruby/PreludeEasy.cxx
+# TODO: more
+%endif
+
+sed -i -e 's/lua >= 5.1/lua51 >= 5.1/' configure.in
%build
%{__libtoolize}
@@ -130,8 +164,9 @@
%{__autoheader}
%{__automake}
%configure \
- --enable-static \
--enable-gtk-doc \
+ --enable-static \
+ --with%{!?with_lua:out}-lua \
--with%{!?with_perl:out}-perl \
--with%{!?with_python:out}-python \
--with-html-dir=%{_gtkdocdir}/libprelude \
@@ -150,6 +185,9 @@
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
%endif
+%if %{with lua}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/PreludeEasy.{la,a}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -164,7 +202,10 @@
%attr(755,root,root) %{_bindir}/prelude-admin
%dir %{_sysconfdir}/prelude
%dir %{_sysconfdir}/prelude/default
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/*.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf
%dir %{_sysconfdir}/prelude/profile
%{_mandir}/man1/prelude-admin.1*
@@ -192,6 +233,12 @@
%{_libdir}/libprelude.a
%{_libdir}/libpreludecpp.a
+%if %{with lua}
+%files -n lua-prelude
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/PreludeEasy.so
+%endif
+
%if %{with perl}
%files -n perl-libprelude
%defattr(644,root,root,755)
@@ -199,6 +246,9 @@
%dir %{perl_vendorarch}/auto/Prelude
%{perl_vendorarch}/auto/Prelude/Prelude.bs
%attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so
+%dir %{perl_vendorarch}/auto/PreludeEasy
+%{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.bs
+%attr(755,root,root) %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.so
%endif
%if %{with python}
@@ -218,6 +268,12 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.31 2011/08/07 17:53:08 qboosh
+- refresh PreludeEasy python binding from SWIG sources (needed for gcc 4.6+)
+- package perl PreludeEasy plugin
+- package lua binding
+- some work on ruby binding (not finished, not ready for ruby 1.9)
+
Revision 1.30 2011/08/03 09:56:15 paszczus
- updated to 1.0.0
================================================================
Index: packages/libprelude/libprelude-ruby.patch
diff -u /dev/null packages/libprelude/libprelude-ruby.patch:1.1
--- /dev/null Sun Aug 7 19:53:13 2011
+++ packages/libprelude/libprelude-ruby.patch Sun Aug 7 19:53:08 2011
@@ -0,0 +1,11 @@
+--- libprelude-1.0.0/m4/am_path_ruby.m4.orig 2010-01-11 12:09:42.000000000 +0100
++++ libprelude-1.0.0/m4/am_path_ruby.m4 2011-08-07 16:18:31.583033709 +0200
+@@ -100,7 +100,7 @@
+ AC_SUBST([rbexecdir], [$am_cv_ruby_rbexecdir])
+
+ RUBY_INCLUDES=`$RUBY -r rbconfig -e 'if Config::CONFIG[["archdir"]] then print " -I" + Config::CONFIG[["archdir"]] end
+- if Config::CONFIG[["rubyhdrdir"]] then print " -I" + Config::CONFIG[["rubyhdrdir"]] end'`
++ if Config::CONFIG[["rubyhdrdir"]] then print " -I" + Config::CONFIG[["rubyhdrdir"]]; print " -I" + Config::CONFIG[["rubyhdrdir"]] + "/" + Config::CONFIG[["arch"]] end'`
+ AC_SUBST([RUBY_INCLUDES])
+
+ dnl pkgrbexecdir -- $(rbexecdir)/$(PACKAGE)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/libprelude/libprelude.spec?r1=1.30&r2=1.31&f=u
More information about the pld-cvs-commit
mailing list