File vanessa_logger.spec of Package vanessa_logger

#
# spec file for package vanessa_logger
#
# Copyright (c) 2011 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/
#

%bcond_with renamed_pkgconfig

Name:           vanessa_logger

%define libname   lib%{name}
%define libsoname %{libname}0

Summary:        Generic logging layer
Version:        0.0.10
Release:        1
License:        LGPL-2.1+
Group:          System/Libraries
Url:            http://www.vergenet.net/linux/vanessa/
Source0:        http://horms.net/projects/vanessa/download/vanessa_logger/%{version}/vanessa_logger-%{version}.tar.bz2
Source2:        baselibs.conf
Patch0:         %{name}-0.0.10-pkgconfig_DATA.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{with renamed_pkgconfig}
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
%endif
BuildRequires:  gcc-c++
BuildRequires:  pkg-config

%description
Generic logging layer that may be used to log to one or more of syslog, an
open file handle or a file name. Though due to to limitations in the
implementation of syslog opening multiple syslog loggers doesn't makes
sense. Includes the ability to limit which messages will be logged based on
priorities.

%package -n %{libsoname}
Summary:        Shared libraries for Generic logging layer
Group:          System/Libraries

%description -n %{libsoname}
This package contains the shared libraries needed by programs built
with vanessa_logger.

Generic logging layer that may be used to log to one or more of syslog, an
open file handle or a file name. Though due to to limitations in the
implementation of syslog opening multiple syslog loggers doesn't makes
sense. Includes the ability to limit which messages will be logged based on
priorities.

%package devel
Summary:        Headers and static libraries for development
Group:          Development/Libraries/C and C++
Requires:       %{libsoname} = %{version}

%description devel
Headers and static libraries required to develop against vanessa_logger.

%package sample
Summary:        Example programme that demonstrates vanessa_logger
Group:          Development/Libraries/C and C++
Requires:       %{name}-devel = %{version}

%description sample
Sample programme with source that demonstrates various features of
vanessa_logger.

%prep
%setup -q
%if %{with renamed_pkgconfig}
%patch0 -p1
mv vanessa-logger.pc.in %{name}.pc.in
%endif

%build
%if %{with renamed_pkgconfig}
autoreconf -fi
%endif
%configure --disable-static --disable-silent-rules
make %{?_smp_mflags}

%install
make install DESTDIR="%{buildroot}"

%post -n %{libsoname} -p /sbin/ldconfig
%postun -n %{libsoname} -p /sbin/ldconfig

%clean
%{__rm} -rf %{buildroot}

%files -n %{libsoname}
%defattr(-,root,root)
%{_libdir}/%{libname}.so.*

%files devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_libdir}/%{libname}.la
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*.h

%files sample
%defattr(-,root,root)
%{_bindir}/*
%{_mandir}/man1/vanessa_logger_sample.*
%doc sample/*.c sample/*.h

%changelog
openSUSE Build Service is sponsored by