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