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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1146782 - (show annotations) (download)
Thu Aug 24 01:11:17 2017 UTC (4 years, 1 month ago) by ovitters
File size: 2079 byte(s)
SILENT convert -devel buildrequires into pkgconfig
1 Name: tolua++
2 Version: 1.0.93
3 Release: %mkrel 13
4
5 %define apiver 5.1
6 %define soname tolua++%{apiver}
7 %define libname %mklibname %{name} %{apiver}
8 %define develname %mklibname %{name} -d
9
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: pkgconfig(lua) >= 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: lua5.1-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 # 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
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 %files
66 %{_bindir}/%{name}
67
68 %files -n %{libname}
69 %{_libdir}/lib%{soname}.so
70
71 %files -n %{develname}
72 %doc README doc/*
73 %{_libdir}/libtolua++.so
74 %{_includedir}/%{name}.h

  ViewVC Help
Powered by ViewVC 1.1.28