mozilla-xulrunner193/mozilla-xulrunner193.spec
changeset 78 e0271a18500f
parent 77 f2df98836e17
child 79 bc6311ee4f5e
equal deleted inserted replaced
77:f2df98836e17 78:e0271a18500f
    18 
    18 
    19 # norootforbuild
    19 # norootforbuild
    20 
    20 
    21 
    21 
    22 Name:           mozilla-xulrunner193
    22 Name:           mozilla-xulrunner193
    23 BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python startup-notification-devel zip pkg-config fdupes hunspell-devel
    23 BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python startup-notification-devel zip pkg-config fdupes hunspell-devel yasm Mesa
    24 # needed for brp-check-bytecode-version (jar, fastjar would do as well)
    24 # needed for brp-check-bytecode-version (jar, fastjar would do as well)
    25 BuildRequires:  unzip
    25 BuildRequires:  unzip
    26 %if %suse_version > 1100
    26 %if %suse_version > 1100
    27 BuildRequires:  nss-shared-helper-devel
    27 BuildRequires:  nss-shared-helper-devel
    28 %endif
    28 %endif
    44 Group:          Productivity/Other
    44 Group:          Productivity/Other
    45 Provides:       gecko193
    45 Provides:       gecko193
    46 %if %suse_version >= 1110
    46 %if %suse_version >= 1110
    47 # this is needed to match this package with the kde4 helper package without the main package
    47 # this is needed to match this package with the kde4 helper package without the main package
    48 # having a hard requirement on the kde4 package
    48 # having a hard requirement on the kde4 package
    49 %define kde_helper_version 6
    49 #%define kde_helper_version 6
    50 Provides:       mozilla-kde4-version = %{kde_helper_version}
    50 #Provides:       mozilla-kde4-version = %{kde_helper_version}
    51 %endif
    51 %endif
    52 %ifarch %ix86
    52 %ifarch %ix86
    53 Provides:       mozilla-xulrunner193-32bit = %{version}-%{release}
    53 Provides:       mozilla-xulrunner193-32bit = %{version}-%{release}
    54 %endif
    54 %endif
    55 Source:         xulrunner-source-%{version}.tar.bz2
    55 Source:         xulrunner-source-%{version}.tar.bz2
    64 Patch1:         toolkit-download-folder.patch
    64 Patch1:         toolkit-download-folder.patch
    65 Patch2:         mozilla-libproxy.patch
    65 Patch2:         mozilla-libproxy.patch
    66 Patch3:         mozilla-pkgconfig.patch
    66 Patch3:         mozilla-pkgconfig.patch
    67 Patch4:         idldir.patch
    67 Patch4:         idldir.patch
    68 Patch5:         mozilla-nongnome-proxies.patch
    68 Patch5:         mozilla-nongnome-proxies.patch
       
    69 Patch6:         mozilla-disable-javaxpcom.patch
    69 Patch7:         mozilla-prefer_plugin_pref.patch
    70 Patch7:         mozilla-prefer_plugin_pref.patch
    70 Patch8:         mozilla-shared-nss-db.patch
    71 Patch8:         mozilla-shared-nss-db.patch
    71 Patch10:        mozilla-kde.patch
    72 Patch10:        mozilla-kde.patch
    72 # PATCH-FEATURE-SLED FATE#302023, FATE#302024
    73 # PATCH-FEATURE-SLED FATE#302023, FATE#302024
    73 Patch11:        mozilla-gconf-backend.patch
    74 Patch11:        mozilla-gconf-backend.patch
    78 Requires:       mozilla-js193
    79 Requires:       mozilla-js193
    79 Requires(post):  update-alternatives coreutils
    80 Requires(post):  update-alternatives coreutils
    80 Requires(preun): update-alternatives coreutils
    81 Requires(preun): update-alternatives coreutils
    81 ### build configuration ###
    82 ### build configuration ###
    82 %define crashreporter    1
    83 %define crashreporter    1
    83 %define has_system_nspr  1
    84 # FIXME after NSPR 4.8.5
       
    85 %define has_system_nspr  0
    84 %define has_system_nss   1
    86 %define has_system_nss   1
    85 %define has_system_cairo 0
    87 %define has_system_cairo 0
    86 %define localize 1
    88 %define localize 1
    87 %if %suse_version > 1110
    89 %if %suse_version > 1110
    88 %define has_system_cairo 1
    90 %define has_system_cairo 1
   200 %patch1 -p1
   202 %patch1 -p1
   201 %patch2 -p1
   203 %patch2 -p1
   202 %patch3 -p1
   204 %patch3 -p1
   203 %patch4 -p1
   205 %patch4 -p1
   204 %patch5 -p1
   206 %patch5 -p1
       
   207 %patch6 -p1
   205 %patch7 -p1
   208 %patch7 -p1
   206 #%patch8 -p1
   209 #%patch8 -p1
   207 #%if %suse_version >= 1110
   210 #%if %suse_version >= 1110
   208 #%patch10 -p1
   211 #%patch10 -p1
   209 #%endif
   212 #%endif
   210 #%patch11 -p1
   213 #%patch11 -p1
   211 #%patch12 -p1
   214 #%patch12 -p1
   212 #%patch13 -p1
   215 #%patch13 -p1
   213 
   216 
   214 %build
   217 %build
   215 %if %suse_version >= 1110
   218 #%if %suse_version >= 1110
   216 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
   219 #kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
   217 if test "$kdehelperversion" != %{kde_helper_version}; then
   220 #if test "$kdehelperversion" != %{kde_helper_version}; then
   218   echo fix kde helper version in the .spec file
   221 #  echo fix kde helper version in the .spec file
   219   exit 1
   222 #  exit 1
   220 fi
   223 #fi
   221 %endif
   224 #%endif
   222 MOZ_APP_DIR=%{_libdir}/xulrunner-%{version_internal}
   225 MOZ_APP_DIR=%{_libdir}/xulrunner-%{version_internal}
   223 export MOZ_BUILD_DATE=%{releasedate}
   226 export MOZ_BUILD_DATE=%{releasedate}
   224 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
   227 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
   225 %ifarch ppc64
   228 %ifarch ppc64
   226 export CFLAGS="$CFLAGS -mminimal-toc"
   229 export CFLAGS="$CFLAGS -mminimal-toc"
   227 %endif
       
   228 # 10.3-x86_64 build fails probably because gcc bug
       
   229 %if %suse_version == 1030
       
   230 %ifarch x86_64
       
   231 export ac_cv_visibility_hidden="no"
       
   232 %endif
       
   233 %endif
   230 %endif
   234 export CXXFLAGS="$CFLAGS"
   231 export CXXFLAGS="$CFLAGS"
   235 export LDFLAGS="-Wl,-rpath -Wl,${MOZ_APP_DIR}"
   232 export LDFLAGS="-Wl,-rpath -Wl,${MOZ_APP_DIR}"
   236 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
   233 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
   237 export MOZILLA_OFFICIAL=1
   234 export MOZILLA_OFFICIAL=1
   265 ac_add_options --disable-installer
   262 ac_add_options --disable-installer
   266 ac_add_options --disable-updater
   263 ac_add_options --disable-updater
   267 ac_add_options --disable-javaxpcom
   264 ac_add_options --disable-javaxpcom
   268 ac_add_options --enable-startup-notification
   265 ac_add_options --enable-startup-notification
   269 ac_add_options --enable-url-classifier
   266 ac_add_options --enable-url-classifier
       
   267 ac_add_options --enable-system-hunspell
   270 #ac_add_options --enable-debug
   268 #ac_add_options --enable-debug
   271 EOF
   269 EOF
   272 %if %has_system_nspr
   270 %if %has_system_nspr
   273 cat << EOF >> $MOZCONFIG
   271 cat << EOF >> $MOZCONFIG
   274 ac_add_options --with-system-nspr
   272 ac_add_options --with-system-nspr
   282 %if %has_system_cairo
   280 %if %has_system_cairo
   283 cat << EOF >> $MOZCONFIG
   281 cat << EOF >> $MOZCONFIG
   284 ac_add_options --enable-system-cairo
   282 ac_add_options --enable-system-cairo
   285 EOF
   283 EOF
   286 %endif
   284 %endif
   287 %if %suse_version > 1030
       
   288 cat << EOF >> $MOZCONFIG
       
   289 ac_add_options --enable-system-hunspell
       
   290 EOF
       
   291 %endif
       
   292 #%if %suse_version > 1100
       
   293 #cat << EOF >> $MOZCONFIG
       
   294 #ac_add_options --enable-system-sqlite
       
   295 #EOF
       
   296 #%endif
       
   297 %if %suse_version > 1110
   285 %if %suse_version > 1110
   298 cat << EOF >> $MOZCONFIG
   286 cat << EOF >> $MOZCONFIG
   299 ac_add_options --enable-libproxy
   287 ac_add_options --enable-libproxy
   300 EOF
   288 EOF
   301 %endif
   289 %endif
   335     mozilla/toolkit/xre mozilla/nsprpub/config mozilla/tools mozilla/xpcom/build
   323     mozilla/toolkit/xre mozilla/nsprpub/config mozilla/tools mozilla/xpcom/build
   336 popd
   324 popd
   337 # XPI example
   325 # XPI example
   338 #cp -rL dist/xpi-stage/simple $RPM_BUILD_ROOT/%{_libdir}/xulrunner-%{version_internal}/
   326 #cp -rL dist/xpi-stage/simple $RPM_BUILD_ROOT/%{_libdir}/xulrunner-%{version_internal}/
   339 # preferences
   327 # preferences
   340 cp %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/greprefs/all-openSUSE.js
   328 cp %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/defaults/pref/all-openSUSE.js
   341 cp %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/greprefs/lockdown.js
   329 cp %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/defaults/pref/lockdown.js
   342 # install add-plugins.sh
   330 # install add-plugins.sh
   343 sed "s:%%PROGDIR:%{_libdir}/xulrunner-%{version_internal}:g" \
   331 sed "s:%%PROGDIR:%{_libdir}/xulrunner-%{version_internal}:g" \
   344   %{SOURCE5} > $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
   332   %{SOURCE5} > $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
   345 chmod 755 $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
   333 chmod 755 $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
   346 # 64bit classification for GRE config
   334 # 64bit classification for GRE config
   351 # ghosts
   339 # ghosts
   352 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/global.reginfo
   340 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/global.reginfo
   353 # install additional locales
   341 # install additional locales
   354 %if %localize
   342 %if %localize
   355 rm -f %{_tmppath}/translations.*
   343 rm -f %{_tmppath}/translations.*
       
   344 touch %{_tmppath}/translations.{common,other}
   356 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do
   345 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do
   357   case $locale in
   346   case $locale in
   358    ja-JP-mac|en-US)
   347    ja-JP-mac|en-US)
   359       ;;
   348       ;;
   360    *)
   349    *)
   389 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/updater
   378 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/updater
   390 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/update.locale
   379 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/update.locale
   391 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/LICENSE
   380 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/LICENSE
   392 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/README.txt
   381 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/README.txt
   393 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/dictionaries/en-US*
   382 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/dictionaries/en-US*
       
   383 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/nspr-config
   394 # autoreg
   384 # autoreg
   395 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/.autoreg
   385 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/.autoreg
   396 # fdupes
   386 # fdupes
   397 %if %suse_version > 1020
       
   398 %fdupes $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal}/
   387 %fdupes $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal}/
   399 %fdupes $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/
   388 %fdupes $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/
   400 %endif
       
   401 # create breakpad debugsymbols
   389 # create breakpad debugsymbols
   402 %if %crashreporter
   390 %if %crashreporter
   403 SYMBOLS_NAME="xulrunner-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
   391 SYMBOLS_NAME="xulrunner-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
   404 make buildsymbols \
   392 make buildsymbols \
   405   SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
   393   SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
   457 %defattr(-,root,root)
   445 %defattr(-,root,root)
   458 %dir %{_libdir}/xulrunner-%{version_internal}/
   446 %dir %{_libdir}/xulrunner-%{version_internal}/
   459 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
   447 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
   460 %dir %{_libdir}/xulrunner-%{version_internal}/dictionaries/
   448 %dir %{_libdir}/xulrunner-%{version_internal}/dictionaries/
   461 %dir %{_libdir}/xulrunner-%{version_internal}/extensions/
   449 %dir %{_libdir}/xulrunner-%{version_internal}/extensions/
   462 %{_libdir}/xulrunner-%{version_internal}/chrome/classic.*
       
   463 %{_libdir}/xulrunner-%{version_internal}/chrome/comm.*
       
   464 %{_libdir}/xulrunner-%{version_internal}/chrome/en-US.*
   450 %{_libdir}/xulrunner-%{version_internal}/chrome/en-US.*
   465 %{_libdir}/xulrunner-%{version_internal}/chrome/pippki.*
   451 %{_libdir}/xulrunner-%{version_internal}/chrome/pippki.*
   466 %{_libdir}/xulrunner-%{version_internal}/chrome/toolkit.*
   452 %{_libdir}/xulrunner-%{version_internal}/chrome/toolkit.*
   467 %{_libdir}/xulrunner-%{version_internal}/chrome/icons/
   453 %{_libdir}/xulrunner-%{version_internal}/chrome/icons/
   468 %{_libdir}/xulrunner-%{version_internal}/components/
   454 %{_libdir}/xulrunner-%{version_internal}/components/
   469 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libmozgnome.so
   455 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libmozgnome.so
   470 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libnkgnomevfs.so
   456 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libnkgnomevfs.so
   471 %{_libdir}/xulrunner-%{version_internal}/defaults/
   457 %{_libdir}/xulrunner-%{version_internal}/defaults/
   472 %dir %{_libdir}/xulrunner-%{version_internal}/greprefs/
   458 %{_libdir}/xulrunner-%{version_internal}/greprefs.js
   473 %{_libdir}/xulrunner-%{version_internal}/greprefs/all.js
       
   474 %{_libdir}/xulrunner-%{version_internal}/greprefs/security-prefs.js
       
   475 %{_libdir}/xulrunner-%{version_internal}/greprefs/xpinstall.js
       
   476 %{_libdir}/xulrunner-%{version_internal}/greprefs/all-openSUSE.js
       
   477 %{_libdir}/xulrunner-%{version_internal}/greprefs/lockdown.js
       
   478 %{_libdir}/xulrunner-%{version_internal}/icons/
   459 %{_libdir}/xulrunner-%{version_internal}/icons/
   479 %{_libdir}/xulrunner-%{version_internal}/modules/
   460 %{_libdir}/xulrunner-%{version_internal}/modules/
   480 %{_libdir}/xulrunner-%{version_internal}/plugins/
   461 %{_libdir}/xulrunner-%{version_internal}/plugins/
   481 %{_libdir}/xulrunner-%{version_internal}/res/
   462 %{_libdir}/xulrunner-%{version_internal}/res/
   482 %{_libdir}/xulrunner-%{version_internal}/*.so
   463 %{_libdir}/xulrunner-%{version_internal}/*.so