LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File odb-compiler.spec of Package ODB (Project home:inescid:robots)

# 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
URL:		http://www.codesynthesis.com/products/odb/
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

%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.

%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.

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

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

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

cd $RPM_BUILD_ROOT
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

%clean
rm -rf %{buildroot}

%post
ldconfig

%postun
ldconfig

%files
%defattr(-,root,root,-)
/usr/share/doc/odb/
%attr(0755,root,root) %{_libdir}/odb-2.4.so
%{_libdir}/odb.so

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

%changelog