1 |
kharec |
77709 |
Name: tolua++ |
2 |
|
|
Version: 1.0.93 |
3 |
tv |
641020 |
Release: %mkrel 9 |
4 |
kharec |
77709 |
|
5 |
zezinho |
203567 |
%define apiver 5.1 |
6 |
|
|
%define soname tolua++%{apiver} |
7 |
|
|
%define libname %mklibname %{name} %{apiver} |
8 |
|
|
%define develname %mklibname %{name} -d |
9 |
kharec |
77709 |
|
10 |
|
|
Summary: A tool to integrate C/C++ code with Lua |
11 |
|
|
License: MIT |
12 |
|
|
Group: Development/Other |
13 |
|
|
URL: http://www.codenix.com/~tolua/ |
14 |
|
|
Source0: http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2 |
15 |
|
|
Source1: custom.py |
16 |
|
|
BuildRequires: scons |
17 |
tv |
641020 |
BuildRequires: lua5.2-devel >= 5.1 |
18 |
kharec |
77709 |
|
19 |
|
|
|
20 |
|
|
%description |
21 |
|
|
tolua++ is an extended version of tolua, a tool to |
22 |
|
|
integrate C/C++ code with Lua. tolua++ includes new |
23 |
|
|
features oriented to c++. |
24 |
|
|
|
25 |
|
|
%package -n %{libname} |
26 |
|
|
Summary: Shared library for tolua++ |
27 |
|
|
Group: Development/Other |
28 |
|
|
Requires: %{name} = %{version}-%{release} |
29 |
|
|
|
30 |
|
|
%description -n %{libname} |
31 |
|
|
Shared library for tolua++. |
32 |
|
|
|
33 |
|
|
%package -n %{develname} |
34 |
|
|
Summary: Development files for tolua++ |
35 |
|
|
Group: Development/Other |
36 |
|
|
Requires: %{libname} = %{version}-%{release} |
37 |
cjw |
388461 |
Requires: lua5.1-devel >= 5.1 |
38 |
kharec |
77709 |
Provides: tolua++-devel = %{version}-%{release} |
39 |
|
|
Obsoletes: %{mklibname %{name} 5.1}-devel < 1.0.92-5 |
40 |
|
|
Provides: %{mklibname %{name} 5.1}-devel |
41 |
|
|
|
42 |
|
|
%description -n %{develname} |
43 |
|
|
Development files for tolua++. |
44 |
|
|
|
45 |
|
|
%prep |
46 |
|
|
%setup -q |
47 |
|
|
cp %{SOURCE1} custom.py |
48 |
|
|
|
49 |
|
|
%build |
50 |
|
|
scons -Q CCFLAGS="%{optflags}" LINKFLAGS="%{ldflags} -Wl,-soname,lib%{soname}.so" |
51 |
zezinho |
203567 |
# Recompile the binary without the soname. An ugly hack from Fedora. |
52 |
|
|
# We need it to fix tolua++: symbol lookup error: tolua++: undefined symbol: tolua_open |
53 |
|
|
gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{soname} -llua -ldl -lm |
54 |
kharec |
77709 |
|
55 |
|
|
%install |
56 |
|
|
mkdir -p %{buildroot}%{_bindir} |
57 |
|
|
mkdir %{buildroot}%{_libdir} |
58 |
|
|
mkdir %{buildroot}%{_includedir} |
59 |
|
|
install -m0755 bin/%{name} %{buildroot}%{_bindir} |
60 |
|
|
install -m0755 lib/lib%{soname}.so* %{buildroot}%{_libdir} |
61 |
|
|
install -m0644 include/%{name}.h %{buildroot}%{_includedir} |
62 |
|
|
cd %{buildroot}%{_libdir} |
63 |
|
|
ln -s lib%{soname}.so libtolua++.so |
64 |
|
|
|
65 |
|
|
%clean |
66 |
|
|
|
67 |
|
|
%files |
68 |
|
|
%defattr(-,root,root) |
69 |
|
|
%{_bindir}/%{name} |
70 |
|
|
|
71 |
|
|
%files -n %{libname} |
72 |
|
|
%defattr(-,root,root) |
73 |
|
|
%{_libdir}/lib%{soname}.so |
74 |
|
|
|
75 |
|
|
%files -n %{develname} |
76 |
|
|
%defattr(-,root,root) |
77 |
|
|
%doc README doc/* |
78 |
|
|
%{_libdir}/libtolua++.so |
79 |
|
|
%{_includedir}/%{name}.h |