diff --git a/README.md b/README.md index 7313ab0..31f4819 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # tolua +Tolua is a tool that greatly simplifies the integration of C/C++ code with Lua. +Based on a cleaned header file, tolua automatically generates the binding code to access C/C++ features from Lua. +Using Lua API and tag method facilities, tolua maps C/C++ constants, external variables, functions, classes, and methods to Lua. + diff --git a/tolua-5.1b-fix_cppflags.patch b/tolua-5.1b-fix_cppflags.patch new file mode 100644 index 0000000..bbfdcbd --- /dev/null +++ b/tolua-5.1b-fix_cppflags.patch @@ -0,0 +1,10 @@ +--- tolua-5.1b/config 2007-08-09 01:05:41.000000000 +0200 ++++ tolua-5.1b/config.cflags 2007-10-24 11:06:53.000000000 +0200 +@@ -30,5 +30,5 @@ + INC= -I$(TOLUA)/include -I$(LUAINC) + LIB= -L$(TOLUA)/lib -L$(LUALIB) + +-CFLAGS= -O2 $(WARN) $(INC) +-CPPFLAGS= -O2 $(WARN) $(INC) ++CFLAGS= -O2 $(RPM_OPT_FLAGS) $(INC) ++CPPFLAGS= -O2 $(RPM_OPT_FLAGS) diff --git a/tolua-5.1b-fix_dl_link.patch b/tolua-5.1b-fix_dl_link.patch new file mode 100644 index 0000000..6b8f64c --- /dev/null +++ b/tolua-5.1b-fix_dl_link.patch @@ -0,0 +1,11 @@ +--- tolua-5.1b/src/bin/Makefile 2007-08-09 01:05:41.000000000 +0200 ++++ tolua-5.1b/src/bin/Makefile.dl 2007-10-24 10:57:54.000000000 +0200 +@@ -13,7 +13,7 @@ + all: $T + + $T: $(OBJS) +- $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm ++ $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm -ldl + + clean: + rm -f $(OBJS) $T diff --git a/tolua.spec b/tolua.spec new file mode 100644 index 0000000..e10f7a3 --- /dev/null +++ b/tolua.spec @@ -0,0 +1,58 @@ +Name: tolua +Version: 5.2.0 +Release: 1mamba +Summary: A tool that greatly simplifies the integration of C/C++ code with Lua +Group: Applications/Development +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.tecgraf.puc-rio.br/~celes/tolua/ +Source: http://www.tecgraf.puc-rio.br/~celes/tolua/tolua-%{version}.tar.gz +Patch0: %{name}-5.1b-fix_dl_link.patch +Patch1: %{name}-5.1b-fix_cppflags.patch +License: GPL +BuildRequires: lua-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Tolua is a tool that greatly simplifies the integration of C/C++ code with Lua. +Based on a cleaned header file, tolua automatically generates the binding code to access C/C++ features from Lua. +Using Lua API and tag method facilities, tolua maps C/C++ constants, external variables, functions, classes, and methods to Lua. + +%prep +%setup -q +#%patch0 -p1 -b .fix_dl_link +#%patch1 -p1 -b .fix_cppflags + +%build +%make LUAINC="`pkg-config --variable=includedir lua`" + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -d %{buildroot}{%{_bindir},%{_libdir},%{_includedir}} +install -m0755 bin/tolua %{buildroot}%{_bindir} +install -m0755 lib/lib* %{buildroot}%{_libdir} +install -m0644 include/tolua.h %{buildroot}%{_includedir} + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/tolua +%{_libdir}/libtolua.a +%{_includedir}/tolua.h +%doc README + +%changelog +* Sun Apr 13 2014 Silvan Calarco 5.2.0-1mamba +- update to 5.2.0 + +* Sun Apr 13 2014 Automatic Build System 5.1b-2mamba +- automatic rebuild by autodist + +* Wed Oct 24 2007 Aleph0 5.1b-1mamba +- update to 5.1 + +* Thu May 10 2007 Silvan Calarco 5.0-1mamba +- package created by autospec