base-specs/flac.spec
author yippi
Wed, 01 Aug 2007 18:50:31 +0000
changeset 10252 2d443123d319
parent 10232 90e433aae3b0
child 10256 b9893e7cb878
permissions -rw-r--r--
2007-08-01 Brian Cameron <[email protected]> * base-specs/flac.spec: Bump to 1.2.0. * patches/flac-01-forte.diff: Update patch so it builds

#
# spec file for package flac
#
# Copyright (c) 2003 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: yippi
# bugdb: http://sourceforge.net/tracker/index.php?func=detail&group_id=13478&atid=313478&aid=
#
Name:         flac
License:      Xiph
Group:        Application/Devel
Version:      1.2.0
Release:      3
Distribution: Java Desktop System
Vendor:       Sun Microsystems, Inc.
Summary:      An Open Source Lossless Audio Codec
Source:       http://easynews.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
#owner:yippi date:2005-08-12 type:bug bugid:1701960
Patch1:       flac-01-forte.diff
#owner:sh162551 date:2007-06-29 type:bug bugzilla:1723295 bugster:6559191
Patch2:       flac-02-c++.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
%patch2 -p1
%endif

%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
./configure --prefix=%{_prefix}		\
	    --bindir=%{_bindir}		\
	    --libdir=%{_libdir}		\
            --sysconfdir=%{_sysconfdir} \
	    --disable-cpp               \
	    %{?sse_opt}			\
            --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
* 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