- Switch to mutlibuild approach for lua modules building
- Make all the develpacakges to conflict with each other - Fix build with namespaced lua - Remove version and timestamp from generated files toluapp-build-compare.patch - rename the library to libtolua++-5.1 - libtolua++-5_1-devel should require toluapp-5.1, which will require the library - fix build on openSUSE without lua-5.1.pc - Don't version pkgconfig file - Delete toluapp-versioned-include.patch * still have packages rely on tolua++.h - previous upstream http://www.codenix.com/~tolua/ dead now use https://github.com/LuaDist/toluapp as source - build with versioned includes/sharedlibs. - add pkgconfig file - use update-alternatives to provides tolua++ - build against lua51-devel for openSUSE > 12.1 until tolua++ isn't ported to lua 5.2 - don't buildrequire tolua - initial version (1.0.93) OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-toluapp?expand=0&rev=2
This commit is contained in:
parent
541245c313
commit
80a4d42f7e
5
_multibuild
Normal file
5
_multibuild
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>lua51</package>
|
||||||
|
<package>lua52</package>
|
||||||
|
<package>lua53</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 14 11:39:07 UTC 2017 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Switch to mutlibuild approach for lua modules building
|
||||||
|
- Make all the develpacakges to conflict with each other
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 11 09:30:42 UTC 2017 - tchvatal@suse.com
|
Tue Jul 11 09:30:42 UTC 2017 - tchvatal@suse.com
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package lua51-toluapp
|
# spec file for package lua-toluapp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -16,24 +16,27 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define lua_major_version 5.1
|
%define flavor @BUILD_FLAVOR@
|
||||||
%define lua_suffix 5_1
|
%define mod_name toluapp
|
||||||
Name: lua51-toluapp
|
Name: %{flavor}-%{mod_name}
|
||||||
Version: 1.0.93
|
Version: 1.0.93
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: C/C++ with Lua Integration Tool
|
Summary: C/C++ with Lua Integration Tool
|
||||||
License: MIT
|
License: MIT
|
||||||
|
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
|
||||||
Group: Development/Languages/Lua
|
Group: Development/Languages/Lua
|
||||||
Url: https://github.com/LuaDist/toluapp
|
Url: https://github.com/LuaDist/toluapp
|
||||||
Source: https://github.com/LuaDist/toluapp/archive/%{version}/toluapp-%{version}.tar.gz
|
Source: https://github.com/LuaDist/toluapp/archive/%{version}/toluapp-%{version}.tar.gz
|
||||||
Patch: toluapp-libdir.patch
|
Patch0: toluapp-libdir.patch
|
||||||
Patch1: toluapp-versioned-shared-lib.patch
|
Patch1: toluapp-versioned-shared-lib.patch
|
||||||
Patch2: toluapp-build-compare.patch
|
Patch2: toluapp-build-compare.patch
|
||||||
|
BuildRequires: %{flavor}-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: lua51-devel
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: pkg-config
|
|
||||||
BuildRequires: scons >= 2.3.0
|
BuildRequires: scons >= 2.3.0
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
%if "%{flavor}" == ""
|
||||||
|
ExclusiveArch: do_not_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
|
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
|
||||||
@ -41,24 +44,20 @@ Lua. tolua++ includes new features oriented to c++ such as:
|
|||||||
* support for std::string as a basic type (this can be turned off by a command
|
* support for std::string as a basic type (this can be turned off by a command
|
||||||
line option)
|
line option)
|
||||||
* support for class templates
|
* support for class templates
|
||||||
as well as other features and bugfixes.
|
|
||||||
|
|
||||||
%package -n toluapp-%{lua_major_version}
|
%package -n toluapp-%{lua_version}
|
||||||
Summary: C/C++ with Lua Integration Tool
|
Summary: C/C++ with Lua Integration Tool
|
||||||
|
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
|
||||||
Group: Development/Languages/Lua
|
Group: Development/Languages/Lua
|
||||||
Requires(preun): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
# 99.1: just make sure it's big enough
|
|
||||||
Provides: tolua++ = %{version}-99.1
|
|
||||||
Obsoletes: tolua++ < %{version}-99.1
|
|
||||||
|
|
||||||
%description -n toluapp-%{lua_major_version}
|
%description -n toluapp-%{lua_version}
|
||||||
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
|
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
|
||||||
Lua. tolua++ includes new features oriented to c++ such as:
|
Lua. tolua++ includes new features oriented to c++ such as:
|
||||||
* support for std::string as a basic type (this can be turned off by a command
|
* support for std::string as a basic type (this can be turned off by a command
|
||||||
line option)
|
line option)
|
||||||
* support for class templates
|
* support for class templates
|
||||||
as well as other features and bugfixes.
|
|
||||||
|
|
||||||
%package -n libtolua++-%{lua_suffix}-1
|
%package -n libtolua++-%{lua_suffix}-1
|
||||||
Summary: Runtime libraries for tolua++
|
Summary: Runtime libraries for tolua++
|
||||||
@ -70,17 +69,19 @@ This package provides shared libraries for tolua++.
|
|||||||
%package -n libtolua++-%{lua_suffix}-devel
|
%package -n libtolua++-%{lua_suffix}-devel
|
||||||
Summary: Development headers for tolua++
|
Summary: Development headers for tolua++
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: toluapp-%{lua_major_version}
|
Requires: toluapp-%{lua_version}
|
||||||
|
Conflicts: otherproviders(toluapp-devel)
|
||||||
|
Provides: toluapp-devel = %{version}
|
||||||
|
|
||||||
%description -n libtolua++-%{lua_suffix}-devel
|
%description -n libtolua++-%{lua_suffix}-devel
|
||||||
This package provides development headers for tolua++.
|
This package provides development headers for tolua++.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n toluapp-%{version}
|
%setup -q -n toluapp-%{version}
|
||||||
%patch -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
sed -i "s/@SUFFIX@/%{lua_major_version}/" SConstruct
|
sed -i "s/@SUFFIX@/%{lua_version}/" SConstruct
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cat <<'EOF' > config_linux.py
|
cat <<'EOF' > config_linux.py
|
||||||
@ -102,7 +103,7 @@ scons %{?_smp_mflags} \
|
|||||||
%install
|
%install
|
||||||
CCFLAGS="%{optflags} -fPIC -I%{lua_incdir}" \
|
CCFLAGS="%{optflags} -fPIC -I%{lua_incdir}" \
|
||||||
LIBS="-llua -lm -ldl" \
|
LIBS="-llua -lm -ldl" \
|
||||||
scons %{?_smp_flags} \
|
scons %{?_smp_mflags} \
|
||||||
prefix="%{buildroot}%{_prefix}" \
|
prefix="%{buildroot}%{_prefix}" \
|
||||||
libdir="%{buildroot}%{_libdir}" \
|
libdir="%{buildroot}%{_libdir}" \
|
||||||
shared=1 \
|
shared=1 \
|
||||||
@ -121,7 +122,7 @@ Name: tolua++
|
|||||||
Description: C/C++ with Lua Integration Tool
|
Description: C/C++ with Lua Integration Tool
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
|
|
||||||
Libs: -ltolua++-%{lua_major_version}
|
Libs: -ltolua++-%{lua_version}
|
||||||
Cflags: -I%{_includedir}
|
Cflags: -I%{_includedir}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -131,36 +132,31 @@ touch %{buildroot}%{_sysconfdir}/alternatives/tolua++
|
|||||||
ln -sf %{_sysconfdir}/alternatives/tolua++ %{buildroot}%{_bindir}/tolua++
|
ln -sf %{_sysconfdir}/alternatives/tolua++ %{buildroot}%{_bindir}/tolua++
|
||||||
|
|
||||||
%post -n libtolua++-%{lua_suffix}-1 -p /sbin/ldconfig
|
%post -n libtolua++-%{lua_suffix}-1 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n libtolua++-%{lua_suffix}-1 -p /sbin/ldconfig
|
%postun -n libtolua++-%{lua_suffix}-1 -p /sbin/ldconfig
|
||||||
|
%post -n toluapp-%{lua_version}
|
||||||
%post -n toluapp-%{lua_major_version}
|
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/tolua++ tolua++ %{_bindir}/toluapp-%{lua_major_version} 10
|
%{_sbindir}/update-alternatives --install %{_bindir}/tolua++ tolua++ %{_bindir}/toluapp-%{lua_version} 10
|
||||||
|
|
||||||
%preun -n toluapp-%{lua_major_version}
|
%post -n toluapp-%{lua_version}
|
||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
%{_sbindir}/update-alternatives --remove tolua++ %{_bindir}/toluapp-%{lua_major_version}
|
%{_sbindir}/update-alternatives --remove tolua++ %{_bindir}/toluapp-%{lua_version}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun -n toluapp-%{lua_major_version} -p /sbin/ldconfig
|
%postun -n toluapp-%{lua_version} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -n toluapp-%{lua_major_version}
|
%files -n toluapp-%{lua_version}
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc COPYRIGHT README
|
%doc COPYRIGHT README
|
||||||
%ghost %{_sysconfdir}/alternatives/tolua++
|
%ghost %{_sysconfdir}/alternatives/tolua++
|
||||||
%{_bindir}/tolua++
|
%{_bindir}/tolua++
|
||||||
%{_bindir}/toluapp-%{lua_major_version}
|
%{_bindir}/toluapp-%{lua_version}
|
||||||
|
|
||||||
%files -n libtolua++-%{lua_suffix}-devel
|
%files -n libtolua++-%{lua_suffix}-devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_includedir}/tolua++.h
|
%{_includedir}/tolua++.h
|
||||||
%{_libdir}/libtolua++-%{lua_major_version}.so
|
%{_libdir}/libtolua++-%{lua_version}.so
|
||||||
%{_libdir}/pkgconfig/tolua++.pc
|
%{_libdir}/pkgconfig/tolua++.pc
|
||||||
|
|
||||||
%files -n libtolua++-%{lua_suffix}-1
|
%files -n libtolua++-%{lua_suffix}-1
|
||||||
%defattr(-,root,root)
|
%{_libdir}/libtolua++-%{lua_version}.so.1
|
||||||
%{_libdir}/libtolua++-%{lua_major_version}.so.1
|
%{_libdir}/libtolua++-%{lua_version}.so.%{version}
|
||||||
%{_libdir}/libtolua++-%{lua_major_version}.so.%{version}
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user