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