]>
Commit | Line | Data |
---|---|---|
bcb25c3d AG |
1 | Summary: Lightweight C++ API library for Lua |
2 | Name: lutok | |
3 | Version: 0.4 | |
4 | Release: 1 | |
5 | License: BSD | |
6 | Group: Development/Libraries | |
7 | Source0: https://github.com/jmmv/lutok/releases/download/%{name}-%{version}/lutok-%{version}.tar.gz | |
8 | # Source0-md5: 5da43895d9209f8c19d79433dd046b3f | |
9 | URL: https://github.com/jmmv/lutok | |
10 | BuildRequires: autoconf | |
11 | BuildRequires: automake | |
12 | BuildRequires: libatf-c++-devel >= 0.20 | |
13 | BuildRequires: libtool | |
14 | BuildRequires: lua53-devel | |
34c079d8 | 15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
bcb25c3d AG |
16 | |
17 | %define _testsdir %{_libexecdir}/lutok/tests | |
18 | ||
19 | %description | |
20 | Lutok provides thin C++ wrappers around the Lua C API to ease the | |
21 | interaction between C++ and Lua. These wrappers make intensive use of | |
22 | RAII to prevent resource leakage, expose C++-friendly data types, | |
23 | report errors by means of exceptions and ensure that the Lua stack is | |
24 | always left untouched in the face of errors. The library also provides | |
25 | a small subset of miscellaneous utility functions built on top of the | |
26 | wrappers. | |
27 | ||
28 | Lutok focuses on providing a clean and safe C++ interface; the | |
29 | drawback is that it is not suitable for performance-critical | |
30 | environments. In order to implement error-safe C++ wrappers on top of | |
31 | a Lua C binary library, Lutok adds several layers or abstraction and | |
32 | error checking that go against the original spirit of the Lua C API | |
33 | and thus degrade performance. | |
34 | ||
35 | %package -n liblutok | |
36 | Summary: Lutok library | |
37 | Group: Libraries | |
38 | ||
39 | %description -n liblutok | |
40 | Lutok provides thin C++ wrappers around the Lua C API to ease the | |
41 | interaction between C++ and Lua. These wrappers make intensive use of | |
42 | RAII to prevent resource leakage, expose C++-friendly data types, | |
43 | report errors by means of exceptions and ensure that the Lua stack is | |
44 | always left untouched in the face of errors. The library also provides | |
45 | a small subset of miscellaneous utility functions built on top of the | |
46 | wrappers. | |
47 | ||
48 | Lutok focuses on providing a clean and safe C++ interface; the | |
49 | drawback is that it is not suitable for performance-critical | |
50 | environments. In order to implement error-safe C++ wrappers on top of | |
51 | a Lua C binary library, Lutok adds several layers or abstraction and | |
52 | error checking that go against the original spirit of the Lua C API | |
53 | and thus degrade performance. | |
54 | ||
55 | %package -n liblutok-devel | |
56 | Summary: Libraries and header files for Lutok development | |
57 | Requires: liblutok = %{version}-%{release} | |
58 | Requires: lua-devel >= 5.1 | |
59 | ||
60 | %description -n liblutok-devel | |
61 | Provides the libraries and header files to develop applications that | |
62 | use the Lutok C++ API to Lua. | |
63 | ||
64 | %package -n liblutok-static | |
65 | Summary: Static liblutok library | |
66 | Group: Development/Libraries | |
67 | Requires: liblutok-devel = %{version}-%{release} | |
68 | ||
69 | %description -n liblutok-static | |
70 | Static liblutok library. | |
71 | ||
72 | %prep | |
73 | %setup -q | |
74 | ||
75 | %build | |
76 | %{__libtoolize} | |
77 | %{__aclocal} | |
78 | %{__autoconf} | |
79 | %{__autoheader} | |
80 | %{__automake} | |
81 | %configure \ | |
82 | --with-atf=yes \ | |
83 | --with-doxygen \ | |
84 | --docdir=%{_docdir}/lutok-doc-%{version} \ | |
85 | --htmldir=%{_docdir}/lutok-doc-%{version}/html | |
86 | ||
87 | %{__make} \ | |
88 | testsdir=%{_testsdir} | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | %{__make} install \ | |
93 | DESTDIR=$RPM_BUILD_ROOT \ | |
94 | doc_DATA= \ | |
95 | testsdir=%{_testsdir} | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %post -p /sbin/ldconfig | |
101 | %postun -p /sbin/ldconfig | |
102 | ||
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc AUTHORS COPYING NEWS README | |
34c079d8 | 106 | %doc %{_docdir}/lutok-doc-%{version} |
bcb25c3d AG |
107 | %dir %{_libexecdir}/%{name} |
108 | %{_testsdir} | |
109 | ||
110 | %files -n liblutok | |
111 | %defattr(644,root,root,755) | |
112 | %attr(755,root,root) %{_libdir}/liblutok.so.3 | |
34c079d8 | 113 | %attr(755,root,root) %ghost %{_libdir}/liblutok.so.*.*.* |
bcb25c3d AG |
114 | |
115 | %files -n liblutok-devel | |
116 | %defattr(644,root,root,755) | |
117 | %{_includedir}/lutok | |
118 | %attr(755,root,root) %{_libdir}/liblutok.so | |
119 | %{_libdir}/liblutok.la | |
120 | %{_pkgconfigdir}/lutok.pc | |
121 | ||
122 | %files -n liblutok-static | |
123 | %defattr(644,root,root,755) | |
124 | %{_libdir}/liblutok.a |