File libcdaudio.spec of Package libcdaudio

#
# spec file for package libcdaudio
#
# 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:           libcdaudio
%define lname   libcdaudio1
BuildRequires:  pkg-config
Summary:        Functions to Control Operation of a CD-ROM When Playing Audio CDs
License:        GPL-2.0+
Group:          Productivity/Multimedia/CD/Grabbers
Url:            http://libcdaudio.sourceforge.net/
Version:        0.99.12
Release:        0
Source:         libcdaudio-0.99.12.tar.bz2
Patch:          libcdaudio-max_matches.diff
Patch1:         libcdaudio-libdir.diff
Patch2:         libcdaudio-buffer-overflow.diff
Patch3:         libcdaudio-double_free.diff
Patch4:         libcdaudio-closedir.diff
Patch5:         libcdaudio-fclose.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libcdaudio is a library designed to provide functions to control
operation of a CD-ROM when playing audio CDs.  It also contains
functions for CDDB and CD index lookup.

%package -n %lname
Summary:        Functions to control oepration of a CD-ROM while playing audio CDs
Group:          System/Libraries
# O/P added in 12.3
Provides:       %name = %version-%release
Obsoletes:      %name < %version-%release

%description -n %lname
libcdaudio is a library designed to provide functions to control
operation of a CD-ROM when playing audio CDs.  It also contains
functions for CDDB and CD index lookup.

%package devel
Requires:       %lname = %version
Summary:        Provide functions to control operation of a CD-ROM when playing audio CDs
Group:          Development/Libraries/C and C++

%description devel
libcdaudio is a library designed to provide functions to control
operation of a CD-ROM when playing audio CDs.  It also contains
functions for CDDB and CD Index lookup.



%prep
%setup -q
%patch
%patch1
%patch2
%patch3
%patch4
%patch5

%build
%configure --disable-static --with-pic
make %{?_smp_mflags} -k

%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -f "%buildroot/%_libdir"/*.la

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-, root, root)
%doc README
%_libdir/libcdaudio.so.1*

%files devel
%defattr(-, root, root)
/usr/bin/libcdaudio-config
/usr/include/cdaudio.h
%_libdir/pkgconfig/libcdaudio.pc
/usr/share/aclocal/libcdaudio.m4
%{_libdir}/libcdaudio.so

%changelog