3 %bcond_with default_lua # build as default lua (symlinks to nil suffix)
5 Summary: A simple lightweight powerful embeddable programming language
6 Summary(pl.UTF-8): Prosty, lekki ale potężny, osadzalny język programowania
7 Summary(pt_BR.UTF-8): Lua é uma linguagem de programação poderosa e leve, projetada para estender aplicações.
10 %define refman_ver 4.0
12 License: BSD-like (see docs)
13 Group: Development/Languages
14 Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz
15 # Source0-md5: a31d963dbdf727f9b34eee1e0d29132c
16 Source1: http://www.lua.org/ftp/refman-%{refman_ver}.ps.gz
17 # Source1-md5: 5454698095c45917ce80c934066cb76c
18 Patch0: lua-link.patch
20 URL: http://www.lua.org/
21 Requires: %{name}-libs = %{version}-%{release}
22 %if %{with default_lua}
23 Provides: lua = %{version}
24 Obsoletes: lua < %{version}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Lua is a powerful, light-weight programming language designed for
30 extending applications. It is also frequently used as a
31 general-purpose, stand-alone language. It combines simple procedural
32 syntax (similar to Pascal) with powerful data description constructs
33 based on associative arrays and extensible semantics. Lua is
34 dynamically typed, interpreted from bytecodes, and has automatic
35 memory management with garbage collection, making it ideal for
36 configuration, scripting, and rapid prototyping.
38 This version has compiled in support for dynamic libraries in baselib.
40 %description -l pl.UTF-8
41 Lua to język programowania o dużych możliwościach ale lekki,
42 przeznaczony do rozszerzania aplikacji. Jest też często używany jako
43 samodzielny język ogólnego przeznaczenia. Łączy prostą proceduralną
44 składnię (podobną do Pascala) z potężnymi konstrukcjami opisu danych
45 bazującymi na tablicach asocjacyjnych i rozszerzalnej składni. Lua ma
46 dynamiczny system typów, interpretowany z bytecodu i automatyczne
47 zarządzanie pamięcią z odśmiecaczem, co czyni go idealnym do
48 konfiguracji, skryptów i szybkich prototypów.
50 Ta wersja ma wkompilowaną obsługę ładowania dynamicznych bibliotek.
52 %description -l pt_BR.UTF-8
53 Lua é uma linguagem de programação poderosa e leve, projetada para
54 estender aplicações. Lua também é freqüentemente usada como uma
55 linguagem de propósito geral.
56 Lua combina programação procedural com poderosas construções para
57 descrição de dados, baseadas em tabelas associativas e semântica
58 extensível. Lua é tipada dinamicamente, interpretada a partir de
59 bytecodes, e tem gerenciamento automático de memória com coleta de
60 lixo. Essas características fazem de Lua uma linguagem ideal para
61 configuração, automação (scripting) e prototipagem rápida.
64 Summary: Lua 4.0.x shared libraries
65 Summary(pl.UTF-8): Biblioteki współdzielone Lua 4.0.x
67 Conflicts: lua40 < 4.0.1-7
70 Lua 4.0.x shared libraries.
72 %description libs -l pl.UTF-8
73 Biblioteki współdzielone Lua 4.0.x.
76 Summary: Header files for Lua
77 Summary(pl.UTF-8): Pliki nagłówkowe dla Lua
78 Summary(pt_BR.UTF-8): Arquivos de cabeçalho para a linguagem Lua
79 Group: Development/Languages
80 Requires: %{name}-libs = %{version}-%{release}
81 Provides: lua-devel = %{version}
82 Obsoletes: lua-devel <= 4.0.1
85 Header files needed to embed Lua in C/C++ programs and docs for the
88 %description devel -l pl.UTF-8
89 Pliki nagłówkowe potrzebne do włączenia Lua do programów w C/C++ oraz
90 dokumentacja samego języka.
92 %description devel -l pt_BR.UTF-8
93 Contém os arquivos de cabeçalho para desenvolvimento e extensão da
97 Summary: Static Lua libraries
98 Summary(pl.UTF-8): Biblioteki statyczne Lua
99 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com a linguagem Lua
100 Group: Development/Languages
101 Requires: %{name}-devel = %{version}-%{release}
102 %if %{with default_lua}
103 Provides: lua-static = %{version}
104 Obsoletes: lua-static < %{version}
108 Static Lua libraries.
110 %description static -l pl.UTF-8
111 Biblioteki statyczne Lua.
113 %description static -l pt_BR.UTF-8
114 Bibliotecas estáticas para desenvolvimento com a linguagem Lua.
117 %setup -q -n lua-%{version}
118 cp -f %{SOURCE1} refman.ps.gz
124 %{__make} -j1 all so sobin \
127 EXTRA_DEFS="-fPIC -DPIC -D_GNU_SOURCE"
129 %{__rm} test/{lua,luac}
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT{%{_libdir}/lua,%{_datadir}/lua}
136 INSTALL_ROOT=$RPM_BUILD_ROOT%{_prefix} \
137 INSTALL_BIN=$RPM_BUILD_ROOT%{_bindir} \
138 INSTALL_INC=$RPM_BUILD_ROOT%{_includedir}/lua4.0 \
139 INSTALL_LIB=$RPM_BUILD_ROOT%{_libdir} \
140 INSTALL_MAN=$RPM_BUILD_ROOT%{_mandir}/man1
142 # change name from lua to lua4.0
143 for i in $RPM_BUILD_ROOT%{_bindir}/lua* ; do
146 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/lua{,4.0}.1
147 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/luac{,4.0}.1
148 %{__mv} $RPM_BUILD_ROOT%{_libdir}/liblua{,4.0}.a
149 %{__mv} $RPM_BUILD_ROOT%{_libdir}/liblualib{,4.0}.a
151 ln -sf liblua.so.4.0 $RPM_BUILD_ROOT%{_libdir}/liblua4.0.so
152 ln -sf liblualib.so.4.0 $RPM_BUILD_ROOT%{_libdir}/liblualib4.0.so
154 %if %{with default_lua}
155 for f in lua luac ; do
156 ln -sf ${f}4.0 $RPM_BUILD_ROOT%{_bindir}/${f}
157 echo ".so ${f}4.0.1" >$RPM_BUILD_ROOT%{_mandir}/man1/${f}.1
159 ln -sf liblua4.0.a $RPM_BUILD_ROOT%{_libdir}/liblua.a
160 ln -sf liblualib4.0.a $RPM_BUILD_ROOT%{_libdir}/liblualib.a
161 ln -sf lua4.0 $RPM_BUILD_ROOT%{_includedir}/lua
163 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{lua,lualib}.so
169 rm -rf $RPM_BUILD_ROOT
171 %post libs -p /sbin/ldconfig
172 %postun libs -p /sbin/ldconfig
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_bindir}/lua4.0
177 %attr(755,root,root) %{_bindir}/luac4.0
178 %{_mandir}/man1/lua4.0.1*
179 %{_mandir}/man1/luac4.0.1*
180 %if %{with default_lua}
181 %attr(755,root,root) %{_bindir}/lua
182 %attr(755,root,root) %{_bindir}/luac
183 %{_mandir}/man1/lua.1*
184 %{_mandir}/man1/luac.1*
188 %defattr(644,root,root,755)
189 %doc COPYRIGHT HISTORY README
190 %attr(755,root,root) %{_libdir}/liblua.so.4.0
191 %attr(755,root,root) %{_libdir}/liblualib.so.4.0
194 %defattr(644,root,root,755)
195 %doc refman.ps.gz doc test
196 %attr(755,root,root) %{_libdir}/liblua4.0.so
197 %attr(755,root,root) %{_libdir}/liblualib4.0.so
198 %{_includedir}/lua4.0
199 %if %{with default_lua}
200 %attr(755,root,root) %{_libdir}/liblua.so
201 %attr(755,root,root) %{_libdir}/liblualib.so
206 %defattr(644,root,root,755)
207 %{_libdir}/liblua4.0.a
208 %{_libdir}/liblualib4.0.a
209 %if %{with default_lua}
211 %{_libdir}/liblualib.a