]> git.pld-linux.org Git - packages/lua40.git/blob - lua40.spec
de855676410b05777a8fc425b51b5eec13345dbb
[packages/lua40.git] / lua40.spec
1 #
2 # Conditional build:
3 %bcond_with     default_lua     # build as default lua (symlinks to nil suffix)
4 #
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.
8 Name:           lua40
9 Version:        4.0.1
10 %define refman_ver 4.0
11 Release:        12
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
19 Patch1:         lua-OPT.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}
25 %endif
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
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.
37
38 This version has compiled in support for dynamic libraries in baselib.
39
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.
49
50 Ta wersja ma wkompilowaną obsługę ładowania dynamicznych bibliotek.
51
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.
62
63 %package libs
64 Summary:        Lua 4.0.x shared libraries
65 Summary(pl.UTF-8):      Biblioteki współdzielone Lua 4.0.x
66 Group:          Libraries
67 Conflicts:      lua40 < 4.0.1-7
68
69 %description libs
70 Lua 4.0.x shared libraries.
71
72 %description libs -l pl.UTF-8
73 Biblioteki współdzielone Lua 4.0.x.
74
75 %package devel
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
83
84 %description devel
85 Header files needed to embed Lua in C/C++ programs and docs for the
86 language.
87
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.
91
92 %description devel -l pt_BR.UTF-8
93 Contém os arquivos de cabeçalho para desenvolvimento e extensão da
94 linguagem Lua.
95
96 %package static
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}
105 %endif
106
107 %description static
108 Static Lua libraries.
109
110 %description static -l pl.UTF-8
111 Biblioteki statyczne Lua.
112
113 %description static -l pt_BR.UTF-8
114 Bibliotecas estáticas para desenvolvimento com a linguagem Lua.
115
116 %prep
117 %setup -q -n lua-%{version}
118 cp -f %{SOURCE1} refman.ps.gz
119
120 %patch0 -p1
121 %patch1 -p1
122
123 %build
124 %{__make} -j1 all so sobin \
125         CC="%{__cc}" \
126         OPT="%{rpmcflags}" \
127         EXTRA_DEFS="-fPIC -DPIC -D_GNU_SOURCE"
128
129 %{__rm} test/{lua,luac}
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT{%{_libdir}/lua,%{_datadir}/lua}
134
135 %{__make} install \
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
141
142 # change name from lua to lua4.0
143 for i in $RPM_BUILD_ROOT%{_bindir}/lua* ; do
144         %{__mv} ${i}{,4.0}
145 done
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
150
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
153
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
158 done
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
162 %else
163 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{lua,lualib}.so
164 %endif
165
166 %{__rm} doc/*.1
167
168 %clean
169 rm -rf $RPM_BUILD_ROOT
170
171 %post   libs -p /sbin/ldconfig
172 %postun libs -p /sbin/ldconfig
173
174 %files
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*
185 %endif
186
187 %files libs
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
192
193 %files devel
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
202 %{_includedir}/lua
203 %endif
204
205 %files static
206 %defattr(644,root,root,755)
207 %{_libdir}/liblua4.0.a
208 %{_libdir}/liblualib4.0.a
209 %if %{with default_lua}
210 %{_libdir}/liblua.a
211 %{_libdir}/liblualib.a
212 %endif
This page took 0.067412 seconds and 2 git commands to generate.