10
0
forked from pool/lua-cassowary

Accepting request 1000942 from home:gmbr3:Lua

- Use new luarocks macros
- Keep luarocks data in the correct place

OBS-URL: https://build.opensuse.org/request/show/1000942
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-cassowary?expand=0&rev=4
This commit is contained in:
2022-09-02 15:45:39 +00:00
committed by Git OBS Bridge
parent 24351d77ae
commit b10ca740a1
2 changed files with 12 additions and 15 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 2 15:15:21 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Use new luarocks macros
- Keep luarocks data in the correct place
-------------------------------------------------------------------
Sun Aug 21 03:32:01 UTC 2022 - Gordon Leung <pirateclip@protonmail.com>

View File

@@ -52,21 +52,11 @@ and find the values of unknown variables which satisfy those inequalities.
%autosetup -n %{mod_name}.lua-%{version}
%build
%luarocks_build "rockspecs/%{mod_name}-%{rock_version}.rockspec"
%install
luarocks --lua-version="%{lua_version}" --tree="%{buildroot}/usr/" \
make --deps-mode=none --no-manifest "rockspecs/%{mod_name}-%{rock_version}.rockspec"
%luarocks_install *.rock
# Seperate out documentation and licence
mv %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/doc/LICENSE .
mkdir -p docs
mv %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/doc/* docs/
rmdir %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/doc
# Move pure lua modules to noarchdir
mkdir -p %{buildroot}%{lua_noarchdir}/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}
mv %{buildroot}/usr/lib/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}/* \
%{buildroot}%{lua_noarchdir}/luarocks/rocks-%{lua_version}/%{mod_name}/%{rock_version}
%if %{with test}
%check
@@ -74,8 +64,9 @@ busted
%endif
%files
%license LICENSE
%doc docs/*
%{lua_noarchdir}
%{lua_noarchdir}/%{mod_name}
%{luarocks_treedir}/%{mod_name}
%docdir %{luarocks_treedir}/%{mod_name}/%{rock_version}/doc
%license %{luarocks_treedir}/%{mod_name}/%{rock_version}/doc/LICENSE
%changelog