File tinycdb.spec of Package tinycdb
#
# spec file for package tinycdb
#
# Copyright (c) 2012 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/
#
Name: tinycdb
Version: 0.78
Release: 0
License: Public Domain
Summary: Constant Database manipulation library
Url: http://www.corpit.ru/mjt/tinycdb.html
Group: System/Libraries
Source0: http://www.corpit.ru/mjt/tinycdb/%{name}-%{version}.tar.gz
%if 0%{?sles_version}
BuildRequires: glib2-devel
%else
BuildRequires: pkgconfig(glib-2.0)
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Tinycdb is a Constant Database manipulation library
%package devel
Summary: Development files for tinycdb
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This package includes development files for tinycdb
%prep
%setup -q
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
make %{?_smp_mflags} \
CFLAGS="%{optflags}" \
prefix=%{_prefix} \
bindir=%{_bindir} \
libdir=%{_libdir} \
syslibdir=%{_libdir} \
sysconfdir=%{_sysconfdir} \
includedir=%{_includedir} \
mandir=%{_mandir} \
staticlib sharedlib cdb-shared
%install
make CFLAGS="%{optflags}" \
prefix=%{_prefix} \
bindir=%{_bindir} \
libdir=%{_libdir} \
syslibdir=%{_libdir} \
sysconfdir=%{_sysconfdir} \
includedir=%{_includedir} \
mandir=%{_mandir} \
DESTDIR=%{buildroot} install-all install-nss install-piclib install-sharedlib
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc ChangeLog NEWS
%{_bindir}/cdb
%{_libdir}/libcdb.so.*
%{_libdir}/libnss_cdb.so.*
%{_mandir}/man*/cdb.*
%files devel
%defattr(-,root,root)
%{_includedir}/cdb.h
%{_libdir}/*.so
%{_libdir}/*.a
%config(noreplace) %{_sysconfdir}/cdb-Makefile
%changelog