LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File tolua++.spec of Package tolua++ (Project devel:languages:misc)

# spec file for package tolua++
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:           tolua++
Version:        1.0.93
Release:        0
Summary:        C/C++ with Lua Integration Tool
Source:         http://www.codenix.com/~tolua/tolua++-%{version}.tar.bz2
Patch1:         tolua++-lib.patch
Source99:       tolua++-rpmlintrc
Url:            http://www.codenix.com/~tolua/
Group:          Development/Libraries/Other
License:        MIT
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  scons
#FIXME: change to lua-devel as soon as tolua++ is working with lua 5.2 
%if 0%{?suse_version} > 1210
BuildRequires:  lua51-devel
BuildRequires:  lua-devel
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig

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:
* support for std::string as a basic type (this can be turned off by a command
  line option)
* support for class templates
as well as other features and bugfixes. 

%setup -q

cat <<'EOF' > config_linux.py
import re,os

CCFLAGS = re.split(r"\s+", os.environ['CCFLAGS'])
LIBS = re.split(r"\s+", os.environ['LIBS'])
prefix = "%{_prefix}"

CCFLAGS="%{optflags} `pkg-config lua --cflags` -fPIC" \
LIBS="`pkg-config lua --libs-only-l`" \
scons %{?_smp_flags} \
    prefix="%{_prefix}" \
    libdir="%{_libdir}" \

CCFLAGS="%{optflags} `pkg-config lua --cflags` -fPIC" \
LIBS="`pkg-config lua --libs-only-l`" \
scons %{?_smp_flags} \
    prefix="%{buildroot}%{_prefix}" \
    libdir="%{buildroot}%{_libdir}" \

%{?buildroot:%__rm -rf "%{buildroot}"}