1 | %define solib tolua++-5.1 |
---|
2 | |
---|
3 | Name: tolua++ |
---|
4 | Version: 1.0.93 |
---|
5 | Release: 1%{?dist} |
---|
6 | Summary: A tool to integrate C/C++ code with Lua |
---|
7 | Group: Development/Tools |
---|
8 | License: MIT |
---|
9 | URL: http://www.codenix.com/~tolua/ |
---|
10 | Source0: http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2 |
---|
11 | Patch0: tolua++-1.0.93-lua51.patch |
---|
12 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
13 | BuildRequires: scons |
---|
14 | BuildRequires: lua-devel >= 5.1 |
---|
15 | |
---|
16 | %description |
---|
17 | tolua++ is an extended version of tolua, a tool to integrate C/C++ code with |
---|
18 | Lua. tolua++ includes new features oriented to C++ |
---|
19 | |
---|
20 | |
---|
21 | %package devel |
---|
22 | Summary: Development files for tolua++ |
---|
23 | Group: Development/Libraries |
---|
24 | Requires: tolua++ = %{version}-%{release} |
---|
25 | Requires: lua-devel >= 5.1 |
---|
26 | |
---|
27 | %description devel |
---|
28 | Development files for tolua++ |
---|
29 | |
---|
30 | |
---|
31 | %prep |
---|
32 | %setup -q |
---|
33 | %patch0 -p1 -b .lua51 |
---|
34 | %__sed -i 's/\r//' doc/%{name}.html |
---|
35 | |
---|
36 | |
---|
37 | %build |
---|
38 | scons %{?_smp_mflags} \ |
---|
39 | -Q CCFLAGS="%{optflags} -I%{_includedir}" \ |
---|
40 | tolua_lib=%{solib} \ |
---|
41 | LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1 |
---|
42 | ##Recompile the exe without the soname. An ugly hack. |
---|
43 | gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua -ldl -lm |
---|
44 | |
---|
45 | |
---|
46 | %install |
---|
47 | %__rm -rf %{buildroot} |
---|
48 | %__mkdir_p %{buildroot}%{_bindir} |
---|
49 | %__mkdir_p %{buildroot}%{_libdir} |
---|
50 | %__mkdir_p %{buildroot}%{_includedir} |
---|
51 | %__install -m0755 bin/%{name} %{buildroot}%{_bindir} |
---|
52 | %__install -m0755 lib/lib%{solib}.so %{buildroot}%{_libdir} |
---|
53 | %__install -m0644 include/%{name}.h %{buildroot}%{_includedir} |
---|
54 | cd %{buildroot}%{_libdir} |
---|
55 | ln -s lib%{solib}.so libtolua++.so |
---|
56 | |
---|
57 | |
---|
58 | %clean |
---|
59 | %__rm -rf %{buildroot} |
---|
60 | |
---|
61 | |
---|
62 | %post -p /sbin/ldconfig |
---|
63 | %postun -p /sbin/ldconfig |
---|
64 | |
---|
65 | |
---|
66 | %files |
---|
67 | %defattr(-,root,root,-) |
---|
68 | %{_libdir}/lib%{solib}.so |
---|
69 | %doc README doc/* |
---|
70 | |
---|
71 | |
---|
72 | %files devel |
---|
73 | %defattr(-,root,root,-) |
---|
74 | %{_bindir}/%{name} |
---|
75 | %{_libdir}/libtolua++.so |
---|
76 | %{_includedir}/%{name}.h |
---|
77 | |
---|
78 | |
---|
79 | %changelog |
---|
80 | * Sat Mar 27 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0.93-1 |
---|
81 | - initial build based on Fedora development package |
---|
82 | |
---|
83 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.92-9 |
---|
84 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
85 | |
---|
86 | * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.92-8 |
---|
87 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
88 | |
---|
89 | * Thu Mar 13 2008 Tim Niemueller <tim@niemueller.de> - 1.0.92-7 |
---|
90 | - Added patch to make tolua++ compatible with GCC 4.3 |
---|
91 | |
---|
92 | * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.92-6 |
---|
93 | - Autorebuild for GCC 4.3 |
---|
94 | |
---|
95 | * Wed Aug 22 2007 Ian Chapman <packages@amiga-hardware.com> 1.0.92-5 |
---|
96 | - Release bump for F8 mass rebuild |
---|
97 | - Updated license due to new guidelines |
---|
98 | |
---|
99 | * Mon Aug 28 2006 Ian Chapman <packages@amiga-hardware.com> 1.0.92-4 |
---|
100 | - Release bump for FC6 mass rebuild |
---|
101 | |
---|
102 | * Sat Jun 03 2006 Ian Chapman <packages@amiga-hardware.com> 1.0.92-3 |
---|
103 | - Fixed issue with where tolua++ was tagged with an soname the same as the lib |
---|
104 | meaning ld would fail to locate the library. |
---|
105 | |
---|
106 | * Fri Jun 02 2006 Ian Chapman <packages@amiga-hardware.com> 1.0.92-2 |
---|
107 | - Changed license from Freeware Style to just Freeware |
---|
108 | - Changed => to more conventional >= for (build)requires |
---|
109 | - Moved %%{_bindir}/tolua++ to devel package |
---|
110 | - Now adds soname to library |
---|
111 | |
---|
112 | * Fri Jun 02 2006 Ian Chapman <packages@amiga-hardware.com> 1.0.92-1 |
---|
113 | - Initial Release |
---|