]> git.pld-linux.org Git - packages/crossmingw32-lua50.git/blob - crossmingw32-lua50.spec
- updated to 5.0.3, unified spec style, separated -static
[packages/crossmingw32-lua50.git] / crossmingw32-lua50.spec
1 %define         realname        lua50
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}
5 Version:        5.0.3
6 Release:        1
7 License:        MIT
8 Group:          Development/Languages
9 Source0:        http://www.lua.org/ftp/lua-%{version}.tar.gz
10 # Source0-md5:  feee27132056de2949ce499b0ef4c480
11 URL:            http://www.lua.org/
12 BuildRequires:  crossmingw32-gcc
13 BuildRequires:  crossmingw32-w32api
14 Requires:       crossmingw32-runtime
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %define         no_install_post_strip   1
18
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
35 %define         optflags        -O2
36 %endif
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=]*
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
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.
60
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.
71
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
84 %package dll
85 Summary:        Lua 5.0.x - DLL libraries for Windows
86 Summary(pl.UTF-8):      Lua 5.0.x - biblioteki DLL dla Windows
87 Group:          Applications/Emulators
88
89 %description dll
90 Lua 5.0.x - DLL libraries for Windows.
91
92 %description dll -l pl.UTF-8
93 Lua 5.0.x - biblioteki DLL dla Windows.
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
105 CPPFLAGS="-I%{_includedir}" ; export CPPFLAGS
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
117 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../lib/lua50.dll -Wl,--out-implib,../lib/liblua50.dll.a
118 cd lib
119 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../../lib/lualib50.dll -Wl,--out-implib,../../lib/liblualib50.dll.a -llua -L../../lib
120 cd ../..
121
122 cd lib
123 %{__mv} liblua{,50}.a
124 %{__mv} liblualib{,50}.a
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
132 install -d $RPM_BUILD_ROOT{%{_includedir}/lua50,%{_libdir},%{_dlldir}}
133
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}
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %files
142 %defattr(644,root,root,755)
143 %doc COPYRIGHT HISTORY README doc/*.html
144 %{_libdir}/liblua50.dll.a
145 %{_libdir}/liblualib50.dll.a
146 %{_includedir}/lua50
147
148 %files static
149 %defattr(644,root,root,755)
150 %{_libdir}/liblua50.a
151 %{_libdir}/liblualib50.a
152
153 %files dll
154 %defattr(644,root,root,755)
155 %{_dlldir}/lua50.dll
156 %{_dlldir}/lualib50.dll
This page took 0.05256 seconds and 3 git commands to generate.