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 %if %{with default_lua}
82 Provides: lua-devel = %{version}
83 Obsoletes: lua-devel <= 4.0.1
87 Header files needed to embed Lua in C/C++ programs and docs for the
90 %description devel -l pl.UTF-8
91 Pliki nagłówkowe potrzebne do włączenia Lua do programów w C/C++ oraz
92 dokumentacja samego języka.
94 %description devel -l pt_BR.UTF-8
95 Contém os arquivos de cabeçalho para desenvolvimento e extensão da
99 Summary: Static Lua libraries
100 Summary(pl.UTF-8): Biblioteki statyczne Lua
101 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com a linguagem Lua
102 Group: Development/Languages
103 Requires: %{name}-devel = %{version}-%{release}
104 %if %{with default_lua}
105 Provides: lua-static = %{version}
106 Obsoletes: lua-static < %{version}
110 Static Lua libraries.
112 %description static -l pl.UTF-8
113 Biblioteki statyczne Lua.
115 %description static -l pt_BR.UTF-8
116 Bibliotecas estáticas para desenvolvimento com a linguagem Lua.
119 %setup -q -n lua-%{version}
120 cp -f %{SOURCE1} refman.ps.gz
126 %{__make} -j1 all so sobin \
129 EXTRA_DEFS="-fPIC -DPIC -D_GNU_SOURCE"
131 %{__rm} test/{lua,luac}
134 rm -rf $RPM_BUILD_ROOT
135 install -d $RPM_BUILD_ROOT{%{_libdir}/lua,%{_datadir}/lua}
138 INSTALL_ROOT=$RPM_BUILD_ROOT%{_prefix} \
139 INSTALL_BIN=$RPM_BUILD_ROOT%{_bindir} \
140 INSTALL_INC=$RPM_BUILD_ROOT%{_includedir}/lua4.0 \
141 INSTALL_LIB=$RPM_BUILD_ROOT%{_libdir} \
142 INSTALL_MAN=$RPM_BUILD_ROOT%{_mandir}/man1
144 # change name from lua to lua4.0
145 for i in $RPM_BUILD_ROOT%{_bindir}/lua* ; do
148 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/lua{,4.0}.1
149 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/luac{,4.0}.1
150 %{__mv} $RPM_BUILD_ROOT%{_libdir}/liblua{,4.0}.a
151 %{__mv} $RPM_BUILD_ROOT%{_libdir}/liblualib{,4.0}.a
153 ln -sf liblua.so.4.0 $RPM_BUILD_ROOT%{_libdir}/liblua4.0.so
154 ln -sf liblualib.so.4.0 $RPM_BUILD_ROOT%{_libdir}/liblualib4.0.so
156 %if %{with default_lua}
157 for f in lua luac ; do
158 ln -sf ${f}4.0 $RPM_BUILD_ROOT%{_bindir}/${f}
159 echo ".so ${f}4.0.1" >$RPM_BUILD_ROOT%{_mandir}/man1/${f}.1
161 ln -sf liblua4.0.a $RPM_BUILD_ROOT%{_libdir}/liblua.a
162 ln -sf liblualib4.0.a $RPM_BUILD_ROOT%{_libdir}/liblualib.a
163 ln -sf lua4.0 $RPM_BUILD_ROOT%{_includedir}/lua
165 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{lua,lualib}.so
171 rm -rf $RPM_BUILD_ROOT
173 %post libs -p /sbin/ldconfig
174 %postun libs -p /sbin/ldconfig
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_bindir}/lua4.0
179 %attr(755,root,root) %{_bindir}/luac4.0
180 %{_mandir}/man1/lua4.0.1*
181 %{_mandir}/man1/luac4.0.1*
182 %if %{with default_lua}
183 %attr(755,root,root) %{_bindir}/lua
184 %attr(755,root,root) %{_bindir}/luac
185 %{_mandir}/man1/lua.1*
186 %{_mandir}/man1/luac.1*
190 %defattr(644,root,root,755)
191 %doc COPYRIGHT HISTORY README
192 %attr(755,root,root) %{_libdir}/liblua.so.4.0
193 %attr(755,root,root) %{_libdir}/liblualib.so.4.0
196 %defattr(644,root,root,755)
197 %doc refman.ps.gz doc test
198 %attr(755,root,root) %{_libdir}/liblua4.0.so
199 %attr(755,root,root) %{_libdir}/liblualib4.0.so
200 %{_includedir}/lua4.0
201 %if %{with default_lua}
202 %attr(755,root,root) %{_libdir}/liblua.so
203 %attr(755,root,root) %{_libdir}/liblualib.so
208 %defattr(644,root,root,755)
209 %{_libdir}/liblua4.0.a
210 %{_libdir}/liblualib4.0.a
211 %if %{with default_lua}
213 %{_libdir}/liblualib.a