]> git.pld-linux.org Git - packages/crossmingw32-lua50.git/blame - crossmingw32-lua50.spec
- updated to 5.0.3, unified spec style, separated -static
[packages/crossmingw32-lua50.git] / crossmingw32-lua50.spec
CommitLineData
dd138804 1%define realname lua50
2Summary: A simple lightweight powerful embeddable programming language - Mingw32 cross version
00ac64a2 3Summary(pl.UTF-8): Prosty, lekki ale potężny, osadzalny język programowania - wersja skrośna dla Mingw32
dd138804 4Name: crossmingw32-%{realname}
38ee8fb5
JB
5Version: 5.0.3
6Release: 1
dd138804 7License: MIT
8Group: Development/Languages
9Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz
38ee8fb5 10# Source0-md5: feee27132056de2949ce499b0ef4c480
dd138804 11URL: http://www.lua.org/
dd138804 12BuildRequires: crossmingw32-gcc
13BuildRequires: crossmingw32-w32api
38ee8fb5 14Requires: crossmingw32-runtime
dd138804 15BuildRoot: %{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
42Lua is a powerful, light-weight programming language designed for
43extending applications. It is also frequently used as a
44general-purpose, stand-alone language. It combines simple procedural
45syntax (similar to Pascal) with powerful data description constructs
46based on associative arrays and extensible semantics. Lua is
47dynamically typed, interpreted from bytecodes, and has automatic
48memory management with garbage collection, making it ideal for
49configuration, scripting, and rapid prototyping.
50
650421f7
JR
51%description -l pl.UTF-8
52Lua to język programowania o dużych możliwościach ale lekki,
53przeznaczony do rozszerzania aplikacji. Jest też często używany jako
54samodzielny język ogólnego przeznaczenia. Łączy prostą proceduralną
55składnię (podobną do Pascala) z potężnymi konstrukcjami opisu danych
56bazującymi na tablicach asocjacyjnych i rozszerzalnej składni. Lua ma
57dynamiczny system typów, interpretowany z bytecodu i automatyczne
58zarządzanie pamięcią z odśmiecaczem, co czyni go idealnym do
59konfiguracji, skryptów i szybkich prototypów.
dd138804 60
650421f7
JR
61%description -l pt_BR.UTF-8
62Lua é uma linguagem de programação poderosa e leve, projetada para
63estender aplicações. Lua também é freqüentemente usada como uma
64linguagem de propósito geral. Lua combina programação procedural com
65poderosas construções para descrição de dados, baseadas em tabelas
66associativas e semântica extensível. Lua é tipada dinamicamente,
67interpretada a partir de bytecodes, e tem gerenciamento automático de
68memória com coleta de lixo. Essas características fazem de Lua uma
69linguagem ideal para configuração, automação (scripting) e
70prototipagem rápida.
dd138804 71
38ee8fb5
JB
72%package static
73Summary: Static Lua 5.0.x libraries - MinGW32 cross version
74Summary(pl.UTF-8): Statyczne biblioteki Lua 5.0.x - wersja skrośna MinGW32
75Group: Development/Libraries
76Requires: %{name} = %{version}-%{release}
77
78%description static
79Static Lua 5.0.x libraries (cross MinGW32 version).
80
81%description static -l pl.UTF-8
82Statyczne biblioteki Lua 5.0.x (wersja skrośna MinGW32).
83
dd138804 84%package dll
38ee8fb5
JB
85Summary: Lua 5.0.x - DLL libraries for Windows
86Summary(pl.UTF-8): Lua 5.0.x - biblioteki DLL dla Windows
dd138804 87Group: Applications/Emulators
dd138804 88
89%description dll
38ee8fb5 90Lua 5.0.x - DLL libraries for Windows.
dd138804 91
650421f7 92%description dll -l pl.UTF-8
38ee8fb5 93Lua 5.0.x - biblioteki DLL dla Windows.
dd138804 94
95%prep
96%setup -q -n lua-%{version}
97
98%build
99CC=%{target}-gcc ; export CC
100CXX=%{target}-g++ ; export CXX
101LD=%{target}-ld ; export LD
102AR=%{target}-ar ; export AR
103AS=%{target}-as ; export AS
104CROSS_COMPILE=1 ; export CROSS_COMPILE
38ee8fb5 105CPPFLAGS="-I%{_includedir}" ; export CPPFLAGS
dd138804 106RANLIB=%{target}-ranlib ; export RANLIB
107LDSHARED="%{target}-gcc -shared" ; export LDSHARED
108TARGET="%{target}" ; export TARGET
109
110%{__make} \
111 MYCFLAGS="%{rpmcflags}" \
112 CC="%{target}-gcc" \
113 AR="%{target}-ar rcu" \
114 RANLIB="%{target}-ranlib"
115
116cd src
c8c68a71 117%{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../lib/lua50.dll -Wl,--out-implib,../lib/liblua50.dll.a
dd138804 118cd 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 120cd ../..
121
122cd 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
131rm -rf $RPM_BUILD_ROOT
f4bcefb5 132install -d $RPM_BUILD_ROOT{%{_includedir}/lua50,%{_libdir},%{_dlldir}}
dd138804 133
f4bcefb5
JR
134install include/*.h $RPM_BUILD_ROOT%{_includedir}/lua50
135install lib/*.a $RPM_BUILD_ROOT%{_libdir}
136install lib/*.dll $RPM_BUILD_ROOT%{_dlldir}
dd138804 137
138%clean
139rm -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
This page took 0.090085 seconds and 4 git commands to generate.