File libFLAC7.spec of Package libFLAC7

#
# spec file for package libFLAC7 (Version 1.1.2)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# 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:        1
License:        BSD License and BSD-like
Group:          System/Libraries
Source:         flac-%{version}.tar.bz2
URL:            http://flac.sourceforge.net/
Patch:          flac-prototypes.dif
Patch1:         flac-no-xmms.diff
Patch2:         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:        BSD License and BSD-like
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:        BSD License and BSD-like
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:        BSD License and BSD-like
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}
%patch1
%patch2
%{?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
%run_ldconfig

%postun
%run_ldconfig

%post -n libFLAC++5
%run_ldconfig

%postun -n libFLAC++5
%run_ldconfig

%post -n libOggFLAC3
%run_ldconfig

%postun -n libOggFLAC3
%run_ldconfig

%post -n libOggFLAC++2
%run_ldconfig

%postun -n libOggFLAC++2
%run_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
* Wed Jun 06 2007 - tiwai@suse.de
- initial package, based on FLAC-1.1.2.
openSUSE Build Service is sponsored by