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