SUNWflac.spec
author dkenny
Mon, 14 Jul 2008 14:46:05 +0000
branchgnome-2-22
changeset 12467 6830bb7a5bbd
parent 11981 cf3c5b1353ee
child 13574 164d399fe546
permissions -rw-r--r--
2008-07-14 Darren Kenny <[email protected]> * base-specs/evince.spec, patches/evince-03-static-enum.diff: Add patch to fix crash when using presentation mode (bug#6724495), and logged upstream bugzilla bug#542924.

#
# spec file for package SUNWflac
#
# includes module(s): flac
#
# Copyright 2007 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
#
%include Solaris.inc
%ifarch amd64 sparcv9
%include arch64.inc
%define sse_opt --enable-sse
%use flac_64 = flac.spec
%endif

%if %arch_sse2
%include x86_sse2.inc
%define sse_opt --enable-sse
%use flac_sse2 = flac.spec
%endif

%include base.inc
%define sse_opt --disable-sse
%use flac = flac.spec

Name:                    SUNWflac
Summary:                 Free Lossless Audio Codec
Version:                 %{flac.version}
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
BuildConflicts: SFEnasm
BuildRequires:  SUNWgnome-common-devel
BuildRequires:  SUNWogg-vorbis-devel
BuildRequires:  SUNWlibC
Requires:       SUNWogg-vorbis
Requires:       SUNWlibms
Requires:       SUNWlibC

%package devel
Summary:      %{summary} - development files
SUNW_BaseDir: %{_basedir}
%include default-depend.inc

%prep
rm -rf %name-%version
mkdir %name-%version

%ifarch amd64 sparcv9
mkdir %name-%version/%_arch64
%flac_64.prep -d %name-%version/%_arch64
%endif

%if %arch_sse2
mkdir %name-%version/%sse2_arch
%flac_sse2.prep -d %name-%version/%sse2_arch
%endif

mkdir %name-%version/%base_arch
%flac.prep -d %name-%version/%base_arch

%build
%if %cc_is_gcc
%else
export CXX="${CXX} -norunpath"
%endif

%ifarch amd64 sparcv9
%flac_64.build -d %name-%version/%_arch64
%endif

%if %arch_sse2
%flac_sse2.build -d %name-%version/%sse2_arch
%endif

%flac.build -d %name-%version/%base_arch

%install
rm -rf $RPM_BUILD_ROOT

%ifarch amd64 sparcv9
%flac_64.install -d %name-%version/%_arch64
%endif

%if %arch_sse2
%flac_sse2.install -d %name-%version/%sse2_arch
%endif

%flac.install -d %name-%version/%base_arch

%if %can_isaexec
mkdir $RPM_BUILD_ROOT%{_bindir}/%{base_isa}
mv $RPM_BUILD_ROOT%{_bindir}/flac $RPM_BUILD_ROOT%{_bindir}/%{base_isa}
mv $RPM_BUILD_ROOT%{_bindir}/metaflac $RPM_BUILD_ROOT%{_bindir}/%{base_isa}
cd $RPM_BUILD_ROOT%{_bindir}
ln -s ../lib/isaexec flac
ln -s ../lib/isaexec metaflac
%endif

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%if %can_isaexec
%{_bindir}/%{base_isa}
%endif
%hard %{_bindir}/flac
%hard %{_bindir}/metaflac
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libFLAC.so*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_bindir}/%{_arch64}
%{_bindir}/%{_arch64}/*
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
%{_libdir}/%{_arch64}/lib*.so*
%endif
%if %arch_sse2
%dir %attr (0755, root, bin) %{_bindir}/%{sse2_arch}
%{_bindir}/%{sse2_arch}/*
%dir %attr (0755, root, bin) %{_libdir}/%{sse2_arch}
%{_libdir}/%{sse2_arch}/lib*.so*
%endif
 
%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/aclocal
%{_datadir}/aclocal/*
%dir %attr (0755, root, other) %{_datadir}/doc
%{_datadir}/doc/*
%ifarch amd64 sparcv9
%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
%{_libdir}/%{_arch64}/pkgconfig/*.pc
%endif
%if %arch_sse2
%dir %attr (0755, root, other) %{_libdir}/%{sse2_arch}/pkgconfig
%{_libdir}/%{sse2_arch}/pkgconfig/*.pc
%endif

%changelog
* Mon Mar 31 2008 - [email protected]
- Add SUNW_Copyright.
* Mon Mar 17 2008 - [email protected]
- remove line for c++ files.
* Fri Mar 14 2008 - [email protected]
- remove c++ files from the package.
* Wed Oct 10 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Wed Sep 19 2007 - [email protected]
- Add C++ libs to %files.
* Fri Jun 29 2007 - [email protected]
- remove FLAC++.so.* from file list. 
* Thu Apr 26 2007 - [email protected]
- set CXX to $CXX -norunpath because libtool swallows this option sometimes
  and leaves compiler paths in the binaries, fixes 6497744
* Thu Apr  5 2007 - [email protected]
- use hard links for isaexec now that pkgbuild 1.2.0+ supports them.
* Thu Mar 15 2007 - [email protected] and [email protected]
- enable building 64-bit and SSE2 variants
* Fri Feb 16 2007 - [email protected]
- Add %{_libdir}/pkgconfig to %files devel.
* Wed Feb 14 2007 - [email protected]
- add BuildConflicts against SFEnasm as it breaks the build
* Mon Dec 04 2006 - [email protected]
- Remove ogg flac libraries as they are no longer built.
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Thu May 04 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Fri Feb 17 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Tue Sep 13 2005 - [email protected]
- Now use flac version number.
* Fri Aug 12 2005 - [email protected]
- Initial spec-file created