/[packages]/cauldron/tolua++/current/SPECS/tolua++.spec
ViewVC logotype

Annotation of /cauldron/tolua++/current/SPECS/tolua++.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 216893 - (hide annotations) (download)
Fri Mar 2 18:49:49 2012 UTC (12 years, 1 month ago) by zezinho
File size: 2146 byte(s)
bump version to follow updates in Mageia 1
1 kharec 77709 Name: tolua++
2     Version: 1.0.93
3 zezinho 216893 Release: %mkrel 6
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     BuildRequires: lua-devel >= 5.1
18    
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     Requires: lua-devel >= 5.1
38     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

  ViewVC Help
Powered by ViewVC 1.1.30