]>
Commit | Line | Data |
---|---|---|
dd138804 | 1 | %define realname lua50 |
2 | Summary: A simple lightweight powerful embeddable programming language - Mingw32 cross version | |
00ac64a2 | 3 | Summary(pl.UTF-8): Prosty, lekki ale potężny, osadzalny język programowania - wersja skrośna dla Mingw32 |
dd138804 | 4 | Name: crossmingw32-%{realname} |
38ee8fb5 JB |
5 | Version: 5.0.3 |
6 | Release: 1 | |
dd138804 | 7 | License: MIT |
8 | Group: Development/Languages | |
9 | Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz | |
38ee8fb5 | 10 | # Source0-md5: feee27132056de2949ce499b0ef4c480 |
dd138804 | 11 | URL: http://www.lua.org/ |
dd138804 | 12 | BuildRequires: crossmingw32-gcc |
13 | BuildRequires: crossmingw32-w32api | |
38ee8fb5 | 14 | Requires: crossmingw32-runtime |
dd138804 | 15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
16 | ||
17 | %define no_install_post_strip 1 | |
18 | ||
f4bcefb5 JR |
19 | %define target i386-mingw32 |
20 | %define target_platform i386-pc-mingw32 | |
21 | ||
22 | %define _sysprefix /usr | |
23 | %define _prefix %{_sysprefix}/%{target} | |
24 | %define _libdir %{_prefix}/lib | |
25 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
26 | %define _dlldir /usr/share/wine/windows/system | |
27 | %define __cc %{target}-gcc | |
28 | %define __cxx %{target}-g++ | |
29 | %define __pkgconfig_provides %{nil} | |
30 | %define __pkgconfig_requires %{nil} | |
31 | ||
32 | %define _ssp_cflags %{nil} | |
33 | %ifnarch %{ix86} | |
34 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
dd138804 | 35 | %define optflags -O2 |
36 | %endif | |
f4bcefb5 JR |
37 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
38 | %define filterout_ld -Wl,-z,.* | |
39 | %define filterout_c -f[-a-z0-9=]* | |
dd138804 | 40 | |
41 | %description | |
42 | Lua is a powerful, light-weight programming language designed for | |
43 | extending applications. It is also frequently used as a | |
44 | general-purpose, stand-alone language. It combines simple procedural | |
45 | syntax (similar to Pascal) with powerful data description constructs | |
46 | based on associative arrays and extensible semantics. Lua is | |
47 | dynamically typed, interpreted from bytecodes, and has automatic | |
48 | memory management with garbage collection, making it ideal for | |
49 | configuration, scripting, and rapid prototyping. | |
50 | ||
650421f7 JR |
51 | %description -l pl.UTF-8 |
52 | Lua to język programowania o dużych możliwościach ale lekki, | |
53 | przeznaczony do rozszerzania aplikacji. Jest też często używany jako | |
54 | samodzielny język ogólnego przeznaczenia. Łączy prostą proceduralną | |
55 | składnię (podobną do Pascala) z potężnymi konstrukcjami opisu danych | |
56 | bazującymi na tablicach asocjacyjnych i rozszerzalnej składni. Lua ma | |
57 | dynamiczny system typów, interpretowany z bytecodu i automatyczne | |
58 | zarządzanie pamięcią z odśmiecaczem, co czyni go idealnym do | |
59 | konfiguracji, skryptów i szybkich prototypów. | |
dd138804 | 60 | |
650421f7 JR |
61 | %description -l pt_BR.UTF-8 |
62 | Lua é uma linguagem de programação poderosa e leve, projetada para | |
63 | estender aplicações. Lua também é freqüentemente usada como uma | |
64 | linguagem de propósito geral. Lua combina programação procedural com | |
65 | poderosas construções para descrição de dados, baseadas em tabelas | |
66 | associativas e semântica extensível. Lua é tipada dinamicamente, | |
67 | interpretada a partir de bytecodes, e tem gerenciamento automático de | |
68 | memória com coleta de lixo. Essas características fazem de Lua uma | |
69 | linguagem ideal para configuração, automação (scripting) e | |
70 | prototipagem rápida. | |
dd138804 | 71 | |
38ee8fb5 JB |
72 | %package static |
73 | Summary: Static Lua 5.0.x libraries - MinGW32 cross version | |
74 | Summary(pl.UTF-8): Statyczne biblioteki Lua 5.0.x - wersja skrośna MinGW32 | |
75 | Group: Development/Libraries | |
76 | Requires: %{name} = %{version}-%{release} | |
77 | ||
78 | %description static | |
79 | Static Lua 5.0.x libraries (cross MinGW32 version). | |
80 | ||
81 | %description static -l pl.UTF-8 | |
82 | Statyczne biblioteki Lua 5.0.x (wersja skrośna MinGW32). | |
83 | ||
dd138804 | 84 | %package dll |
38ee8fb5 JB |
85 | Summary: Lua 5.0.x - DLL libraries for Windows |
86 | Summary(pl.UTF-8): Lua 5.0.x - biblioteki DLL dla Windows | |
dd138804 | 87 | Group: Applications/Emulators |
dd138804 | 88 | |
89 | %description dll | |
38ee8fb5 | 90 | Lua 5.0.x - DLL libraries for Windows. |
dd138804 | 91 | |
650421f7 | 92 | %description dll -l pl.UTF-8 |
38ee8fb5 | 93 | Lua 5.0.x - biblioteki DLL dla Windows. |
dd138804 | 94 | |
95 | %prep | |
96 | %setup -q -n lua-%{version} | |
97 | ||
98 | %build | |
99 | CC=%{target}-gcc ; export CC | |
100 | CXX=%{target}-g++ ; export CXX | |
101 | LD=%{target}-ld ; export LD | |
102 | AR=%{target}-ar ; export AR | |
103 | AS=%{target}-as ; export AS | |
104 | CROSS_COMPILE=1 ; export CROSS_COMPILE | |
38ee8fb5 | 105 | CPPFLAGS="-I%{_includedir}" ; export CPPFLAGS |
dd138804 | 106 | RANLIB=%{target}-ranlib ; export RANLIB |
107 | LDSHARED="%{target}-gcc -shared" ; export LDSHARED | |
108 | TARGET="%{target}" ; export TARGET | |
109 | ||
110 | %{__make} \ | |
111 | MYCFLAGS="%{rpmcflags}" \ | |
112 | CC="%{target}-gcc" \ | |
113 | AR="%{target}-ar rcu" \ | |
114 | RANLIB="%{target}-ranlib" | |
115 | ||
116 | cd src | |
c8c68a71 | 117 | %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../lib/lua50.dll -Wl,--out-implib,../lib/liblua50.dll.a |
dd138804 | 118 | cd lib |
c8c68a71 | 119 | %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../../lib/lualib50.dll -Wl,--out-implib,../../lib/liblualib50.dll.a -llua -L../../lib |
dd138804 | 120 | cd ../.. |
121 | ||
122 | cd lib | |
38ee8fb5 JB |
123 | %{__mv} liblua{,50}.a |
124 | %{__mv} liblualib{,50}.a | |
dd138804 | 125 | %if 0%{!?debug:1} |
126 | %{target}-strip *.dll | |
127 | %{target}-strip -g -R.comment -R.note *.a | |
128 | %endif | |
129 | ||
130 | %install | |
131 | rm -rf $RPM_BUILD_ROOT | |
f4bcefb5 | 132 | install -d $RPM_BUILD_ROOT{%{_includedir}/lua50,%{_libdir},%{_dlldir}} |
dd138804 | 133 | |
f4bcefb5 JR |
134 | install include/*.h $RPM_BUILD_ROOT%{_includedir}/lua50 |
135 | install lib/*.a $RPM_BUILD_ROOT%{_libdir} | |
136 | install lib/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
dd138804 | 137 | |
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %files | |
142 | %defattr(644,root,root,755) | |
38ee8fb5 JB |
143 | %doc COPYRIGHT HISTORY README doc/*.html |
144 | %{_libdir}/liblua50.dll.a | |
145 | %{_libdir}/liblualib50.dll.a | |
f4bcefb5 | 146 | %{_includedir}/lua50 |
dd138804 | 147 | |
38ee8fb5 JB |
148 | %files static |
149 | %defattr(644,root,root,755) | |
150 | %{_libdir}/liblua50.a | |
151 | %{_libdir}/liblualib50.a | |
152 | ||
dd138804 | 153 | %files dll |
154 | %defattr(644,root,root,755) | |
38ee8fb5 JB |
155 | %{_dlldir}/lua50.dll |
156 | %{_dlldir}/lualib50.dll |