Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWsongbird
      3 #
      4 # includes module(s): songbird
      5 #
      6 # Copyright 2008 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 jouby 
     11 #
     12 
     13 %include Solaris.inc
     14 
     15 %define OSR 10735:1.x
     16 
     17 %if %option_with_debug
     18 %define build_type debug
     19 %else
     20 %define build_type release
     21 %endif
     22 
     23 Name:          SUNWsongbird
     24 Summary:       The desktop media player mashed-up with the Web.
     25 Version:       1.2.0
     26 Source:        http://download.songbirdnest.com/source/Songbird%{version}-1146.tar.bz2
     27 Source1:       http://download.songbirdnest.com/source/Songbird%{version}-1146-vendor.tar.bz2
     28 Source2:       %{name}-manpages-0.1.tar.gz
     29 
     30 %if %option_without_moz_nss_nspr
     31 Source3:       nspr-nss-config
     32 %endif
     33 
     34 # owner:alfred date:2009-03-31 type:branding
     35 # The patch will be removed when the apache C++ standard library is integrated.
     36 Patch1:        songbird-01-cpp-template.diff
     37 # owner:alfred date:2008-07-16 type:bug
     38 # bugzilla.songbirdnest.com 7800. The patch was backed out as it breaks Windows build.
     39 Patch2:        songbird-02-taglib.diff
     40 # owner:ginnchen date:2008-06-25 type:bug
     41 # bugzilla.mozilla.org 440714
     42 Patch3:        songbird-03-remap-pixman-functions.diff
     43 # owner:alfred date:2009-01-07 type:branding
     44 Patch4:        songbird-04-startup-script.diff
     45 # owner:alfred date:2009-03-31 type:bug
     46 # bugzilla.songbirdnest.com 16898
     47 Patch5:        songbird-05-build.diff
     48 # owner:ginnchen date:2008-09-08 type:bug
     49 # bugster:6724471 bugzilla:451007
     50 Patch6: songbird-06-donot-delay-stopping-realplayer.diff
     51 # owner:alfred date:2009-06-10 type:bug bugzilla:478843 state:upstream
     52 Patch7: songbird-07-xulrunner-elif.diff
     53 # owner:ginnchen date:2009-01-15 type:bug
     54 # bugzilla.mozilla.org 455670
     55 Patch8: songbird-08-runpath.diff
     56 
     57 %if %option_without_moz_nss_nspr
     58 # owner:ginnchen date:2009-05-21 type:branding
     59 Patch9: songbird-09-system-nss-nspr.diff
     60 %endif
     61 
     62 # owner:hawklu date:2009-10-23 type:bug d.o.o 12202
     63 Patch10: songbird-10-moz-nss-nspr.diff
     64 
     65 # owner:hawklu date:2009-10-23 type:bug d.o.o 12038
     66 Patch11: songbird-11-use-sun-cc.diff
     67 
     68 # owner:hawklu date:2009-10-30 type:bug d.o.o 12317 
     69 Patch12: songbird-12-using-bash.diff
     70 
     71 URL:           http://www.songbirdnest.com/
     72 SUNW_BaseDir:  %{_basedir}
     73 SUNW_Copyright: %{name}.copyright
     74 BuildRoot:     %{_tmppath}/%{name}-%{version}-build
     75 
     76 #####################################
     77 ##  Package Requirements Section   ##
     78 #####################################
     79 
     80 %include default-depend.inc
     81 Requires: SUNWgtk2
     82 Requires: SUNWfontconfig
     83 Requires: SUNWfreetype2
     84 Requires: SUNWgnome-config
     85 Requires: SUNWgnome-libs
     86 Requires: SUNWgnome-media
     87 Requires: SUNWgnome-vfs
     88 Requires: SUNWlibC
     89 Requires: SUNWlibms
     90 Requires: SUNWlibmsr
     91 Requires: SUNWsqlite3
     92 Requires: SUNWjpg
     93 Requires: SUNWpng
     94 Requires: SUNWmlib
     95 Requires: SUNWzlib
     96 %if %option_without_moz_nss_nspr
     97 Requires: SUNWpr
     98 %endif
     99 BuildRequires: SUNWgtk2-devel
    100 
    101 # Songbird depends on Firefox's plugins.
    102 Requires: SUNWfirefox
    103 
    104 BuildRequires: SUNWgnome-media-devel
    105 BuildRequires: SUNWgnome-config-devel
    106 BuildRequires: SUNWgnome-libs-devel
    107 BuildRequires: SUNWgnome-vfs-devel
    108 BuildRequires: SUNWgnome-component-devel
    109 BuildRequires: SUNWbzip
    110 BuildRequires: SUNWgtar
    111 BuildRequires: SUNWcmake
    112 
    113 %description
    114 Songbird is a free software media player and web browser, designed to
    115 catalyze and champion a diverse, open Media Web.
    116 
    117 %prep
    118 %setup -q -n %name-%version -c -a1
    119 
    120 rm -rf Songbird%{version}/dependencies/vendor
    121 mv Songbird%{version}-vendor Songbird%{version}/dependencies/vendor
    122 
    123 mkdir -p build/checkout/solaris-%{base_arch}
    124 mkdir -p build/solaris-%{base_arch}
    125 
    126 cd Songbird%{version}
    127 %patch1 -p1
    128 %patch2 -p1
    129 %patch4 -p1
    130 %patch5 -p1
    131 %patch11 -p1
    132 %patch12 -p1
    133 
    134 gzcat %SOURCE2 | tar xf -
    135 cd dependencies/vendor/xulrunner/mozilla
    136 %patch3 -p1
    137 %patch6 -p1
    138 %patch7 -p1
    139 %patch8 -p1
    140 %if %option_without_moz_nss_nspr
    141 %patch9 -p1
    142 %endif
    143 %patch10 -p1
    144 
    145 %build
    146 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
    147 if test "x$CPUS" = "x" -o $CPUS = 0; then
    148   CPUS=1
    149 fi
    150 
    151 # Build the vendor library (taglib)
    152 export LDFLAGS="-norunpath"
    153 cd Songbird%{version}/dependencies/vendor/taglib
    154 export SB_VENDOR_BUILD_ROOT=%{_builddir}/%name-%version/build
    155 /usr/gnu/bin/make -f Makefile.songbird %{build_type}
    156 cd ../../../../
    157 
    158 # Move compiled taglib into the dependecies area
    159 cd build/solaris-%{base_arch}
    160 mkdir ../../Songbird%{version}/dependencies/solaris-%{base_arch}
    161 mv taglib ../../Songbird%{version}/dependencies/solaris-%{base_arch}
    162 cd ../../Songbird%{version}
    163 
    164 LDFLAGS="-norunpath -z ignore -R'\$\$ORIGIN:\$\$ORIGIN/..'"
    165 export LDFLAGS
    166 
    167 export CFLAGS="-xlibmil"
    168 export CXXFLAGS="-D__FUNCTION__=__func__ -xlibmil -xlibmopt -features=tmplife,extensions -lCrun -lCstd"
    169 %if %option_with_debug
    170 %else
    171 %ifarch sparc
    172 export CFLAGS="$CFLAGS -xO5"
    173 export CXXFLAGS="$CXXFLAGS -xO5"
    174 %else
    175 export CFLAGS="$CFLAGS -xO4"
    176 export CXXFLAGS="$CXXFLAGS -xO4"
    177 %endif
    178 %endif
    179 
    180 cd dependencies/vendor/xulrunner/mozilla
    181 # Build XULRunner
    182 cat << "EOF" > .mozconfig
    183 MOZILLA_OFFICIAL=1
    184 export MOZILLA_OFFICIAL
    185 
    186 BUILD_OFFICIAL=1
    187 export BUILD_OFFICIAL
    188 
    189 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/compiled/xulrunner
    190 ac_add_options --prefix=%{_prefix}
    191 ac_add_options --libdir=%{_libdir}
    192 ac_add_options --mandir=%{_mandir}
    193 ac_add_options --enable-application=xulrunner
    194 ac_add_options --with-xulrunner-stub-name=songbird-bin
    195 %if %option_with_debug
    196 ac_add_options --enable-debug
    197 ac_add_options --disable-optimize
    198 %else
    199 ac_add_options --enable-optimize
    200 ac_add_options --disable-debug
    201 %endif
    202 ac_add_options --disable-tests
    203 ac_add_options --disable-auto-deps
    204 ac_add_options --disable-crashreporter
    205 ac_add_options --disable-javaxpcom
    206 ac_add_options --disable-updater
    207 ac_add_options --enable-dtrace
    208 ac_add_options --enable-system-cairo
    209 %if %option_without_moz_nss_nspr
    210 ac_add_options --with-system-nspr
    211 ac_add_options --with-system-nss
    212 %endif
    213 ac_add_options --enable-system-sqlite
    214 ac_add_options --with-system-jpeg
    215 ac_add_options --disable-installer
    216 ac_add_options --enable-extensions=default,inspector,venkman
    217 ac_add_options --enable-jemalloc
    218 
    219 mk_add_options BUILD_OFFICIAL=1
    220 mk_add_options MOZILLA_OFFICIAL=1
    221 mk_add_options MOZ_DEBUG_SYMBOLS=1
    222 EOF
    223 
    224 mkdir -p compiled/xulrunner
    225 
    226 %if %option_without_moz_nss_nspr
    227 cp %{SOURCE3} compiled/xulrunner
    228 chmod +x compiled/xulrunner/nspr-nss-config
    229 export NSPR_CONFIG=$PWD/compiled/xulrunner/nspr-nss-config\ nspr
    230 export NSS_CONFIG=$PWD/compiled/xulrunner/nspr-nss-config\ nss
    231 %endif
    232 
    233 make -f client.mk build_all
    234 
    235 # Package XULRunner
    236 cd ../../../..
    237 
    238 mkdir -p dependencies/solaris-%{base_arch}/mozilla/%build_type
    239 mkdir -p dependencies/solaris-%{base_arch}/xulrunner/%build_type
    240 
    241 cd tools/scripts
    242 ./make-mozilla-sdk.sh ../../dependencies/vendor/xulrunner/mozilla ../../dependencies/vendor/xulrunner/mozilla/compiled/xulrunner ../../dependencies/solaris-%{base_arch}/mozilla/%build_type
    243 ./make-xulrunner-tarball.sh ../../dependencies/vendor/xulrunner/mozilla/compiled/xulrunner/dist/bin ../../dependencies/solaris-%{base_arch}/xulrunner/%build_type xulrunner.tar.gz
    244 
    245 cd ../../
    246 echo ac_add_options --with-media-core=gstreamer-system > songbird.config
    247 echo ac_add_options --enable-breakpad=no >> songbird.config
    248 
    249 export SB_ENABLE_MOZBROWSER_CHECK=
    250 export SB_DISABLE_DEPENDENT_PKG_MGMT=1
    251 
    252 # Build Songbird
    253 %if %option_with_debug
    254 %else
    255 export SB_ENABLE_INSTALLER=1
    256 export SONGBIRD_OFFICIAL=1
    257 %endif
    258 
    259 export LDFLAGS="$LDFLAGS -R'\$\$ORIGIN/../xulrunner'"
    260 
    261 %if %option_without_moz_nss_nspr
    262 export CFLAGS="$CFLAGS -I%{_includedir}/mps"
    263 export CXXFLAGS="$CXXFLAGS -I%{_includedir}/mps"
    264 export LDFLAGS="$LDFLAGS -L%{_libdir}/mps -R%{_libdir}/mps"
    265 %endif
    266 
    267 export SB_ENABLE_JARS=1
    268 export LD=CC
    269 export PATH=/usr/gnu/bin:$PATH
    270 
    271 %if %option_with_debug
    272 make -f songbird.mk debug
    273 cp ./app/branding/songbird-512.png compiled/dist
    274 %else
    275 make -f songbird.mk
    276 %endif
    277 
    278 %install
    279 rm -rf $RPM_BUILD_ROOT
    280 
    281 cd %{_builddir}/%name-%version/Songbird%{version}/compiled
    282 mkdir -p $RPM_BUILD_ROOT%{_libdir}
    283 mkdir -p $RPM_BUILD_ROOT%{_bindir}
    284 mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
    285 mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
    286 cp -R dist $RPM_BUILD_ROOT%{_libdir}/songbird
    287 
    288 # Remove unnecessary libraries/tools
    289 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/libjemalloc.so
    290 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/mangle
    291 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/mozilla-xremote-client
    292 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/nsinstall
    293 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/regxpcom
    294 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/shlibsign
    295 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/ssltunnel
    296 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/updater.ini
    297 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/xp*
    298 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner/xulrunner*
    299 rm -rf $RPM_BUILD_ROOT%{_libdir}/xulrunner/plugins
    300 
    301 # Make use of Firefox's plugins
    302 rmdir $RPM_BUILD_ROOT%{_libdir}/songbird/plugins
    303 ln -s ../firefox/plugins $RPM_BUILD_ROOT%{_libdir}/songbird/
    304 
    305 mv $RPM_BUILD_ROOT%{_libdir}/songbird/songbird-512.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
    306 mv $RPM_BUILD_ROOT%{_libdir}/songbird/songbird.desktop $RPM_BUILD_ROOT%{_datadir}/applications
    307 ln -s ../lib/songbird/songbird $RPM_BUILD_ROOT%{_bindir}/songbird
    308 
    309 #install man page
    310 rm -rf $RPM_BUILD_ROOT%{_mandir}
    311 cd %{_builddir}/%name-%version/Songbird%{version}/sun-manpages
    312 make install DESTDIR=$RPM_BUILD_ROOT
    313 
    314 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
    315 
    316 %clean
    317 rm -rf $RPM_BUILD_ROOT
    318 
    319 %files 
    320 %doc(bzip2) -d Songbird%{version} LICENSE
    321 %dir %attr (0755, root, other) %{_datadir}/doc
    322 %defattr(-, root, bin)
    323 %dir %attr (0755, root, bin) %{_bindir}
    324 %{_bindir}/songbird
    325 %dir %attr (0755, root, bin) %{_libdir}
    326 %{_libdir}/songbird
    327 %dir %attr (0755, root, sys) %{_datadir}
    328 %dir %attr (0755, root, other) %{_datadir}/applications
    329 %{_datadir}/applications/songbird.desktop
    330 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    331 %{_datadir}/pixmaps/*.png
    332 %dir %attr (0755, root, bin) %{_mandir}/man1
    333 %{_mandir}/man1/*
    334 
    335 %changelog
    336 * Fri Oct 30 2009 - brian.lu@sun.com
    337 - Add patch songbird-12-using-bash.diff
    338 * Fri Oct 23 2009 - brian.lu@sun.com
    339 - Add patch songbird-10-moz-nss-nspr.diff and songbird-11-use-sun-cc.diff 
    340 * Fri Aug 28 2009 - yuntong.jin@sun.com
    341 - Change owner to jouby
    342 * Thu Jul 30 2009 - alfred.peng@sun.com
    343 - Fix for packaging (songbird-512.png).
    344 * Mon Jul 27 2009 - alfred.peng@sun.com
    345 - Use GNU make to build the vendor library and enable system sqlite.
    346   Fix d.o.o bug #10284 for the missing image.
    347 * Wed Jul 01 2009 - alfred.peng@sun.com
    348 - Update to include $ORIGIN/../xulrunner to Songbird runtime path.
    349 * Tue Jun 23 2009 - alfred.peng@sun.com
    350 - Bump to 1.2.0. Rework build.diff to fix the 1.2.0 build failure.
    351 * Tue Jun 02 2009 - alfred.peng@sun.com
    352 - Bump to 1.1.2.
    353   Use system NSS NSPR libraries by default (from firefox.spec by Ginn Chen).
    354   Remove patch system-sqlite.diff and wait for the system sqlite to upgrade.
    355   Add patch xulrunner-elif.diff for bugzilla #478843.
    356 * Tue Mar 31 2009 - alfred.peng@sun.com
    357 - Bump to 1.1.1 and fix bugster CR#6819948.
    358   Remove patches: songbird-01-taglib-build.diff, songbird-05-1.0.0-build.diff.
    359   Add patches: songbird-01-cpp-template.diff, songbird-05-1.0.0-build.diff.
    360 * Thu Jan 15 2009 - alfred.peng@sun.com
    361 - Fix the RPATH and RUNPATH for XULRunner.
    362   bugster bug: 6786843. 
    363 * Wed Jan 07 2009 - alfred.peng@sun.com
    364 - Bump to 1.0.0.
    365   Update source tarball links and depend on SUNWcmake.
    366   Enable system cairo and sqlite, build taglib with the new build script.
    367   Remove patches: menu-item.diff, system-zlib-for-taglib.diff and
    368   build-system.diff. Add patches: taglib-build.diff, startup-script.diff,
    369   1.0.0-build.diff and system-sqlite.diff.
    370   Create link to Firefox's plugins directory to share all the plugins.
    371   Fix certificate authority issue. d.o.o bugzilla #4576.
    372 * Fri Sep 19 2008 - alfred.peng (at] sun.com
    373 - Add option to LDFLAGS to avoid redundant RPATH and RUNPATH.
    374   bugster bug: 6748456.
    375 * Fri Sep 12 2008 - alfred.peng (at] sun.com
    376 - Add %doc to %files for new copyright.
    377 * Mon Sep 08 2008 - alfred.peng (at] sun.com
    378 - remove unnecessary patch songbird-06-no-nss-nspr.diff.
    379   copy ginn's gecko patch songbird-06-donot-delay-stopping-realplayer.diff
    380   from Firefox to fix realplayer plugin issue.
    381 * Mon Sep 08 2008 - alfred.peng@sun.com
    382 - add patch songbird-06-no-nss-nspr.diff to make Songbird use Firefox's
    383   nss/nspr.
    384 * Fri Aug 22 2008 - alfred.peng (at] sun.com
    385 - bump to 0.7.0.
    386   add new patch songbird-05-build-system.diff.
    387   update patch songbird-03-remap-pixman-functions.diff.
    388 * Wed Aug 20 2008 - alfred.peng (at] sun.com
    389 - add new manpage into the package.
    390   replace %debug_build with pre-defined %option_with_debug.
    391   sync songbird-01-menu-item.diff with the up-streamed one.
    392 * Mon Aug 11 2008 - alfred.peng (at] sun.com
    393 - update the link to source tarball.
    394   add the placeholder for Songbird's copyright.
    395 * Sat Jul 26 2008 - alfred.peng@sun.com
    396 - bump to 0.6.1.
    397   add Package Requirements Section.
    398   add patch songbird-03-remap-pixman-functions.diff to fix songbird crash.
    399   add patch songbird-04-system-zlib-for-taglib.diff to build taglib with
    400   system zlib.
    401 * Wed Jun 18 2008 - trisk@acm.jhu.edu
    402 - Merge with alfred's SFEsongbird-06.spec (yay 0.6)
    403 * Fri May 09 2008 - stevel (at] opensolaris.org
    404 - cmake is needed for building taglib
    405 - gawk is needed for building Songbird
    406 * Mon Apr 21 2008 - alfred.peng (at] sun.com
    407 - add support for SPARC platform.
    408 * Sun Apr 13 2008 - alfred.peng (at] sun.com
    409 - add option --without-vendor-binary. use the vendor binary by default
    410   to speed the build process.
    411 * Thu Apr 10 2008 - alfred.peng (at] sun.com
    412 - created
    413 
    414