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