1 %define realname tolua++
2 Summary: Extended version of tolua, a tool to integrate C/C++ code with Lua - Mingw32 cross version
3 Summary(pl): Rozszerzona wersja tolua, narzêdzia integruj±cego kod C/C++ z Lua - wersja skro¶na dla Mingw32
4 Name: crossmingw32-%{realname}
8 Group: Development/Tools
9 Source0: http://www.codenix.com/~tolua/%{realname}-%{version}.tar.bz2
10 # Source0-md5: 003129c1b14a2a2ed5747f051eff6c3e
11 URL: http://www.codenix.com/~tolua/
12 BuildRequires: crossmingw32-gcc
13 BuildRequires: crossmingw32-lua50
14 BuildRequires: crossmingw32-w32api
16 Requires: crossmingw32-runtime
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define no_install_post_strip 1
21 %define target i386-mingw32
22 %define target_platform i386-pc-mingw32
23 %define arch %{_prefix}/%{target}
24 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
25 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
27 %define __cc %{target}-gcc
28 %define __cxx %{target}-g++
30 %ifarch alpha sparc sparc64 sparcv9
35 tolua++ is an extension of tolua, a tool to integrate C/C++ code with
36 Lua. tolua++ includes new features oriented to c++, such as class
39 tolua is a tool that greatly simplifies the integration of C/C++ code
40 with Lua. Based on a "cleaned" header file, tolua automatically
41 generates the binding code to access C/C++ features from Lua. Using
42 Lua-5.0 API and tag method facilities, the current version
43 automatically maps C/C++ constants, external variables, functions,
44 namespace, classes, and methods to Lua. It also provides facilities to
48 tolua++ jest rozszerzeniem tolua, narzêdzia integruj±cego kod C/C++ z
49 Lua. tolua++ zawiera nowe, zorientowane na c++ cechy takie jak wzorce
52 tolua jest narzêdziem które znacznie upraszcza integracje kodu C/C++ z
53 Lua. Bazuj±c na "oczyszczonych" plikach nag³ówkowych tolua
54 automatycznie generuje kod umo¿liwiaj±cy Lua dostêp do struktur i
55 funkcji C/C++. Dziêki u¿yciu API Lua 5.0, bie¿±ca wersja automatycznie
56 mapuje sta³e, zewnêtrzne zmienne, funkcje, przestrzenie nazw, klasy i
57 metody z C/C++ do Lua. Umo¿liwia równie¿ tworzenie modu³ów Lua.
60 Summary: %{realname} - DLL library for Windows
61 Summary(pl): %{realname} - biblioteka DLL dla Windows
62 Group: Applications/Emulators
65 %{realname} - DLL library for Windows.
67 %description dll -l pl
68 %{realname} - biblioteka DLL dla Windows.
71 %setup -q -n %{realname}-%{version}
74 CC=%{target}-gcc ; export CC
75 CXX=%{target}-g++ ; export CXX
76 LD=%{target}-ld ; export LD
77 AR=%{target}-ar ; export AR
78 AS=%{target}-as ; export AS
79 CROSS_COMPILE=1 ; export CROSS_COMPILE
80 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
81 RANLIB=%{target}-ranlib ; export RANLIB
82 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
83 TARGET="%{target}" ; export TARGET
85 for i in src/lib/tolua_{event,is,map,push,to}.c
86 do %{__cc} %{rpmcflags} $i -c -I%{arch}/include/lua50 -Iinclude
95 --shared *.o -llualib50 -llua50 -lm -o tolua++.dll \
96 -Wl,--enable-auto-image-base -Wl,--out-implib,tolua++.dll.a
100 %{target}-strip -g -R.comment -R.note *.a
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
106 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
108 install include/tolua++.h $RPM_BUILD_ROOT%{arch}/include
109 install *.a $RPM_BUILD_ROOT%{arch}/lib
110 install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
113 rm -rf $RPM_BUILD_ROOT
116 %defattr(644,root,root,755)
121 %defattr(644,root,root,755)
122 %{_datadir}/wine/windows/system/*