robert pushed to lua-filesystem (f20). "build -compat subpackage against compat-lua (RHBZ# 1100242)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Apr 18 11:58:30 UTC 2015


>From 5f62e3585f23f3cf6c673431e5b892c97aed6eef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl at redhat.com>
Date: Thu, 29 May 2014 16:43:04 +0200
Subject: build -compat subpackage against compat-lua (RHBZ# 1100242)


diff --git a/lua-filesystem.spec b/lua-filesystem.spec
index 7fb56f0..21537db 100644
--- a/lua-filesystem.spec
+++ b/lua-filesystem.spec
@@ -1,9 +1,14 @@
 %{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))")}
 %global lualibdir %{_libdir}/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-filesystem
 Version:        1.6.2
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        File System Library for the Lua Programming Language
 
 Group:          Development/Libraries
@@ -21,6 +26,10 @@ Requires:       lua(abi) = %{luaver}
 Requires:       lua >= %{luaver}
 %endif
 
+%if 0%{?fedora} >= 20
+BuildRequires:  compat-lua >= %{luacompatver}, compat-lua-devel >= %{luacompatver}
+%endif
+
 %description
 LuaFileSystem is a Lua library developed to complement the set of functions
 related to file systems offered by the standard Lua distribution.
@@ -28,18 +37,45 @@ related to file systems offered by the standard Lua distribution.
 LuaFileSystem offers a portable way to access the underlying directory
 structure and file attributes.
 
+%if 0%{?fedora} >= 20
+%package compat
+Summary:        File System Library for the Lua Programming Language 5.1
+Group:          Development/Libraries
+
+%description compat
+LuaFileSystem is a Lua library developed to complement the set of functions
+related to file systems offered by the standard Lua distribution.
+
+LuaFileSystem offers a portable way to access the underlying directory
+structure and file attributes.
+%endif
+
 %prep
 %setup -q -n luafilesystem-%{version}
 
+%if 0%{?fedora} >= 20
+rm -rf %{lua51dir}
+cp -a . %{lua51dir}
+%endif
 
 %build
 make %{?_smp_mflags} PREFIX=%{_prefix} LUA_LIBDIR=%{lualibdir} CFLAGS="%{optflags} -fPIC"
 
+%if 0%{?fedora} >= 20
+pushd %{lua51dir}
+make %{?_smp_mflags} PREFIX=%{_prefix} LUA_LIBDIR=%{luacompatlibdir} CFLAGS="-I%{_includedir}/lua-%{luacompatver} %{optflags} -fPIC"
+popd
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 make install PREFIX=$RPM_BUILD_ROOT%{_prefix} LUA_LIBDIR=$RPM_BUILD_ROOT%{lualibdir}
 
+%if 0%{?fedora} >= 20
+pushd %{lua51dir}
+make install PREFIX=$RPM_BUILD_ROOT%{_prefix} LUA_LIBDIR=$RPM_BUILD_ROOT%{luacompatlibdir}
+popd
+%endif
 
 %check
 LUA_CPATH=$RPM_BUILD_ROOT%{lualibdir}/\?.so lua tests/test.lua
@@ -57,8 +93,18 @@ rm -rf $RPM_BUILD_ROOT
 %doc README
 %{lualibdir}/*
 
+%if 0%{?fedora} >= 20
+%files compat
+%defattr(-,root,root,-)
+%doc doc/us/*
+%doc README
+%{luacompatlibdir}/*
+%endif
 
 %changelog
+* Thu May 22 2014 Jan Kaluza <jkaluza at redhat.com> - 1.6.2-5
+- build -compat subpackage against compat-lua
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.2-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/lua-filesystem.git/commit/?h=f20&id=5f62e3585f23f3cf6c673431e5b892c97aed6eef


More information about the scm-commits mailing list