]> git.pld-linux.org Git - packages/crossmingw32-tolua++.git/blob - crossmingw32-tolua++.spec
- spec style cleanup
[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.UTF-8):      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.4
6 Release:        4
7 License:        Free
8 Group:          Development/Tools
9 Source0:        http://www.codenix.com/~tolua/%{realname}-%{version}.tar.bz2
10 # Source0-md5:  8785100f7c9d9253cb47b530d97a32f6
11 URL:            http://www.codenix.com/~tolua/
12 BuildRequires:  crossmingw32-gcc
13 BuildRequires:  crossmingw32-lua50 >= 5.0
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
24 %define         _sysprefix              /usr
25 %define         _prefix                 %{_sysprefix}/%{target}
26 %define         _libdir                 %{_prefix}/lib
27 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
28 %define         _dlldir                 /usr/share/wine/windows/system
29 %define         __cc                    %{target}-gcc
30 %define         __cxx                   %{target}-g++
31 %define         __pkgconfig_provides    %{nil}
32 %define         __pkgconfig_requires    %{nil}
33
34 %define         _ssp_cflags             %{nil}
35 %ifnarch %{ix86}
36 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
37 %define         optflags        -O2
38 %endif
39 # -z options are invalid for mingw linker, most of -f options are Linux-specific
40 %define         filterout_ld    -Wl,-z,.*
41 %define         filterout_c     -f[-a-z0-9=]*
42
43 %description
44 tolua++ is an extension of tolua, a tool to integrate C/C++ code with
45 Lua. tolua++ includes new features oriented to c++, such as class
46 templates.
47
48 tolua is a tool that greatly simplifies the integration of C/C++ code
49 with Lua. Based on a "cleaned" header file, tolua automatically
50 generates the binding code to access C/C++ features from Lua. Using
51 Lua-5.0 API and tag method facilities, the current version
52 automatically maps C/C++ constants, external variables, functions,
53 namespace, classes, and methods to Lua. It also provides facilities to
54 create Lua modules.
55
56 %description -l pl.UTF-8
57 tolua++ jest rozszerzeniem tolua, narzędzia integrującego kod C/C++ z
58 Lua. tolua++ zawiera nowe, zorientowane na c++ cechy takie jak wzorce
59 klas.
60
61 tolua jest narzędziem które znacznie upraszcza integracje kodu C/C++ z
62 Lua. Bazując na "oczyszczonych" plikach nagłówkowych tolua
63 automatycznie generuje kod umożliwiający Lua dostęp do struktur i
64 funkcji C/C++. Dzięki użyciu API Lua 5.0, bieżąca wersja automatycznie
65 mapuje stałe, zewnętrzne zmienne, funkcje, przestrzenie nazw, klasy i
66 metody z C/C++ do Lua. Umożliwia również tworzenie modułów Lua.
67
68 %package static
69 Summary:        Static tolua++ library - cross MinGW32 version
70 Summary(pl.UTF-8):      Statyczna biblioteka tolua++ - wersja skrośna MinGW32
71 Group:          Development/Libraries
72 Requires:       %{name} = %{version}-%{release}
73
74 %description static
75 Static tolua++ library - cross MinGW32 version.
76
77 %description static -l pl.UTF-8
78 Statyczna biblioteka tolua++ - wersja skrośna MinGW32.
79
80 %package dll
81 Summary:        %{realname} - DLL library for Windows
82 Summary(pl.UTF-8):      %{realname} - biblioteka DLL dla Windows
83 Group:          Applications/Emulators
84 Requires:       crossmingw32-lua50-dll >= 5.0
85
86 %description dll
87 %{realname} - DLL library for Windows.
88
89 %description dll -l pl.UTF-8
90 %{realname} - biblioteka DLL dla Windows.
91
92 %prep
93 %setup -q -n %{realname}-%{version}
94
95 %build
96 AR=%{target}-ar ; export AR
97 RANLIB=%{target}-ranlib ; export RANLIB
98
99 for i in src/lib/tolua_{event,is,map,push,to}.c
100 do %{__cc} %{rpmcflags} $i -c -I%{_includedir}/lua50 -Iinclude
101 done
102
103 # static
104 $AR rcu libtolua++.a *.o
105 $RANLIB libtolua++.a
106
107 # shared
108 %{__cc} \
109         --shared *.o -llualib50 -llua50 -lm -o tolua++.dll \
110         -Wl,--enable-auto-image-base -Wl,--out-implib,libtolua++.dll.a
111
112 %if 0%{!?debug:1}
113 %{target}-strip *.dll
114 %{target}-strip -g -R.comment -R.note *.a
115 %endif
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
120
121 install include/tolua++.h $RPM_BUILD_ROOT%{_includedir}
122 install *.a $RPM_BUILD_ROOT%{_libdir}
123 install *.dll $RPM_BUILD_ROOT%{_dlldir}
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %files
129 %defattr(644,root,root,755)
130 %{_includedir}/tolua++.h
131 %{_libdir}/libtolua++.dll.a
132
133 %files static
134 %defattr(644,root,root,755)
135 %{_libdir}/libtolua++.a
136
137 %files dll
138 %defattr(644,root,root,755)
139 %{_dlldir}/tolua++.dll
This page took 0.094481 seconds and 3 git commands to generate.