]> git.pld-linux.org Git - packages/crossmingw32-tolua++.git/blob - crossmingw32-tolua++.spec
- unified
[packages/crossmingw32-tolua++.git] / crossmingw32-tolua++.spec
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}
5 Version:        1.0.3
6 Release:        1
7 License:        Free
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
15 BuildRequires:  scons
16 Requires:       crossmingw32-runtime
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         no_install_post_strip   1
20
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}
26
27 %define         __cc            %{target}-gcc
28 %define         __cxx           %{target}-g++
29
30 %ifarch alpha sparc sparc64 sparcv9
31 %define         optflags        -O2
32 %endif
33
34 %description
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
37 templates.
38
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
45 create Lua modules.
46
47 %description -l pl
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
50 klas.
51
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.
58
59 %package dll
60 Summary:        %{realname} - DLL library for Windows
61 Summary(pl):    %{realname} - biblioteka DLL dla Windows
62 Group:          Applications/Emulators
63
64 %description dll
65 %{realname} - DLL library for Windows.
66
67 %description dll -l pl
68 %{realname} - biblioteka DLL dla Windows.
69
70 %prep
71 %setup -q -n %{realname}-%{version}
72
73 %build
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
84
85 for i in src/lib/tolua_{event,is,map,push,to}.c
86 do %{__cc} %{rpmcflags} $i -c -I%{arch}/include/lua50 -Iinclude
87 done
88
89 # static
90 $AR rcu tolua++.a *.o
91 $RANLIB tolua++.a
92
93 # shared
94 %{__cc} \
95         --shared *.o -llualib50 -llua50 -lm -o tolua++.dll \
96         -Wl,--enable-auto-image-base -Wl,--out-implib,tolua++.dll.a
97
98 %if 0%{!?debug:1}
99 %{target}-strip *.dll
100 %{target}-strip -g -R.comment -R.note *.a
101 %endif
102
103 %install
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
107
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
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %files
116 %defattr(644,root,root,755)
117 %{arch}/include/*
118 %{arch}/lib/*
119
120 %files dll
121 %defattr(644,root,root,755)
122 %{_datadir}/wine/windows/system/*
This page took 0.25686 seconds and 3 git commands to generate.