File vsqlite++.spec of Package vsqlite++
#
# spec file for package vsqlite++
#
# Copyright (c) 2015 SUSE LINUX 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 _libpacname libvsqlitepp3
#
Name: vsqlite++
Version: 0.3.13
Release: 0
Summary: Well designed C++ sqlite 3.x wrapper library
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Url: https://github.com/vinzenz/vsqlite--
Source0: https://github.com/vinzenz/vsqlite--/archive/%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: boost-devel
BuildRequires: dos2unix
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: graphviz
BuildRequires: graphviz-gd
BuildRequires: graphviz-gnome
BuildRequires: libtool
BuildRequires: perl-base
BuildRequires: sqlite-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
VSQLite++ is a C++ wrapper for sqlite3 using the C++ standard library and boost.
VSQLite++ is designed to be easy to use and focuses on simplicity.
%package -n %{_libpacname}
Summary: Well designed C++ sqlite 3.x wrapper library
Group: System/Libraries
Obsoletes: %{_libpacname} < %{version}
%description -n %{_libpacname}
VSQLite++ is a C++ wrapper for sqlite3 using the C++ standard library and boost.
VSQLite++ is designed to be easy to use and focuses on simplicity.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{_libpacname}
%description devel
This package contains development files for %{name}.
%package doc
Summary: Development documentation for %{name}
Group: Development/Libraries/C and C++
%if %suse_version > 1200
BuildArch: noarch
%endif
%description doc
This package contains development documentation files for %{name}.
%prep
%setup -q -n vsqlite---%{version}
find . -iname "*.[ch]pp" -exec dos2unix -k {} \;
%build
export CFLAGS="%{optflags} -fno-strict-aliasing ${INCLUDES}"
export CXXFLAGS="%{optflags} -fno-strict-aliasing ${INCLUDES}"
sh ./autogen.sh --prefix=%{_prefix} --libdir=%{_libdir}
%configure
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
make %{?_smp_mflags}
#Update Doxyfile to suppress Deprecated stuff
#less warnings
doxygen -u Doxyfile
doxygen Doxyfile
%fdupes -s html/
%install
# devel & base
install -p -m 755 -d %{buildroot}%{_libdir}
# devel only
install -p -m 755 -d %{buildroot}%{_includedir}/sqlite/ext
install -m 644 include/sqlite/*.hpp %{buildroot}%{_includedir}/sqlite
install -m 644 include/sqlite/ext/*.hpp %{buildroot}%{_includedir}/sqlite/ext
# docs
install -p -m 755 -d %{buildroot}%{_docdir}
# build for all
make DESTDIR=%{buildroot} install %{?_smp_mflags}
# do not ship these
rm -f %{buildroot}%{_libdir}/libvsqlitepp.la
rm -f %{buildroot}%{_libdir}/libvsqlitepp.a
%fdupes -s %{buildroot}%{_docdir}
%post -n %{_libpacname} -p /sbin/ldconfig
%postun -n %{_libpacname} -p /sbin/ldconfig
%files doc
%defattr(0644, root, root, 0755)
%doc ChangeLog README COPYING examples/sqlite_wrapper.cpp html/*
%files devel
%defattr(0644, root, root, 0755)
%doc ChangeLog README COPYING
%{_includedir}/sqlite
%{_libdir}/libvsqlitepp.so
%files -n %{_libpacname}
%defattr(0644, root, root, 0755)
%doc ChangeLog README COPYING
%{_libdir}/libvsqlitepp.so.*
%changelog