File flac.spec of Package flac.2553

# spec file for package flac
# Copyright (c) 2014 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

Name:           flac
Version:        1.3.0
Release:        0
Summary:        Free Lossless Audio Codec
License:        BSD-3-Clause and GPL-2.0+ and GFDL-1.2
Group:          Productivity/Multimedia/Sound/Utilities

#Git-Clone:	git://
Source2:        baselibs.conf
Patch1:         flac-ocloexec.patch
Patch2:         0001-Allow-use-of-openSSL.patch  
Patch3:         flac-fix-pkgconfig.patch
Patch5:         0001-getopt_long-not-broken-here.patch
Patch6:         flac-fix-CVE-2014-8962.patch
Patch7:         flac-fix-CVE-2014-9028.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf >= 2.60
BuildRequires:  automake >= 1.11
BuildRequires:  gcc-c++
BuildRequires:  libogg-devel
BuildRequires:  libtool
BuildRequires:  openssl-devel
BuildRequires:  pkg-config
BuildRequires:  xz
%ifarch %{ix86}
BuildRequires:  nasm
%ifarch ppc64
# bug437293
Obsoletes:      flac-64bit

FLAC is an open source lossless audio codec developed by Josh Coalson.

%package -n libFLAC8
Summary:        Free Lossless Audio Codec Library
Group:          System/Libraries
Obsoletes:      libflac < %{version}
Provides:       libflac = %{version}

%description -n libFLAC8
This package contains the library for FLAC (Free Lossless Audio Codec)
developed by Josh Coalson.

%package -n libFLAC++6
Summary:        Free Lossless Audio Codec Library
Group:          System/Libraries

%description -n libFLAC++6
This package contains the C++ library for FLAC (Free Lossless Audio
Codec) developed by Josh Coalson.

%package devel
Summary:        FLAC Library Development Package
Group:          Development/Libraries/C and C++
Requires:       glibc-devel
Requires:       libFLAC++6 = %{version}
Requires:       libFLAC8 = %{version}
Requires:       libstdc++-devel

%description devel
This package contains the files needed to compile programs that use the
FLAC library.

%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

touch config.rpath
autoreconf --force --install
%define warn_flags -O3 -W -Wall -Wstrict-prototypes -Wformat-security
export CFLAGS="%{optflags} %{warn_flags}"
%configure --disable-thorough-tests \
	--disable-xmms-plugin \
	--disable-static \
	--disable-rpath \
	--with-pic \

make %{?_smp_mflags} V=1

make install DESTDIR="%buildroot" docdir="%_docdir/%name"
rm -f "%buildroot/%_libdir"/*.la
# documents
cp -a AUTHORS README COPYING.* %{buildroot}%{_docdir}/%{name}

make check %{?_smp_mflags}

%post -n libFLAC8 -p /sbin/ldconfig

%postun -n libFLAC8 -p /sbin/ldconfig

%post -n libFLAC++6 -p /sbin/ldconfig

%postun -n libFLAC++6 -p /sbin/ldconfig

%defattr(-, root, root)
%doc %{_docdir}/%{name}

%files -n libFLAC8
%defattr(-, root, root)

%files -n libFLAC++6
%defattr(-, root, root)

%files devel
%defattr(-, root, root)

openSUSE Build Service is sponsored by