lua-lunit/lua-lunit.spec
wu-leilei 1f6cf66ab5 update package
(cherry picked from commit a115b9b4346951806a77e21a5f79b37df1aa5c84)
2022-08-22 10:14:21 +08:00

51 lines
1.4 KiB
RPMSpec

Name: lua-lunit
Version: 0.8.1
Release: 1
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
BuildRequires: lua >= 5.2 lua-devel >= 5.2
Requires: lua >= 5.2
BuildArch: noarch
%description
Lunit is a unit testing framework for lua, written in lua.
Lunit provides 26 assert functions, and a few misc functions for usage
in an easy unit testing framework.
Lunit comes with a test suite to test itself. The testsuite consists
of approximately 710 assertions.
%prep
%autosetup -n lunit-%{version} -p1
%build
%install
mkdir -p %{buildroot}%{_bindir}
cp -p extra/lunit.sh %{buildroot}%{_bindir}/lunit
mkdir -p %{buildroot}%{lua_pkgdir}
cp -pr lua/* %{buildroot}%{lua_pkgdir}
%check
# for self test, without --dontforce lunit will try to load its launcher which is a shell script
LUA_PATH='%{buildroot}%{lua_pkgdir}/?.lua;;' %{buildroot}%{_bindir}/lunit --dontforce test/selftest.lua
%files
%license LICENSE
%doc ANNOUNCE CHANGES DOCUMENTATION examples README*
%{_bindir}/lunit
%{lua_pkgdir}/*
%changelog
* Thu Feb 10 2022 wulei <wulei80@huawei.com> 0.8.1-1
- Update package
* Thu Sep 09 2020 liuweibo <liuweibo10@huawei.com> - 0.5-16
- Fix Source0 and URL
* Mon Dec 2 2019 lijin Yang <yanglijin@huawei.com> - 0.5-15
- init package