2 Summary: A simple lightweight powerful embeddable programming language - Mingw32 cross version
3 Summary(pl.UTF-8): Prosty, lekki ale potężny, osadzalny język programowania - wersja skrośna dla Mingw32
4 Name: crossmingw32-%{realname}
8 Group: Development/Languages
9 Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz
10 # Source0-md5: dea74646b7e5c621fef7174df83c34b1
11 URL: http://www.lua.org/
12 Requires: crossmingw32-runtime
13 BuildRequires: autoconf
14 BuildRequires: automake
15 BuildRequires: crossmingw32-gcc
16 BuildRequires: crossmingw32-w32api
17 BuildRequires: libtool
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define no_install_post_strip 1
22 %define target i386-mingw32
23 %define target_platform i386-pc-mingw32
25 %define _sysprefix /usr
26 %define _prefix %{_sysprefix}/%{target}
27 %define _libdir %{_prefix}/lib
28 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
29 %define _dlldir /usr/share/wine/windows/system
30 %define __cc %{target}-gcc
31 %define __cxx %{target}-g++
32 %define __pkgconfig_provides %{nil}
33 %define __pkgconfig_requires %{nil}
35 %define _ssp_cflags %{nil}
37 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
40 # -z options are invalid for mingw linker, most of -f options are Linux-specific
41 %define filterout_ld -Wl,-z,.*
42 %define filterout_c -f[-a-z0-9=]*
45 Lua is a powerful, light-weight programming language designed for
46 extending applications. It is also frequently used as a
47 general-purpose, stand-alone language. It combines simple procedural
48 syntax (similar to Pascal) with powerful data description constructs
49 based on associative arrays and extensible semantics. Lua is
50 dynamically typed, interpreted from bytecodes, and has automatic
51 memory management with garbage collection, making it ideal for
52 configuration, scripting, and rapid prototyping.
54 %description -l pl.UTF-8
55 Lua to język programowania o dużych możliwościach ale lekki,
56 przeznaczony do rozszerzania aplikacji. Jest też często używany jako
57 samodzielny język ogólnego przeznaczenia. Łączy prostą proceduralną
58 składnię (podobną do Pascala) z potężnymi konstrukcjami opisu danych
59 bazującymi na tablicach asocjacyjnych i rozszerzalnej składni. Lua ma
60 dynamiczny system typów, interpretowany z bytecodu i automatyczne
61 zarządzanie pamięcią z odśmiecaczem, co czyni go idealnym do
62 konfiguracji, skryptów i szybkich prototypów.
64 %description -l pt_BR.UTF-8
65 Lua é uma linguagem de programação poderosa e leve, projetada para
66 estender aplicações. Lua também é freqüentemente usada como uma
67 linguagem de propósito geral. Lua combina programação procedural com
68 poderosas construções para descrição de dados, baseadas em tabelas
69 associativas e semântica extensível. Lua é tipada dinamicamente,
70 interpretada a partir de bytecodes, e tem gerenciamento automático de
71 memória com coleta de lixo. Essas características fazem de Lua uma
72 linguagem ideal para configuração, automação (scripting) e
76 Summary: %{realname} - DLL library for Windows
77 Summary(pl.UTF-8): %{realname} - biblioteka DLL dla Windows
78 Group: Applications/Emulators
81 %{realname} - DLL library for Windows.
83 %description dll -l pl.UTF-8
84 %{realname} - biblioteka DLL dla Windows.
87 %setup -q -n lua-%{version}
90 CC=%{target}-gcc ; export CC
91 CXX=%{target}-g++ ; export CXX
92 LD=%{target}-ld ; export LD
93 AR=%{target}-ar ; export AR
94 AS=%{target}-as ; export AS
95 CROSS_COMPILE=1 ; export CROSS_COMPILE
96 CPPFLAGS="-I%{includedir}" ; export CPPFLAGS
97 RANLIB=%{target}-ranlib ; export RANLIB
98 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
99 TARGET="%{target}" ; export TARGET
102 MYCFLAGS="%{rpmcflags}" \
104 AR="%{target}-ar rcu" \
105 RANLIB="%{target}-ranlib"
108 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../lib/lua50.dll -Wl,--out-implib,../lib/liblua50.dll.a
110 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../../lib/lualib50.dll -Wl,--out-implib,../../lib/liblualib50.dll.a -llua -L../../lib
117 %{target}-strip *.dll
118 %{target}-strip -g -R.comment -R.note *.a
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT{%{_includedir}/lua50,%{_libdir},%{_dlldir}}
125 install include/*.h $RPM_BUILD_ROOT%{_includedir}/lua50
126 install lib/*.a $RPM_BUILD_ROOT%{_libdir}
127 install lib/*.dll $RPM_BUILD_ROOT%{_dlldir}
130 rm -rf $RPM_BUILD_ROOT
133 %defattr(644,root,root,755)
138 %defattr(644,root,root,755)