A new user interface for you!

File odb.spec of Package odb

# 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
# Tumbleweed (1330) is the first one supporting plugins, so gcc 6.0
BuildRequires:  gcc-c++   >= 6
BuildRequires:  gcc-devel >= 6

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.

%setup -q
%patch0 -p1

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

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

%doc %{_docdir}/%{name}