base-specs/flac.spec
author yippi
Mon, 13 Sep 2010 08:09:44 +0000
changeset 20052 93904e5bcdd5
parent 20026 2da80049f7bb
permissions -rw-r--r--
2010-09-13 Brian Cameron <[email protected]> * base-specs/gst-plugins-base.spec, base-specs/libtheora.spec, base-specs/flac.spec, base-specs/ConsoleKit.spec, base-specs/gst-plugins-good.spec, base-specs/gnome-settings-daemon.spec, copyright/SUNWgnome-audio.copyright, copyright/SUNWspeex.copyright, copyright/SUNWconsolekit.copyright, copyright/SUNWdbus.copyright, copyright/SUNWlibtheora.copyright, copyright/SUNWmoovida.copyright, copyright/SUNWmoovida-plugins.copyright, copyright/SUNWgnome-media.copyright, copyright/SUNWxdg-sound-theme.copyright, copyright/SUNWcodeina.copyright, copyright/SUNWgnome-desktop-prefs.copyright: Improvements to copyright files.

#
# spec file for package flac
#
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%define owner yippi
# bugdb: http://sourceforge.net/tracker/index.php?func=detail&group_id=13478&atid=313478&aid=
#

%define OSR 4199:1.1.2

Name:         flac
License:      Xiph.org BSD-style, binaries & media player plugins also use GPL v2, LGPL v2.1, documentation uses FDL v1.2
Group:        Libraries/Multimedia
Version:      1.2.1
Release:      3
Distribution: Java Desktop System
Vendor:       Sourceforge
Summary:      An Open Source Lossless Audio Codec
Source:       http://downloads.us.xiph.org/releases/%{name}/%{name}-%{version}.tar.gz
#owner:yippi date:2005-08-12 type:bug bugid:1701960
Patch1:       flac-01-forte.diff
#owner:mattman date:2009-02-26 type:branding
Patch2:       flac-02-manpages.diff
URL:          http://flac.sourceforge.net/
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_docdir}/%{name}
Autoreqprov:  on
Prereq:       /sbin/ldconfig

%description
FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, 
FLAC is similar to MP3, but lossless, meaning that audio is compressed 
in FLAC without any loss in quality. This is similar to how Zip works, 
except with FLAC you will get much better compression because it is 
designed specifically for audio, and you can play back compressed FLAC 
files in your favorite player (or your car or home stereo, see supported 
devices) just like you would an MP3 file.

%package devel
Summary:        flac development files
Group:          Development/Libraries
Requires:       %{name} = %{version}

%description devel
flac development files.

%prep
%setup -q
perl -pi -e 's/^M$//' src/share/replaygain_analysis/replaygain_analysis.c
%ifos solaris
%patch1 -p1
%endif
%patch2 -p1

%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

export CFLAGS="%{optflags}"
export CXXFLAGS="%{?cxx_optflags}"
export LDFLAGS="%{?_ldflags}"
aclocal $ACLOCAL_FLAGS -I ./m4
libtoolize --force --copy
autoheader
automake -a -c -f
autoconf

%if %build_cpp
ENABLE_CPPLIBS=--enable-cpplibs
%else
ENABLE_CPPLIBS=--disable-cpplibs
%endif

./configure --prefix=%{_prefix}		\
	    --bindir=%{_bindir}		\
	    --libdir=%{_libdir}		\
            --sysconfdir=%{_sysconfdir} \
	    $ENABLE_CPPLIBS		\
            --mandir=%{_mandir}

make -j $CPUS

%install
make DESTDIR=$RPM_BUILD_ROOT install

#Clean up unpackaged files
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_datadir}/doc/*
%{_datadir}/man/man1/flac*
%{_datadir}/man/man1/metaflac*
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_libdir}/libFLAC.so*
%attr(755,root,root) %{_libdir}/libFLAC++.so*
%attr(755,root,root) %{_libdir}/libOggFLAC.so*
%attr(755,root,root) %{_libdir}/libOggFLAC++.so*

%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_datadir}/aclocal/*.m4

%changelog
* Thu Feb 26 2009 - [email protected]
- Add manpages patch for Attributes and ARC Comment
* Thu Feb 19 2009 - [email protected]
- Remove patch flac-02-map.diff.  Got feedback from the person who submitted
  the bug that this didn't resolve the issue.
* Wed Feb 18 2009 - [email protected]
- Add patch flac-02-map.diff and add "-Wl,-Mmap.remove_all to LDFLAGS, so that
  FLAC builds without HWCAP enabled.  This fixes bug #6653080.
* Fri Mar 14 2008 - [email protected]
- change --disable-cplusplus to --disable-cpplibs
* Mon Nov 05 2007 - [email protected]
- Fix Source URL.
* Tue Sep 18 2007 - [email protected]
- Bump to 1.2.1. Change --disable-cpp option to --disable-cplusplus as
  configure.in has been changed. Remove upstream patches 02-c++ and
  03-ogg-build-fix.
* Thu Aug 02 2007 - [email protected]
- Add upstream patch, 03-ogg-build-fix, to fix build error.
* Tue Jul 31 2007 - [email protected]
- Bump to 1.2.0.
* Fri Jun 29 2007 - [email protected]
- add patch 02-c++.diff, add configuration option --disable-cpp
* Tue Apr 17 2007 - [email protected]
- Add autoheader call since the patch now modifies configure.ac and
  adds FLAC_INLINE.
* Thu Mar 15 2007 - [email protected]
- add some configure options and set environment variables to support
  building the same spec for multiple ISAs
* Thu Feb 15 2006 - [email protected]
- Bump to 1.1.4.
* Thu Nov 30 2006 - [email protected]
- Bump to 1.1.3.
* Fri Aug 12 2005 - [email protected]
- Add patch flac-01-forte.diff
* Tue Aug 02 2005 - [email protected]
- Initial spec file checkin