]> git.pld-linux.org Git - packages/crossmingw32-lua40.git/blob - crossmingw32-lua40.spec
- one more
[packages/crossmingw32-lua40.git] / crossmingw32-lua40.spec
1 %define         realname        lua40
2 Summary:        A simple lightweight powerful embeddable programming language - Mingw32 cross version
3 Summary(pl):    Prosty, lekki ale potê¿ny, osadzalny jêzyk programowania - wersja skro¶na dla Mingw32
4 Name:           crossmingw32-%{realname}
5 Version:        4.0.1
6 Release:        2
7 License:        BSD-like (see docs)
8 Group:          Development/Languages
9 Source0:        http://www.lua.org/ftp/lua-%{version}.tar.gz
10 # Source0-md5:  a31d963dbdf727f9b34eee1e0d29132c
11 Patch0:         lua-OPT.patch
12 URL:            http://www.lua.org/
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
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
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):    %{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
75 %{realname} - biblioteka DLL dla Windows.
76
77 %prep
78 %setup -q -n lua-%{version}
79 %patch0 -p1
80
81 %build
82 CC=%{target}-gcc ; export CC
83 CXX=%{target}-g++ ; export CXX
84 LD=%{target}-ld ; export LD
85 AR=%{target}-ar ; export AR
86 AS=%{target}-as ; export AS
87 CROSS_COMPILE=1 ; export CROSS_COMPILE
88 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
89 RANLIB=%{target}-ranlib ; export RANLIB
90 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
91 TARGET="%{target}" ; export TARGET
92
93 %{__make} \
94         CC="%{target}-gcc" \
95         AR="%{target}-ar rcu" \
96         RANLIB="%{target}-ranlib" \
97         OPT="%{rpmcflags}"
98
99 cd src
100 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../lib/lua40.dll -Wl,--out-implib,../lib/liblua40.dll.a
101 cd lib
102 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o ../../lib/lualib40.dll -Wl,--out-implib,../../lib/liblualib40.dll.a -llua -L../../lib
103 cd ../..
104
105 cd lib
106 mv liblua{,40}.a
107 mv liblualib{,40}.a
108 %if 0%{!?debug:1}
109 %{target}-strip *.dll
110 %{target}-strip -g -R.comment -R.note *.a
111 %endif
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT%{arch}/{include/lua40,lib}
116 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
117
118 install include/*.h $RPM_BUILD_ROOT%{arch}/include/lua40
119 install lib/*.a $RPM_BUILD_ROOT%{arch}/lib
120 install lib/*.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %files
126 %defattr(644,root,root,755)
127 %{arch}/include/*
128 %{arch}/lib/*
129
130 %files dll
131 %defattr(644,root,root,755)
132 %{_datadir}/wine/windows/system/*
This page took 0.070238 seconds and 4 git commands to generate.