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