From 827a31c0b2b6109d63173bce64ce5e9589784598 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 12 Dec 2016 15:30:41 -0700 Subject: [PATCH] Handle lua and perl not being in buildroots Use %license Cleanup spec --- lua-posix.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lua-posix.spec b/lua-posix.spec index 9cec844..e003478 100644 --- a/lua-posix.spec +++ b/lua-posix.spec @@ -1,4 +1,4 @@ -%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))")} +%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))" || echo 0)} %global lualibdir %{_libdir}/lua/%{luaver} %global luapkgdir %{_datadir}/lua/%{luaver} %global commit 58016bbba40b063e8a98a7e9f14acfcd46f103d4 @@ -6,16 +6,16 @@ Name: lua-posix Version: 33.3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A POSIX library for Lua Group: Development/Libraries License: Public Domain URL: http://luaforge.net/projects/luaposix/ Source0: https://github.com/luaposix/luaposix/archive/release-v%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: lua-devel BuildRequires: ncurses-devel BuildRequires: lua-lunit +BuildRequires: perl %if 0%{?fedora} || 0%{?rhel} >= 7 Requires: lua(abi) = %{luaver} %else @@ -36,7 +36,6 @@ make V=1 %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT @@ -44,12 +43,9 @@ make install DESTDIR=$RPM_BUILD_ROOT make V=1 check -%clean -rm -rf $RPM_BUILD_ROOT - - %files -%doc AUTHORS ChangeLog COPYING NEWS README +%license COPYING +%doc AUTHORS ChangeLog NEWS README %{_defaultdocdir}/luaposix/ %{lualibdir}/* %{luapkgdir}/*.lua @@ -57,6 +53,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Dec 12 2016 Orion Poplawski - 33.3.1-3 +- Handle lua and perl not being in buildroots +- Use %%license +- Cleanup spec + * Thu Feb 04 2016 Fedora Release Engineering - 33.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild