From 52a418bf5aea48bdffc8ed9e06ab845af00e448fd7a818bef80c4a50ac82df20 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 9 Jul 2020 19:50:21 +0000 Subject: [PATCH] Fix with spec-cleaner OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-moonscript?expand=0&rev=12 --- lua-moonscript.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua-moonscript.spec b/lua-moonscript.spec index d3eafd6..d1772e4 100644 --- a/lua-moonscript.spec +++ b/lua-moonscript.spec @@ -38,14 +38,16 @@ BuildRequires: %{flavor}-devel BuildRequires: %{flavor}-loadkit BuildRequires: %{flavor}-lpeg >= 0.10 BuildRequires: %{flavor}-luafilesystem >= 1.5 -# optionally BuildRequires: %%{flavor}-lnotify -BuildArch: noarch Requires: %{flavor} Requires: %{flavor}-alt-getopt Requires: %{flavor}-argparse Requires: %{flavor}-loadkit Requires: %{flavor}-lpeg Requires: %{flavor}-luafilesystem +Requires(post): update-alternatives +Requires(postun): update-alternatives +# optionally BuildRequires: %%{flavor}-lnotify +BuildArch: noarch %if "%{flavor}" == "lua53" Provides: lua-moonscript = %{version} Obsoletes: lua-moonscript < %{version} @@ -61,15 +63,13 @@ BuildRequires: %{flavor}-busted Name: %{flavor}-moonscript %endif %endif -Requires(post): update-alternatives -Requires(postun): update-alternatives %description A programmer friendly language that compiles to Lua. %prep %setup -q -n %{mod_name}-%{upversion} -sed -i 's|^#!/usr/bin/env lua|#!/usr/bin/lua%{lua_version}|' bin/moon{,c} +sed -i 's|^#!%{_bindir}/env lua|#!%{_bindir}/lua%{lua_version}|' bin/moon{,c} %build /bin/true @@ -115,8 +115,8 @@ busted %{_bindir}/moonc %{_bindir}/moonc-%{lua_version} %{lua_noarchdir}/moon* -%ghost %_sysconfdir/alternatives/moon -%ghost %_sysconfdir/alternatives/moonc +%ghost %{_sysconfdir}/alternatives/moon +%ghost %{_sysconfdir}/alternatives/moonc %endif %changelog