]> git.pld-linux.org Git - packages/libprelude.git/commitdiff
- updated to 3.1.0
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 9 Oct 2016 16:43:44 +0000 (18:43 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 9 Oct 2016 16:43:44 +0000 (18:43 +0200)
- updated python-install patch
- added lua patch (fix lua interpreter version detection)
- now (following upstream) it defaults to lua 5.2

libprelude-lua.patch [new file with mode: 0644]
libprelude.spec
python-install.patch

diff --git a/libprelude-lua.patch b/libprelude-lua.patch
new file mode 100644 (file)
index 0000000..884cb39
--- /dev/null
@@ -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
index 1fa3a1063cab39c2bf9b1ae864eea49bb341bc62..2063f00e2f43fe2b740fc0d9e456d2a83602a35f 100644 (file)
@@ -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}
index 376e8887f462c2896b0511ec98fccf867fb20723..93c8f006cbd3a037602058cd3f62db25216d732b 100644 (file)
@@ -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
  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:
This page took 0.075786 seconds and 4 git commands to generate.