1 # 2 # spec file for package SUNWflac 3 # 4 # includes module(s): flac 5 # 6 # Copyright 2007 Sun Microsystems, Inc. 7 # This file and all modifications and additions to the pristine 8 # package are under the same license as the package itself. 9 # 10 %define owner yippi 11 # 12 13 %define build_cpp 0 14 15 %include Solaris.inc 16 %ifarch amd64 sparcv9 17 %include arch64.inc 18 %use flac_64 = flac.spec 19 %endif 20 21 %include base.inc 22 %use flac = flac.spec 23 24 Name: SUNWflac 25 Summary: Free Lossless Audio Codec 26 Version: %{flac.version} 27 Source: %{name}-manpages-0.1.tar.gz 28 SUNW_BaseDir: %{_basedir} 29 SUNW_Copyright: %{name}.copyright 30 BuildRoot: %{_tmppath}/%{name}-%{version}-build 31 32 %include default-depend.inc 33 BuildConflicts: SFEnasm 34 BuildRequires: SUNWgnome-common-devel 35 BuildRequires: SUNWogg-vorbis-devel 36 BuildRequires: SUNWlibC 37 Requires: SUNWogg-vorbis 38 Requires: SUNWlibms 39 Requires: SUNWlibC 40 41 %package devel 42 Summary: %{summary} - development files 43 SUNW_BaseDir: %{_basedir} 44 %include default-depend.inc 45 46 %prep 47 rm -rf %name-%version 48 mkdir %name-%version 49 50 %ifarch amd64 sparcv9 51 mkdir %name-%version/%_arch64 52 %flac_64.prep -d %name-%version/%_arch64 53 %endif 54 55 mkdir %name-%version/%base_arch 56 %flac.prep -d %name-%version/%base_arch 57 58 cd %{_builddir}/%name-%version 59 gzcat %SOURCE0 | tar xf - 60 61 %build 62 %if %cc_is_gcc 63 %else 64 export CXX="${CXX} -norunpath" 65 %endif 66 67 %ifarch amd64 sparcv9 68 %flac_64.build -d %name-%version/%_arch64 69 %endif 70 71 %flac.build -d %name-%version/%base_arch 72 73 %install 74 rm -rf $RPM_BUILD_ROOT 75 76 %ifarch amd64 sparcv9 77 %flac_64.install -d %name-%version/%_arch64 78 %endif 79 80 %flac.install -d %name-%version/%base_arch 81 cd %{_builddir}/%name-%version/sun-manpages 82 make install DESTDIR=$RPM_BUILD_ROOT 83 84 %if %can_isaexec 85 mkdir $RPM_BUILD_ROOT%{_bindir}/%{base_isa} 86 mv $RPM_BUILD_ROOT%{_bindir}/flac $RPM_BUILD_ROOT%{_bindir}/%{base_isa} 87 mv $RPM_BUILD_ROOT%{_bindir}/metaflac $RPM_BUILD_ROOT%{_bindir}/%{base_isa} 88 cd $RPM_BUILD_ROOT%{_bindir} 89 ln -s ../lib/isaexec flac 90 ln -s ../lib/isaexec metaflac 91 %endif 92 93 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} 94 95 %clean 96 rm -rf $RPM_BUILD_ROOT 97 98 %files 99 %defattr (-, root, bin) 100 %dir %attr (0755, root, bin) %{_bindir} 101 %if %can_isaexec 102 %{_bindir}/%{base_isa} 103 %endif 104 %hard %{_bindir}/flac 105 %hard %{_bindir}/metaflac 106 %dir %attr (0755, root, bin) %{_libdir} 107 %{_libdir}/libFLAC.so* 108 %if %build_cpp 109 %{_libdir}/libFLAC++.so* 110 %endif 111 %dir %attr (0755, root, sys) %{_datadir} 112 %doc -d %{base_arch}/flac-%{flac.version} AUTHORS README 113 %doc(bzip2) -d %{base_arch}/flac-%{flac.version} COPYING.Xiph COPYING.GPL 114 %doc(bzip2) -d %{base_arch}/flac-%{flac.version} COPYING.LGPL COPYING.FDL 115 %dir %attr (0755, root, other) %{_datadir}/doc 116 %dir %attr(0755, root, bin) %{_mandir} 117 %dir %attr(0755, root, bin) %{_mandir}/man1 118 %{_mandir}/man1/* 119 %ifarch amd64 sparcv9 120 %dir %attr (0755, root, bin) %{_bindir}/%{_arch64} 121 %{_bindir}/%{_arch64}/* 122 %dir %attr (0755, root, bin) %{_libdir}/%{_arch64} 123 %{_libdir}/%{_arch64}/lib*.so* 124 %endif 125 126 %files devel 127 %defattr (-, root, bin) 128 %dir %attr (0755, root, other) %{_libdir}/pkgconfig 129 %{_libdir}/pkgconfig/* 130 %dir %attr (0755, root, bin) %{_includedir} 131 %{_includedir}/* 132 %dir %attr (0755, root, sys) %{_datadir} 133 %dir %attr (0755, root, other) %{_datadir}/aclocal 134 %{_datadir}/aclocal/* 135 %dir %attr (0755, root, other) %{_datadir}/doc 136 %dir %attr (0755, root, other) %{_datadir}/doc/flac-1.2.1 137 %{_datadir}/doc/flac-1.2.1/* 138 %ifarch amd64 sparcv9 139 %dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig 140 %{_libdir}/%{_arch64}/pkgconfig/*.pc 141 %endif 142 %dir %attr (0755, root, bin) %{_mandir} 143 %dir %attr (0755, root, bin) %{_mandir}/man3 144 %{_mandir}/man3/* 145 146 %changelog 147 * Add build_cpp define so that you can more easily build with the C++ 148 interfaces if you want. By default this is off, which is the current 149 way FLAC is shipped. 150 * Thu Feb 19 2009 - brian.cameron@sun.com 151 - Remove compiling with -xarch=sse2. Installing sse2 code to pentium+mmx 152 is problematic since pentium+mmx isn't guaranteed to support SSE2. 153 So removing this optimization for now. 154 * Fri Sep 12 2008 - brian.cameron (at] sun.com 155 - Add new copyright files. 156 * Mon Mar 31 2008 - brian.cameron (at] sun.com 157 - Add SUNW_Copyright. 158 * Mon Mar 17 2008 - irene.huang (at] sun.com 159 - remove line for c++ files. 160 * Fri Mar 14 2008 - irene.huang (at] sun.com 161 - remove c++ files from the package. 162 * Wed Oct 10 2006 - damien.carbery (at] sun.com 163 - Update Build/Requires after running check-deps.pl script. 164 * Wed Sep 19 2007 - damien.carbery (at] sun.com 165 - Add C++ libs to %files. 166 * Fri Jun 29 2007 - irene.huang (at] sun.com 167 - remove FLAC++.so.* from file list. 168 * Thu Apr 26 2007 - laca (at] sun.com 169 - set CXX to $CXX -norunpath because libtool swallows this option sometimes 170 and leaves compiler paths in the binaries, fixes 6497744 171 * Thu Apr 5 2007 - laca (at] sun.com 172 - use hard links for isaexec now that pkgbuild 1.2.0+ supports them. 173 * Thu Mar 15 2007 - dougs (at] truemail.co.th and laca (at] sun.com 174 - enable building 64-bit and SSE2 variants 175 * Fri Feb 16 2007 - damien.carbery (at] sun.com 176 - Add %{_libdir}/pkgconfig to %files devel. 177 * Wed Feb 14 2007 - laca (at] sun.com 178 - add BuildConflicts against SFEnasm as it breaks the build 179 * Mon Dec 04 2006 - damien.carbery (at] sun.com 180 - Remove ogg flac libraries as they are no longer built. 181 * Sun Jun 11 2006 - laca (at] sun.com 182 - change group from other to bin/sys 183 * Thu May 04 2006 - laca (at] sun.com 184 - merge -share pkg(s) into the base pkg(s) 185 * Fri Feb 17 2006 - damien.carbery (at] sun.com 186 - Update Build/Requires after running check-deps.pl script. 187 * Tue Sep 13 2005 - brian.cameron (at] sun.com 188 - Now use flac version number. 189 * Fri Aug 12 2005 - balamurali.viswanathan (at] wipro.com 190 - Initial spec-file created 191