%global commit0 895d92313fabaee260121c758c8320d1b21dd741 %global commit1 e496bc6df2e49ea0beebb26f216aca3821a2b28e %global commit2 c9ef6799113e71d89d629b29b266d1eba4105038 %global gittag3 5.1 %global commit4 79c86d1b258b13dc0d1a2a66f28aadc0f6e23944 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global shortcommit1 %(c=%{commit1}; echo ${c:0:7}) %global shortcommit2 %(c=%{commit2}; echo ${c:0:7}) %global shortcommit4 %(c=%{commit4}; echo ${c:0:7}) Name: luadec Version: 0 Release: 0.1%{?dist} Summary: Lua Decompiler for lua 5.1, 5.2, and 5.3 (built for 5.1) License: MIT and GPLv2+ URL: https://github.com/viruscamp/luadec Source0: https://github.com/viruscamp/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz Source1: https://github.com/mlnlover11/LuaAssemblyTools/archive/%{commit1}.tar.gz#/LuaAssemblyTools-%{shortcommit1}.tar.gz Source2: https://github.com/ilua/ilua/archive/%{commit2}.tar.gz#/ilua-%{shortcommit2}.tar.gz Source3: https://github.com/viruscamp/lua5/archive/%{gittag3}/lua5-%{gittag3}.tar.gz Source4: https://github.com/viruscamp/memwatch/archive/%{commit4}.tar.gz#/memwatch-%{shortcommit4}.tar.gz #BuildRequires: #Requires: %description Lua Decompiler for lua 5.1, 5.2, and 5.3 (compile time). Compiled to support Lua 5.1. %prep %autosetup -n %{name}-%{commit0} tar --strip-components 1 -xf %{SOURCE1} -C "LuaAssemblyTools" tar --strip-components 1 -xf %{SOURCE2} -C "ilua" tar --strip-components 1 -xf %{SOURCE3} -C "lua-5.1" tar --strip-components 1 -xf %{SOURCE4} -C "memwatch" %build sed -i -e "s|\r||" ReadMe.md cd lua-5.1 %make_build linux cd ../luadec %make_build LUAVER=5.1 %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} for x in luadec/luadec luadec/luareplace luadec/luaopswap ; do install -m755 "${x}" $RPM_BUILD_ROOT%{_bindir}/$(basename "$x") done %files %doc ReadMe.md %{_bindir}/luadec %{_bindir}/luaopswap %{_bindir}/luareplace %changelog * Wed Mar 29 2017 Conrad Meyer - 0-0.1 - Initial package