File libFLAC7.spec of Package libFLAC7

#
# spec file for package libFLAC7
#
# 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/
#

# norootforbuild


Name:           libFLAC7
BuildRequires:  gcc-c++ libogg-devel
Summary:        Compatible library for FLAC-1.1.2
Version:        1.1.2
Release:        95
License:        BSD3c
Group:          System/Libraries
Source:         flac-%{version}.tar.bz2
Url:            http://flac.sourceforge.net/
Patch0:         flac-no-xmms.diff
Patch1:         flac-uninitialized-fix.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FLAC is an open source lossless audio codec developed by Josh Coalson.
This package provides a compatible library based on FLAC-1.1.2.



Authors:
--------
    Josh Coalson

%package -n libFLAC++5
Summary:        Compatible library for FLAC-1.1.2
License:        BSD3c
Group:          System/Libraries

%description -n libFLAC++5
FLAC is an open source lossless audio codec developed by Josh Coalson.
This package provides a compatible library based on FLAC-1.1.2.



Authors:
--------
    Josh Coalson

%package -n libOggFLAC3
Summary:        Compatible library for FLAC-1.1.2
License:        BSD3c
Group:          System/Libraries

%description -n libOggFLAC3
FLAC is an open source lossless audio codec developed by Josh Coalson.
This package provides a compatible library based on FLAC-1.1.2.



Authors:
--------
    Josh Coalson

%package -n libOggFLAC++2
Summary:        Compatible library for FLAC-1.1.2
License:        BSD3c
Group:          System/Libraries

%description -n libOggFLAC++2
FLAC is an open source lossless audio codec developed by Josh Coalson.
This package provides a compatible library based on FLAC-1.1.2.



Authors:
--------
    Josh Coalson

%prep
%setup -q -n flac-%{version}
%patch0
%patch1
%{?suse_update_config:%{suse_update_config -f}}

%build
autoreconf -fi
%ifarch ppc
extra_opts="--disable-asm-optimizations"
%endif
# force to add -fPIC -DPIC
CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -fno-strict-aliasing" \
CXXFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -fno-strict-aliasing" \
./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \
    --disable-static \
    $extra_opts
make

%install
make DESTDIR="$RPM_BUILD_ROOT" install
# remove unneeded files
rm -rf $RPM_BUILD_ROOT%{_bindir}
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.so
rm -rf $RPM_BUILD_ROOT%{_includedir}/*
rm -rf $RPM_BUILD_ROOT%{_datadir}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

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

%post -n libOggFLAC3 -p /sbin/ldconfig

%postun -n libOggFLAC3 -p /sbin/ldconfig

%post -n libOggFLAC++2 -p /sbin/ldconfig

%postun -n libOggFLAC++2 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{_libdir}/libFLAC.so.*
%doc COPYING.Xiph

%files -n libFLAC++5
%defattr(-, root, root)
%{_libdir}/libFLAC++.so.*

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

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

%changelog
openSUSE Build Service is sponsored by