]> git.pld-linux.org Git - packages/lua40.git/blob - lua40.spec
- really provide lua-devel only when building as default_lua; release 13
[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:        13
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 %if %{with default_lua}
82 Provides:       lua-devel = %{version}
83 Obsoletes:      lua-devel <= 4.0.1
84 %endif
85
86 %description devel
87 Header files needed to embed Lua in C/C++ programs and docs for the
88 language.
89
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.
93
94 %description devel -l pt_BR.UTF-8
95 Contém os arquivos de cabeçalho para desenvolvimento e extensão da
96 linguagem Lua.
97
98 %package static
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}
107 %endif
108
109 %description static
110 Static Lua libraries.
111
112 %description static -l pl.UTF-8
113 Biblioteki statyczne Lua.
114
115 %description static -l pt_BR.UTF-8
116 Bibliotecas estáticas para desenvolvimento com a linguagem Lua.
117
118 %prep
119 %setup -q -n lua-%{version}
120 cp -f %{SOURCE1} refman.ps.gz
121
122 %patch0 -p1
123 %patch1 -p1
124
125 %build
126 %{__make} -j1 all so sobin \
127         CC="%{__cc}" \
128         OPT="%{rpmcflags}" \
129         EXTRA_DEFS="-fPIC -DPIC -D_GNU_SOURCE"
130
131 %{__rm} test/{lua,luac}
132
133 %install
134 rm -rf $RPM_BUILD_ROOT
135 install -d $RPM_BUILD_ROOT{%{_libdir}/lua,%{_datadir}/lua}
136
137 %{__make} install \
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
143
144 # change name from lua to lua4.0
145 for i in $RPM_BUILD_ROOT%{_bindir}/lua* ; do
146         %{__mv} ${i}{,4.0}
147 done
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
152
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
155
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
160 done
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
164 %else
165 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{lua,lualib}.so
166 %endif
167
168 %{__rm} doc/*.1
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %post   libs -p /sbin/ldconfig
174 %postun libs -p /sbin/ldconfig
175
176 %files
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*
187 %endif
188
189 %files libs
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
194
195 %files devel
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
204 %{_includedir}/lua
205 %endif
206
207 %files static
208 %defattr(644,root,root,755)
209 %{_libdir}/liblua4.0.a
210 %{_libdir}/liblualib4.0.a
211 %if %{with default_lua}
212 %{_libdir}/liblua.a
213 %{_libdir}/liblualib.a
214 %endif
This page took 0.158436 seconds and 3 git commands to generate.