File libcddb-utils.spec of Package libcddb-utils

#
# spec file for package libcddb-utils (Version 1.3.2)
#
# Copyright (c) 2009 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/
#

# norootforbuild


Name:           libcddb-utils
# WARNING: Do not edit this auto generated file.
#%(sh %{_sourcedir}/libcddb_spec-prepare.sh %{_sourcedir} %{name})
# To break libcddb<->libcdio dependency loop, this package is built in two stages.
%define BUILD_CORE 0
%define BUILD_UTILS 1
%define _name libcddb
Version:        1.3.2
Release:        1
Url:            http://libcddb.sourceforge.net/
Group:          Productivity/Multimedia/Other
License:        LGPL v2.1 or later
%if %BUILD_CORE
Summary:        CDDB Access Library Utilities
# bug437293
%ifarch ppc64
Obsoletes:      libcddb-64bit
%endif
%else
Summary:        CDDB Access Library Utilities
%endif
Source:         %{_name}-%{version}.tar.bz2
Source1:        %{_name}_spec-prepare.sh
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkg-config
%if %BUILD_UTILS
BuildRequires:  libcdio-devel
%if !%BUILD_CORE
BuildRequires:  libcddb-devel
%endif
%endif
Patch:          libcddb-no-examples.patch

%description
Libcddb is a library that implements the different protocols (CDDBP,
HTTP, and SMTP) to access data on a CDDB server (http://freedb.org). It
tries to be as cross-platform as possible.

Authors:
--------
    Kris Verbeeck <airborne@advalvas.be>

%if %BUILD_UTILS
%if %BUILD_CORE

%package -n libcddb-utils
License:        LGPL v2.1 or later
Summary:        CDDB Access Library Utilities
Group:          Productivity/Multimedia/Other

%description -n libcddb-utils
Libcddb is a library that implements the different protocols (CDDBP,
HTTP, and SMTP) to access data on a CDDB server (http://freedb.org). It
tries to be as cross-platform as possible.

Authors:
--------
    Kris Verbeeck <airborne@advalvas.be>

%endif
%endif
%if %BUILD_CORE

%package -n libcddb2
License:        LGPL v2.1 or later
Summary:        CDDB Access Library
Group:          System/Libraries
# bug437293
%ifarch ppc64
Obsoletes:      libcddb-64bit
%endif
#
Provides:       %{_name} = %{version}
#opensuse 10.3
Obsoletes:      %{_name} <= 1.3.0

%description -n libcddb2
Libcddb is a library that implements the different protocols (CDDBP,
HTTP, and SMTP) to access data on a CDDB server (http://freedb.org). It
tries to be as cross-platform as possible.

Authors:
--------
    Kris Verbeeck <airborne@advalvas.be>

%package devel
License:        LGPL v2.1 or later
Group:          Development/Libraries/C and C++
Summary:        CDDB Access Library
Requires:       libcddb2 = %{version} glibc-devel
# bug437293
%ifarch ppc64
Obsoletes:      libcddb-devel-64bit
%endif

%description devel
Libcddb is a library that implements the different protocols (CDDBP,
HTTP, and SMTP) to access data on a CDDB server (http://freedb.org). It
tries to be as cross-platform as possible.

Authors:
--------
    Kris Verbeeck <airborne@advalvas.be>

%endif

%prep
%setup -q -n %{_name}-%{version}
%if !%BUILD_UTILS
%patch
%endif
%if !%BUILD_CORE
sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/lib\([^ ]*\)\.la:-l\2:g' */Makefile.am
%endif

%build
autoreconf -f -i
%configure\
	--disable-rpath\
	--disable-static\
	--with-pic
%if !%BUILD_CORE
cd examples
%endif
make %{?jobs:-j%jobs}

%install
%if !%BUILD_CORE
cd examples
%endif
make DESTDIR=$RPM_BUILD_ROOT install
%{__rm} -f %{buildroot}%{_libdir}/libcddb.la

%clean
rm -rf $RPM_BUILD_ROOT
%if %BUILD_UTILS

%files -n libcddb-utils
%defattr (-, root, root)
%{_bindir}/*
%endif
%if %BUILD_CORE

%post -n libcddb2 -p /sbin/ldconfig

%postun -n libcddb2 -p /sbin/ldconfig

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

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

%changelog
openSUSE Build Service is sponsored by