diff --git a/cppdb.changes b/cppdb.changes index c76467e..940798e 100644 --- a/cppdb.changes +++ b/cppdb.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sat Feb 23 08:40:20 UTC 2019 - Jan Engelhardt + +- Use %cmake macro. + +------------------------------------------------------------------- +Wed Mar 26 13:06:53 UTC 2014 - perry.werneck@gmail.com + +- make specfile build with SLE11 too + +------------------------------------------------------------------- +Tue Mar 5 05:55:30 UTC 2013 - coolo@suse.com + +- update license to new format + ------------------------------------------------------------------- Mon Sep 3 23:11:51 UTC 2012 - jengelh@inai.de diff --git a/cppdb.spec b/cppdb.spec index 1e4c49a..cefce50 100644 --- a/cppdb.spec +++ b/cppdb.spec @@ -1,7 +1,7 @@ # # spec file for package cppdb # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,28 +12,36 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%if 0%{?suse_version} >= 1230 + %define have_sqlite 1 +%else + %define have_sqlite 0 +%endif + Name: cppdb %define sover 0 Version: 0.3.1 Release: 0 -License: MIT ; BSL-1.0 Summary: Database-independent SQL connectivity library -Url: http://cppcms.com/sql/cppdb/ +License: MIT AND BSL-1.0 Group: Development/Libraries/C and C++ +Url: http://cppcms.com/sql/cppdb/ Source: http://downloads.sf.net/cppcms/%name-%version.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: libmysqlclient-devel BuildRequires: postgresql-devel BuildRequires: unixODBC-devel +%if %have_sqlite BuildRequires: pkgconfig(sqlite3) -BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif %description CppDB is an SQL connectivity library that is designed to provide @@ -125,29 +133,37 @@ This package contains HTML documentation. %build export CFLAGS="%optflags" export CXXFLAGS="%optflags" -cmake -DCMAKE_INSTALL_PREFIX="%_prefix" -DLIBDIR="%_libdir" \ - -DODBC_BACKEND_INTERNAL="OFF"; -make %{?_smp_mflags}; +%cmake -DLIBDIR="%_libdir" -DODBC_BACKEND_INTERNAL="OFF" \ +%if !%have_sqlite + -DDISABLE_SQLITE=ON \ +%endif +; + +make %{?_smp_mflags} %install -b="%buildroot"; -make install DESTDIR="$b" +b="%buildroot" +pushd build/ +%make_install +popd rm -f "$b/%_libdir"/*.a "$b/%_libdir"/libcppdb_*.so rm html/installdox -mkdir -p "$b/%_docdir/%name"; -cp -a html examples "$b/%_docdir/%name/"; +mkdir -p "$b/%_docdir/%name" +cp -a html examples "$b/%_docdir/%name/" %fdupes -s %buildroot/%_docdir/%name %post -n libcppdb%sover -p /sbin/ldconfig %post -n libcppdb_mysql%sover -p /sbin/ldconfig %post -n libcppdb_odbc%sover -p /sbin/ldconfig %post -n libcppdb_postgresql%sover -p /sbin/ldconfig -%post -n libcppdb_sqlite3-%sover -p /sbin/ldconfig + %postun -n libcppdb%sover -p /sbin/ldconfig %postun -n libcppdb_mysql%sover -p /sbin/ldconfig %postun -n libcppdb_odbc%sover -p /sbin/ldconfig %postun -n libcppdb_postgresql%sover -p /sbin/ldconfig + +%post -n libcppdb_sqlite3-%sover -p /sbin/ldconfig %postun -n libcppdb_sqlite3-%sover -p /sbin/ldconfig %files devel @@ -172,9 +188,11 @@ cp -a html examples "$b/%_docdir/%name/"; %defattr(-,root,root) %_libdir/libcppdb_postgresql.so.%{sover}* +%if %have_sqlite %files -n libcppdb_sqlite3-%sover %defattr(-,root,root) %_libdir/libcppdb_sqlite3.so.%{sover}* +%endif %files doc %defattr(-,root,root)