commit e4dc595265e5bccdc16a002ae8bcc89c284c82c7
Author: Jakub Bogusz <qbo...@pld-linux.org>
Date:   Sun Oct 9 18:43:44 2016 +0200

    - updated to 3.1.0
    - updated python-install patch
    - added lua patch (fix lua interpreter version detection)
    - now (following upstream) it defaults to lua 5.2

 libprelude-lua.patch | 19 +++++++++++++++++++
 libprelude.spec      | 29 +++++++++++++++++------------
 python-install.patch | 12 ++++++------
 3 files changed, 42 insertions(+), 18 deletions(-)
---
diff --git a/libprelude.spec b/libprelude.spec
index 1fa3a10..2063f00 100644
--- a/libprelude.spec
+++ b/libprelude.spec
@@ -7,19 +7,23 @@
 %bcond_without ruby            # Ruby bindings
 %bcond_without static_libs     # static libraries
 #
+# 5.1 also possible, 5.2 is preferred
+%define        lua_ver 5.2
+%define        lua_pkg lua%(echo %{lua_ver} | tr -d .)
 %include       /usr/lib/rpm/macros.perl
 Summary:       The Prelude library
 Summary(pl.UTF-8):     Biblioteka Prelude
 Name:          libprelude
-Version:       1.2.6
-Release:       3
+Version:       3.1.0
+Release:       1
 License:       GPL v2 or commercial
 Group:         Libraries
-# https://www.prelude-ids.org/projects/prelude/files
-Source0:       
https://www.prelude-siem.org/attachments/download/410/%{name}-%{version}.tar.gz
-# Source0-md5: 6a5aa32864ca6d74e1c7af0cdab7bf40
+#Source0Download: https://www.prelude-ids.org/projects/prelude/files
+Source0:       
https://www.prelude-ids.org/attachments/download/721/%{name}-%{version}.tar.gz
+# Source0-md5: 2e1a5d7cbf98a2d57fbb367a578dbf8c
 Patch0:                python-install.patch
-URL:           https://www.prelude-siem.org/
+Patch1:                %{name}-lua.patch
+URL:           https://www.prelude-ids.org/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1:1.9
 BuildRequires: bison
@@ -30,7 +34,7 @@ BuildRequires:        libgcrypt-devel >= 1.1.94
 BuildRequires: libltdl-devel >= 2:2.0
 BuildRequires: libstdc++-devel
 BuildRequires: libtool >= 2:2.0
-%{?with_lua:BuildRequires:     lua51-devel >= 5.1}
+%{?with_lua:BuildRequires:     %{lua_pkg}-devel >= %{lua_ver}}
 %{?with_perl:BuildRequires:    perl-devel}
 %{?with_python2:BuildRequires: python-devel >= 1:2.5}
 %{?with_python3:BuildRequires: python3-devel >= 1:3.2}
@@ -161,6 +165,7 @@ Summary:    PreludeEasy - libprelude Lua bindings
 Summary(pl.UTF-8):     PreludeEasy - dowiązania języka Lua do libprelude
 Group:         Development/Languages
 Requires:      %{name}-c++ = %{version}-%{release}
+Requires:      %{lua_pkg} >= %{lua_ver}
 
 %description -n lua-prelude
 PreludeEasy - libprelude Lua bindings.
@@ -221,14 +226,13 @@ Wiązania języka Ruby do libprelude.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %if %{with python3}
 # regenerate with fresh swig for python 3.5+
 %{__rm} bindings/python/{_prelude.cxx,prelude.py}
 %endif
 
-%{__sed} -i -e 's/lua >= 5.1/lua51 >= 5.1/;s/lua -e/lua5.1 -e/' configure.in
-
 %build
 %{__libtoolize}
 %{__aclocal} -I m4 -I libmissing/m4
@@ -260,8 +264,8 @@ rm -rf $RPM_BUILD_ROOT
        py3execdir=%{py3_sitedir}
 
 %if %{with lua}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.1/prelude.la \
-       %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/5.1/prelude.a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.la \
+       %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.a}
 %endif
 %if %{with python2}
 %py_postclean
@@ -309,6 +313,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_aclocaldir}/libprelude.m4
 %{_gtkdocdir}/libprelude
 %{_pkgconfigdir}/libprelude.pc
+%{_mandir}/man1/libprelude-config.1*
 
 %if %{with static_libs}
 %files static
@@ -342,7 +347,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with lua}
 %files -n lua-prelude
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lua/5.1/prelude.so
+%attr(755,root,root) %{_libdir}/lua/%{lua_ver}/prelude.so
 %endif
 
 %if %{with perl}
diff --git a/libprelude-lua.patch b/libprelude-lua.patch
new file mode 100644
index 0000000..884cb39
--- /dev/null
+++ b/libprelude-lua.patch
@@ -0,0 +1,19 @@
+--- libprelude-3.1.0/configure.ac.orig 2016-09-15 08:49:10.732000884 +0200
++++ libprelude-3.1.0/configure.ac      2016-10-09 15:06:53.560791749 +0200
+@@ -565,6 +565,7 @@
+        [PKG_CHECK_MODULES(LUA, [lua_ver >= 5.1], [
+           AC_DEFINE([HAVE_LUA], [1], [liblua])
+           AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
++        LUA_INTERP=$(pkg-config --variable=interpreter lua_ver)
+           lua_pkg_found=1
+        ],[:])]
+    )
+@@ -582,7 +583,7 @@
+       AC_CHECK_HEADERS([lua.h lauxlib.h], with_lua=yes, [with_lua=no; break])
+       CPPFLAGS="$old_CPPFLAGS"
+ 
+-      LUA_VERSION=$(lua -e "print(string.sub(_VERSION, 5))")
++      LUA_VERSION=$($LUA_INTERP -e "print(string.sub(_VERSION, 5))")
+       AC_SUBST(LUA_VERSION)
+ 
+    else
diff --git a/python-install.patch b/python-install.patch
index 376e888..93c8f00 100644
--- a/python-install.patch
+++ b/python-install.patch
@@ -1,5 +1,5 @@
---- libprelude-1.2.6/bindings/python/Makefile.am.orig  2016-01-31 
13:45:31.756628496 +0100
-+++ libprelude-1.2.6/bindings/python/Makefile.am       2016-01-31 
13:57:00.426599591 +0100
+--- libprelude-3.1.0/bindings/python/Makefile.am.orig  2016-10-09 
10:39:49.724308046 +0200
++++ libprelude-3.1.0/bindings/python/Makefile.am       2016-10-09 
14:42:44.384141631 +0200
 @@ -10,17 +10,17 @@
  
  python-build: _prelude.cxx
@@ -13,12 +13,12 @@
  endif
  install-exec-hook:
  if HAVE_PYTHON2
--      $(PYTHON2) setup.py install `test -n "$(DESTDIR)" && echo --root 
$(DESTDIR)`
-+      $(PYTHON2) setup.py build --build-base=build-2 install `test -n 
"$(DESTDIR)" && echo --root $(DESTDIR)` --skip-build --prefix=$(prefix) 
--install-purelib=$(pythondir) --install-platlib=$(pyexecdir) --optimize=2
+-      $(PYTHON2) setup.py install `test -n "$(DESTDIR)" && echo --root 
$(DESTDIR)` --prefix @prefix@
++      $(PYTHON2) setup.py build --build-base=build-2 install `test -n 
"$(DESTDIR)" && echo --root $(DESTDIR)` --skip-build --prefix @prefix@ 
--install-purelib $(pythondir) --install-platlib $(pyexecdir) --optimize=2
  endif
  if HAVE_PYTHON3
--      $(PYTHON3) setup.py install `test -n "$(DESTDIR)" && echo --root 
$(DESTDIR)`
-+      $(PYTHON3) setup.py build --build-base=build-3 install `test -n 
"$(DESTDIR)" && echo --root $(DESTDIR)` --skip-build --prefix=$(prefix) 
--install-purelib=$(python3dir) --install-platlib=$(py3execdir) --optimize=2
+-      $(PYTHON3) setup.py install `test -n "$(DESTDIR)" && echo --root 
$(DESTDIR)` --prefix @prefix@
++      $(PYTHON3) setup.py build --build-base=build-3 install `test -n 
"$(DESTDIR)" && echo --root $(DESTDIR)` --skip-build --prefix @prefix@ 
--install-purelib $(python3dir) --install-platlib $(py3execdir) --optimize=2
  endif
  
  uninstall-hook:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libprelude.git/commitdiff/e4dc595265e5bccdc16a002ae8bcc89c284c82c7

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to