File libmodplug.spec of Package libmodplug

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


%define soname 1

Name:           libmodplug
Summary:        A MOD playing library
License:        SUSE-Public-Domain
Group:          System/Libraries
Version:        0.8.8.4
Release:        0
Url:            http://modplug-xmms.sourceforge.net
Source:         %{name}-%{version}.tar.bz2
Source1:        baselibs.conf
# PATCH-FIX-OPENSUSE libmodplug-timidity.patch -- set paths to openSUSE timidity package
Patch1:         libmodplug-timidity.patch
# PATCH-FIX-OPENSUSE Fix buffer overflow
Patch2:         libmodplug-overflow.patch
# PATCH-FIX-UPSTREAM CVE-2013-4233.patch bnc834483 CVE-2013-4233 sbrabec@suse.cz -- Fix integer overflow.
Patch3:         CVE-2013-4233.patch
# PATCH-FIX-UPSTREAM CVE-2013-4234.patch bnc834483 CVE-2013-4234 sbrabec@suse.cz -- Fix heap overflows.
Patch4:         CVE-2013-4234.patch
BuildRequires:  dos2unix
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Libmodplug is the library behind -- Modplug-XMMS is a fully featured, complete
input plugin for XMMS which plays mod-like music formats. It is based on the
mod rendering code from ModPlug, a popular windows mod player written by
Olivier Lapicque, found at http://www.modplug.com/.

%package -n libmodplug%{soname}

Summary:        Development files for libmodplug
Group:          Development/Libraries/C and C++

%description -n libmodplug%{soname}
Modplug library based on the ModPlug sound engine.
- plays 22 different mod formats.
- plays zip, rar, gzip, and bzip2 compressed mods.
- plays timidity's GUS patch files (*.pat).
- plays all types of MIDI files (*.mid).
- plays textfiles written in the ABC music notation (*.abc).

%package devel
Summary:        Development files for libmodplug
Group:          Development/Libraries/C and C++
Requires:       libmodplug%{soname} = %{version}

%description devel
Files needed to program against libmodplug.

%prep
%setup -q
%patch1
%patch2 -p1
%patch3 -p2
%patch4 -p2
# Fix eol encoding.
dos2unix -o ChangeLog

%build
%configure --disable-static
make %{?_smp_mflags} V=1

%install
%makeinstall
rm $RPM_BUILD_ROOT%{_libdir}/*.la

%post -n libmodplug%{soname} -p /sbin/ldconfig

%postun -n libmodplug%{soname} -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -n libmodplug%{soname}
%defattr(0644,root,root,0755)
%{_libdir}/%{name}.so.%{soname}*

%files devel
%defattr(0644,root,root,0755)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_includedir}/%{name}
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%changelog
openSUSE Build Service is sponsored by