]>
Commit | Line | Data |
---|---|---|
bcb25c3d | 1 | Summary: Lightweight C++ API library for Lua |
f57cf942 | 2 | Summary(pl.UTF-8): Lekka biblioteka API C++ dla Lua |
bcb25c3d AG |
3 | Name: lutok |
4 | Version: 0.4 | |
04e2a4e4 | 5 | Release: 4 |
bcb25c3d | 6 | License: BSD |
f57cf942 JB |
7 | Group: Libraries |
8 | #Source0Download: https://github.com/jmmv/lutok/releases | |
bcb25c3d AG |
9 | Source0: https://github.com/jmmv/lutok/releases/download/%{name}-%{version}/lutok-%{version}.tar.gz |
10 | # Source0-md5: 5da43895d9209f8c19d79433dd046b3f | |
04e2a4e4 | 11 | Patch0: %{name}-default-lua.patch |
bcb25c3d | 12 | URL: https://github.com/jmmv/lutok |
04e2a4e4 JB |
13 | BuildRequires: autoconf >= 2.65 |
14 | BuildRequires: automake >= 1:1.9 | |
bcb25c3d | 15 | BuildRequires: libatf-c++-devel >= 0.20 |
4c741b96 | 16 | BuildRequires: libatf-sh-devel >= 0.20 |
04e2a4e4 | 17 | BuildRequires: libtool >= 2:2 |
5221c0b3 | 18 | BuildRequires: lua-devel >= 5.1 |
34c079d8 | 19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
bcb25c3d | 20 | |
f57cf942 | 21 | %define pkgtestsdir %{_libexecdir}/lutok/tests |
bcb25c3d AG |
22 | |
23 | %description | |
24 | Lutok provides thin C++ wrappers around the Lua C API to ease the | |
25 | interaction between C++ and Lua. These wrappers make intensive use of | |
26 | RAII to prevent resource leakage, expose C++-friendly data types, | |
27 | report errors by means of exceptions and ensure that the Lua stack is | |
28 | always left untouched in the face of errors. The library also provides | |
29 | a small subset of miscellaneous utility functions built on top of the | |
30 | wrappers. | |
31 | ||
32 | Lutok focuses on providing a clean and safe C++ interface; the | |
33 | drawback is that it is not suitable for performance-critical | |
34 | environments. In order to implement error-safe C++ wrappers on top of | |
35 | a Lua C binary library, Lutok adds several layers or abstraction and | |
36 | error checking that go against the original spirit of the Lua C API | |
37 | and thus degrade performance. | |
38 | ||
f57cf942 JB |
39 | %description -l pl.UTF-8 |
40 | Lutok udostępnia cienką warstwę obudowującą API C języka Lua, aby | |
41 | ułatwić współpracę między C++ a Lua. Interfejsy te intensywnie | |
42 | wykorzystują RAII (aby zapobiec wyciekowi zasobów), udostępniają | |
43 | typy danych przyjazne dla C++, zgłaszają błędy poprzez wyjątki i | |
44 | zapewniają, że stos Lua jest nienaruszony w przypadku błędów. | |
45 | Biblioteka udostępnia także mały podzbiór różnych funkcji | |
46 | narzędziowych, zbudowanych w oparciu o te interfejsy. | |
47 | ||
48 | Lutok skupia się na zapewnieniu czystego i bezpiecznego interfejsu | |
49 | C++; wadą jest to, że nie nadaje się w środowisku, gdzie krytyczna | |
50 | jest wydajność. Aby zaimplementować bezpieczne pod kątem błędów | |
51 | interfejsy C++ w oparciu o bibliotekę binarną C Lua, Lutok dodaje | |
52 | kilka warstw lub abstrakcji oraz sprawdzania błędów, niezgodnych z | |
53 | duchem API C Lua i zmniejszających wydajność. | |
54 | ||
bcb25c3d AG |
55 | %package -n liblutok |
56 | Summary: Lutok library | |
f57cf942 | 57 | Summary(pl.UTF-8): Biblioteka Lutok |
bcb25c3d AG |
58 | Group: Libraries |
59 | ||
60 | %description -n liblutok | |
61 | Lutok provides thin C++ wrappers around the Lua C API to ease the | |
62 | interaction between C++ and Lua. These wrappers make intensive use of | |
63 | RAII to prevent resource leakage, expose C++-friendly data types, | |
64 | report errors by means of exceptions and ensure that the Lua stack is | |
65 | always left untouched in the face of errors. The library also provides | |
66 | a small subset of miscellaneous utility functions built on top of the | |
67 | wrappers. | |
68 | ||
69 | Lutok focuses on providing a clean and safe C++ interface; the | |
70 | drawback is that it is not suitable for performance-critical | |
71 | environments. In order to implement error-safe C++ wrappers on top of | |
72 | a Lua C binary library, Lutok adds several layers or abstraction and | |
73 | error checking that go against the original spirit of the Lua C API | |
74 | and thus degrade performance. | |
75 | ||
f57cf942 JB |
76 | %description -n liblutok -l pl.UTF-8 |
77 | Lutok udostępnia cienką warstwę obudowującą API C języka Lua, aby | |
78 | ułatwić współpracę między C++ a Lua. Interfejsy te intensywnie | |
79 | wykorzystują RAII (aby zapobiec wyciekowi zasobów), udostępniają | |
80 | typy danych przyjazne dla C++, zgłaszają błędy poprzez wyjątki i | |
81 | zapewniają, że stos Lua jest nienaruszony w przypadku błędów. | |
82 | Biblioteka udostępnia także mały podzbiór różnych funkcji | |
83 | narzędziowych, zbudowanych w oparciu o te interfejsy. | |
84 | ||
85 | Lutok skupia się na zapewnieniu czystego i bezpiecznego interfejsu | |
86 | C++; wadą jest to, że nie nadaje się w środowisku, gdzie krytyczna | |
87 | jest wydajność. Aby zaimplementować bezpieczne pod kątem błędów | |
88 | interfejsy C++ w oparciu o bibliotekę binarną C Lua, Lutok dodaje | |
89 | kilka warstw lub abstrakcji oraz sprawdzania błędów, niezgodnych z | |
90 | duchem API C Lua i zmniejszających wydajność. | |
91 | ||
bcb25c3d | 92 | %package -n liblutok-devel |
f57cf942 JB |
93 | Summary: Header files for Lutok development |
94 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Lutok | |
bcb25c3d AG |
95 | Requires: liblutok = %{version}-%{release} |
96 | Requires: lua-devel >= 5.1 | |
97 | ||
98 | %description -n liblutok-devel | |
f57cf942 JB |
99 | The header files to develop applications that use the Lutok C++ API to |
100 | Lua. | |
101 | ||
102 | %description -n liblutok-devel -l pl.UTF-8 | |
103 | Pliki nagłówkowe do tworzenia aplikacji wykorzystująch API C++ | |
104 | biblioteki Lutok do Lua. | |
bcb25c3d AG |
105 | |
106 | %package -n liblutok-static | |
107 | Summary: Static liblutok library | |
f57cf942 | 108 | Summary(pl.UTF-8): Statyczna biblioteka liblutok |
bcb25c3d AG |
109 | Group: Development/Libraries |
110 | Requires: liblutok-devel = %{version}-%{release} | |
111 | ||
112 | %description -n liblutok-static | |
113 | Static liblutok library. | |
114 | ||
f57cf942 JB |
115 | %description -n liblutok-static -l pl.UTF-8 |
116 | Statyczna biblioteka liblutok. | |
117 | ||
bcb25c3d AG |
118 | %prep |
119 | %setup -q | |
04e2a4e4 | 120 | %patch0 -p1 |
bcb25c3d AG |
121 | |
122 | %build | |
123 | %{__libtoolize} | |
523724f1 | 124 | %{__aclocal} -I m4 |
bcb25c3d AG |
125 | %{__autoconf} |
126 | %{__autoheader} | |
127 | %{__automake} | |
128 | %configure \ | |
bcb25c3d | 129 | --docdir=%{_docdir}/lutok-doc-%{version} \ |
f57cf942 JB |
130 | --htmldir=%{_docdir}/lutok-doc-%{version}/html \ |
131 | --with-atf \ | |
132 | --with-doxygen | |
bcb25c3d AG |
133 | |
134 | %{__make} \ | |
f57cf942 | 135 | testsdir=%{pkgtestsdir} |
bcb25c3d AG |
136 | |
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
f57cf942 | 139 | |
bcb25c3d AG |
140 | %{__make} install \ |
141 | DESTDIR=$RPM_BUILD_ROOT \ | |
142 | doc_DATA= \ | |
f57cf942 JB |
143 | testsdir=%{pkgtestsdir} |
144 | ||
145 | # obsoleted by pkg-config | |
146 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblutok.la | |
bcb25c3d AG |
147 | |
148 | %clean | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
456dca95 JB |
151 | %post -n liblutok -p /sbin/ldconfig |
152 | %postun -n liblutok -p /sbin/ldconfig | |
bcb25c3d AG |
153 | |
154 | %files | |
155 | %defattr(644,root,root,755) | |
156 | %doc AUTHORS COPYING NEWS README | |
34c079d8 | 157 | %doc %{_docdir}/lutok-doc-%{version} |
bcb25c3d | 158 | %dir %{_libexecdir}/%{name} |
f57cf942 | 159 | %{pkgtestsdir} |
bcb25c3d AG |
160 | |
161 | %files -n liblutok | |
162 | %defattr(644,root,root,755) | |
f57cf942 JB |
163 | %attr(755,root,root) %{_libdir}/liblutok.so.*.*.* |
164 | %attr(755,root,root) %ghost %{_libdir}/liblutok.so.3 | |
bcb25c3d AG |
165 | |
166 | %files -n liblutok-devel | |
167 | %defattr(644,root,root,755) | |
bcb25c3d | 168 | %attr(755,root,root) %{_libdir}/liblutok.so |
f57cf942 | 169 | %{_includedir}/lutok |
bcb25c3d AG |
170 | %{_pkgconfigdir}/lutok.pc |
171 | ||
172 | %files -n liblutok-static | |
173 | %defattr(644,root,root,755) | |
174 | %{_libdir}/liblutok.a |