tolua++-vl.spec 3.3 KB

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