OpenGrok

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