File odb-compiler.spec of Package ODB

# Copyright (c) 2015 Antonio Lopes, Lisbon, Portugal.
# 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.

#!Preinstall: !libgcc_s1 !libgcc_s1 !libgcc_s1 !libgcc_s1 !libgcc_s1 !libgcc_s1
#!Preinstall: libgcc_s1-gcc7
#!Prefer:     -libgcc_s1 libgcc_s1-gcc7

Name:		odb-2_4
Version:	2.4.0
Release:	1%{?dist}
Summary:	ODB Common Runtime Librarys
License:	GPL-2.0
Group:		Development/Libraries/C and C++
Source:		odb-%{version}.tar.gz
BuildRoot:	%{_tmppath}/odb-%{version}-build
BuildRequires:  gcc-c++
BuildRequires:  gcc-devel
BuildRequires:  pkg-config
BuildRequires:  libcutl-devel
BuildRequires:  glibc-devel
BuildRequires:  doxygen
BuildRequires:  libtool
BuildRequires:  automake
BuildRequires:  autoconf

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.

%package -n odb-devel
Summary:	ODB development package
Group:		Development/Libraries/C and C++
Requires:	%{name} = %{version}
Requires:	glibc-devel

%description -n odb-devel
Development files for odb.

%setup -q -n odb-%{version}

export CXX=g++
make %{?_smp_mflags}

echo %{buildroot}
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

find .%{_includedir}/odb -type d -print | sed 's,^\.,\%attr(755\,root\,root) ,'  >  $RPM_BUILD_DIR/files-devel.list
find .%{_includedir}/odb -type f -print | sed 's,^\.,\%attr(644\,root\,root) ,'  >> $RPM_BUILD_DIR/files-devel.list

rm -rf %{buildroot}



%attr(0755,root,root) %{_libdir}/

%files -n odb-devel -f ../files-devel.list
%dir %{_includedir}/odb
%attr(0755,root,root) %{_libdir}/*.la
%attr(0644,root,root) %{_libdir}/pkgconfig/odb.pc