robert pushed to lua-expat (f20). "Apply patch by jkaluza (fix RHBZ# 1100238) to build -compat subpackage (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Apr 18 11:56:24 UTC 2015


>From 2ded7ebdd3ca534f0ddb34e242c13e4f6c5b8b48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl at redhat.com>
Date: Wed, 28 May 2014 00:07:42 +0200
Subject: Apply patch by jkaluza (fix RHBZ# 1100238) to build -compat
 subpackage

  against compat-lua

diff --git a/lua-expat.spec b/lua-expat.spec
index 8603044..bb2b82d 100644
--- a/lua-expat.spec
+++ b/lua-expat.spec
@@ -1,10 +1,14 @@
 %define luaver 5.2
 %define lualibdir %{_libdir}/lua/%{luaver}
 %define luapkgdir %{_datadir}/lua/%{luaver}
+%define luacompatver 5.1
+%define luacompatlibdir %{_libdir}/lua/%{luacompatver}
+%define luacompatpkgdir %{_datadir}/lua/%{luacompatver}
+%define lua51dir %{_builddir}/lua51-%{name}-%{version}-%{release}
 
 Name:           lua-expat
 Version:        1.3.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        SAX XML parser based on the Expat library
 
 Group:          Development/Libraries
@@ -17,21 +21,48 @@ BuildRequires:  lua >= %{luaver}, lua-devel >= %{luaver}
 BuildRequires:  expat-devel
 Requires:       lua >= %{luaver}
 
+%if 0%{?fedora} >= 20
+BuildRequires:  compat-lua >= %{luacompatver}, compat-lua-devel >= %{luacompatver}
+%endif
+
 %description
 LuaExpat is a SAX XML parser based on the Expat library.
 
+%if 0%{?fedora} >= 20
+%package compat
+Summary:        SAX XML parser based on the Expat library for Lua 5.1
+Group:          Development/Libraries
+
+%description compat
+LuaExpat is a SAX XML parser based on the Expat library for Lua 5.1.
+%endif
+
 %prep
 %setup -q -n luaexpat-%{version}
 
+%if 0%{?fedora} >= 20
+rm -rf %{lua51dir}
+cp -a . %{lua51dir}
+%endif
 
 %build
-make %{?_smp_mflags} LUA_CDIR=%{lualibdir} LUA_LDIR=%{luapkgdir} LUA_INC=-I%{_includedir} EXPAT_INC=-I%{_includedir} CFLAGS="%{optflags} -fPIC"
+make %{?_smp_mflags} LUA_V=%{luaver} LUA_CDIR=%{lualibdir} LUA_LDIR=%{luapkgdir} LUA_INC=-I%{_includedir} EXPAT_INC=-I%{_includedir} CFLAGS="%{optflags} -fPIC"
 
+%if 0%{?fedora} >= 20
+pushd %{lua51dir}
+make %{?_smp_mflags} LUA_V=%{luacompatver} LUA_CDIR=%{luacompatlibdir} LUA_LDIR=%{luacompatpkgdir} LUA_INC=-I%{_includedir}/lua-%{luacompatver} EXPAT_INC=-I%{_includedir} CFLAGS="%{optflags} -fPIC"
+popd
+%endif
 
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot} LUA_CDIR=%{lualibdir} LUA_LDIR=%{luapkgdir} INSTALL='install -p'
 
+%if 0%{?fedora} >= 20
+pushd %{lua51dir}
+make install DESTDIR=%{buildroot} LUA_CDIR=%{luacompatlibdir} LUA_LDIR=%{luacompatpkgdir} INSTALL='install -p'
+popd
+%endif
 
 %check
 lua -e 'package.cpath="./src/?.so;"..package.cpath; dofile("tests/test.lua");'
@@ -47,8 +78,19 @@ rm -rf %{buildroot}
 %{lualibdir}/*
 %{luapkgdir}/*
 
+%if 0%{?fedora} >= 20
+%files compat
+%defattr(-,root,root,-)
+%doc README doc/us/*
+%{luacompatlibdir}/*
+%{luacompatpkgdir}/*
+%endif
 
 %changelog
+* Tue May 27 2014 Matěj Cepl <mcepl at redhat.com> - 1.3.0-2
+- Apply patch by jkaluza (fix RHBZ# 1100238) to build -compat subpackage
+  against compat-lua
+
 * Wed Apr 23 2014 Robert Scheck <robert at fedoraproject.org> - 1.3.0-1
 - New upstream release
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/lua-expat.git/commit/?h=f20&id=2ded7ebdd3ca534f0ddb34e242c13e4f6c5b8b48


More information about the scm-commits mailing list