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