From 36a5bb491cd11d1978714884b8597c9bd3f3a342 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Tue, 25 Aug 2020 20:10:04 -0700 Subject: + lua-lunitx (replacing lua-lunit) Signed-off-by: Michel Alexandre Salim --- lua/lua-lunitx.spec | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lua/lua-lunitx.spec (limited to 'lua') diff --git a/lua/lua-lunitx.spec b/lua/lua-lunitx.spec new file mode 100644 index 0000000..c6caf25 --- /dev/null +++ b/lua/lua-lunitx.spec @@ -0,0 +1,59 @@ +%define luaver 5.4 +%define luapkgdir %{_datadir}/lua/%{luaver} + +Name: lua-lunitx +Version: 0.8.1 +Release: 1%{?dist} +Summary: Unit testing framework for Lua + +License: MIT +URL: https://github.com/dcurrie/lunit/ +Source0: https://github.com/dcurrie/lunit/archive/%{version}.tar.gz#/lunitx-%{version}.tar.gz + +# for running tests +BuildRequires: lua >= %{luaver} + +Requires: lua(abi) = %{luaver} + +BuildArch: noarch + +Provides: lua-lunit = %{version}-%{release} +Obsoletes: lua-lunit <= 0.5-18 + +%description +This is lunitx Version 0.8.1, an extended version of Lunit +for Lua 5.2, 5.3, and 5.4. + +Lunit is a unit testing framework for lua. + + +%prep +%autosetup -n lunit-%{version} + + +%build + + +%install +mkdir -p %{buildroot}%{_bindir} +cp -p extra/lunit.sh %{buildroot}%{_bindir}/lunit + +mkdir -p %{buildroot}%{luapkgdir} +cp -pr lua/* %{buildroot}%{luapkgdir} + + +%check +# for self test, without --dontforce lunit will try to load its launcher which is a shell script +LUA_PATH='%{buildroot}%{luapkgdir}/?.lua;;' %{buildroot}%{_bindir}/lunit --dontforce test/selftest.lua + + +%files +%license LICENSE +%doc ANNOUNCE CHANGES DOCUMENTATION examples README* +%{_bindir}/lunit +%{luapkgdir}/* + + +%changelog +* Tue Aug 25 2020 Michel Alexandre Salim - 0.8.1-1 +- Initial Fedora package (replacing lua-lunit) -- cgit