lutok/lutok.spec
2022-06-09 02:23:36 +00:00

97 lines
3.3 KiB
RPMSpec

Name: lutok
Version: 0.4
Release: 14
Summary: Provides a clean and safe C++ interface for lua
License: BSD
URL: http://code.google.com/p/lutok/
Source0: http://lutok.googlecode.com/files/lutok-%{version}.tar.gz
Requires: lua >= 5.2
BuildRequires: gcc-c++ libatf-c++-devel >= 0.20 lua-devel >= 5.2 chrpath
%description
Lutok provides a small C ++ wrapper around Lua to simplify the interaction
between C ++ and Lua. These wrappers use a lot of RAII to prevent resource leaks,
expose C ++ friendly data types, report errors through exceptions, and ensure that
the Lua stack is always unaffected when errors are encountered. The library also
provides a small selection of miscellaneous utility functions built on top of the wrapper.
Lutok is committed to providing a secure C ++ interface. The disadvantage is that
it is not suitable for environments with strict performance requirements.
In order to implement an error-safe C ++ wrapper on top of the Lua C binary library,
Lutok adds several layers or abstractions and error checking, which runs counter
to the original spirit of the Lua C API, thereby reducing performance.
%package devel
Summary: Lutok libraries and header files
Requires: %{name} = %{version}-%{release}
Requires: lua-devel >= 5.1
%description devel
Header files and libraries for developing C ++ APIs using Lua.
%package help
Summary: Lutok's API documentation and sample programs.
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description help
HTML documentation describing the Lutok library API, and a series
of sample programs to demonstrate the use of the library.
%package tests
Summary: Lutok runtime tests.
Requires: %{name} = %{version}-%{release} %{name}-devel = %{version}-%{release} libatf-c++ >= 0.20
%description tests
This package provides runtime tests for the Lutok library.
%prep
%autosetup -p1
%autosetup -p1
%build
%configure --docdir=%{_defaultdocdir}/lutok-doc-%{version} --disable-static \
--htmldir=%{_defaultdocdir}/lutok-doc-%{version}/html --without-doxygen
%make_build testsdir=%{_libexecdir}/lutok/tests V=1
%install
%make_install doc_DATA= testsdir=%{_libexecdir}/lutok/tests
chrpath -d %{buildroot}%{_libexecdir}/lutok/tests/state_test
chrpath -d %{buildroot}%{_libexecdir}/lutok/tests/c_gate_test
chrpath -d %{buildroot}%{_libexecdir}/lutok/tests/operations_test
chrpath -d %{buildroot}%{_libexecdir}/lutok/tests/exceptions_test
chrpath -d %{buildroot}%{_libexecdir}/lutok/tests/stack_cleaner_test
chrpath -d %{buildroot}%{_libexecdir}/lutok/tests/debug_test
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/lutok/tests" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%delete_la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc AUTHORS COPYING NEWS README
%{_libdir}/liblutok.so.3*
%config(noreplace) /etc/ld.so.conf.d/*
%files devel
%{_includedir}/lutok
%{_libdir}/liblutok.so
%{_libdir}/pkgconfig/lutok.pc
%files help
%{_defaultdocdir}/lutok-doc-%{version}
%files tests
%{_libexecdir}/lutok/tests
%changelog
* Fri Sep 10 2021 gongzhengtang<gongzhengtang@huawei.com> - 0.4-14
- fix rpath
* Tue Dec 31 2019 yangjian<yangjian79@huawei.com> - 0.4-13
- Package initi