LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File odb.spec of Package odb (Project home:bschramke)

#
# spec file for package odb
#
# Copyright (c) 2016 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/
#

%define major_minor 2.4
Name:           odb
Version:        %{major_minor}.0
Release:        0
License:        GPL-3.0
Summary:        C++ Object-Relational Mapping (Compiler)
Url:            http://www.codesynthesis.com/products/odb/
Group:          Development/Languages/C and C++
Source:         http://www.codesynthesis.com/download/odb/%{major_minor}/odb-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM odb_gcc6.patch -- Fixed upstream, 2.5.0 will be good
Patch0:         odb_gcc6.patch
BuildRequires:  pkgconfig(libcutl)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1320
BuildRequires:  gcc6-c++
BuildRequires:  gcc6-devel
%else
# Tumbleweed (1330) is the first one supporting plugins, so gcc 6.0
BuildRequires:  gcc-c++   >= 6
BuildRequires:  gcc-devel >= 6
%endif

%description
ODB is an open-source, cross-platform, and cross-database object-relational mapping (ORM) system for C++.
It allows you to persist C++ objects to a relational database without having to deal with tables,
columns, or SQL and without manually writing any mapping code.

This package contains the ODB compiler.

%prep
%setup -q
%patch0 -p1

%build
%if 0%{?suse_version} <= 1320
export CC=gcc-6
export CXX=g++-6
%endif
%configure --docdir=%{_docdir}/%{name}
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot} %{?_smp_mflags}

%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.*
%{_libdir}/gcc/*/*/plugin/%{name}.so

%changelog