mozilla-xulrunner22/mozilla-xulrunner20.spec
changeset 250 51fbca12da9a
parent 249 7298a2e37ba3
child 251 4c9ebbedd59c
equal deleted inserted replaced
249:7298a2e37ba3 250:51fbca12da9a
     1 #
       
     2 # spec file for package mozilla-xulrunner20
       
     3 #
       
     4 # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
       
     5 #               2006-2011 Wolfgang Rosenauer
       
     6 #
       
     7 # All modifications and additions to the file contributed by third parties
       
     8 # remain the property of their copyright owners, unless otherwise agreed
       
     9 # upon. The license for this file, and modifications and additions to the
       
    10 # file, is the same license as for the pristine package itself (unless the
       
    11 # license for the pristine package is not an Open Source License, in which
       
    12 # case the license is the MIT License). An "Open Source License" is a
       
    13 # license that conforms to the Open Source Definition (Version 1.9)
       
    14 # published by the Open Source Initiative.
       
    15 
       
    16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
       
    17 #
       
    18 
       
    19 # norootforbuild
       
    20 
       
    21 
       
    22 Name:           mozilla-xulrunner20
       
    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-devel nss-shared-helper-devel
       
    24 # needed for brp-check-bytecode-version (jar, fastjar would do as well)
       
    25 BuildRequires:  unzip
       
    26 %if %suse_version > 1110
       
    27 BuildRequires:  libiw-devel
       
    28 BuildRequires:  libproxy-devel
       
    29 %else
       
    30 BuildRequires:  wireless-tools
       
    31 %endif
       
    32 License:        MPLv1.1 or GPLv2+ or LGPLv2+
       
    33 Version:        2.0.0
       
    34 Release:        1
       
    35 %define         releasedate 2011031700
       
    36 %define         version_internal 2.0.0
       
    37 %define         apiversion 2.0
       
    38 %define         uaweight 200000
       
    39 Summary:        Mozilla Runtime Environment 2.0
       
    40 Url:            http://www.mozilla.org
       
    41 Group:          Productivity/Other
       
    42 Provides:       gecko20
       
    43 # this is needed to match this package with the kde4 helper package without the main package
       
    44 # having a hard requirement on the kde4 package
       
    45 %define kde_helper_version 6
       
    46 Provides:       mozilla-kde4-version = %{kde_helper_version}
       
    47 %ifarch %ix86
       
    48 Provides:       mozilla-xulrunner20-32bit = %{version}-%{release}
       
    49 %endif
       
    50 Source:         xulrunner-source-%{version}.tar.bz2
       
    51 Source1:        l10n-%{version}.tar.bz2
       
    52 Source2:        find-external-requires.sh
       
    53 Source3:        %{name}-rpmlintrc
       
    54 Source4:        xulrunner-openSUSE-prefs.js
       
    55 Source5:        add-plugins.sh.in
       
    56 Source6:        create-tar.sh
       
    57 Source7:        baselibs.conf
       
    58 Source8:        toolkit-lockdown.js
       
    59 Source9:        compare-locales.tar.bz2
       
    60 Patch1:         toolkit-download-folder.patch
       
    61 Patch2:         mozilla-pkgconfig.patch
       
    62 Patch3:         idldir.patch
       
    63 Patch4:         mozilla-nongnome-proxies.patch
       
    64 Patch5:         mozilla-prefer_plugin_pref.patch
       
    65 Patch6:         mozilla-shared-nss-db.patch
       
    66 Patch7:         mozilla-kde.patch
       
    67 Patch8:         mozilla-cairo-lcd.patch
       
    68 # PATCH-FEATURE-SLED FATE#302023, FATE#302024
       
    69 Patch9:         mozilla-gconf-backend.patch
       
    70 Patch10:         gecko-lockdown.patch
       
    71 Patch11:        toolkit-ui-lockdown.patch
       
    72 # ---
       
    73 Patch12:        mozilla-cpuid.patch
       
    74 Patch13:        mozilla-language.patch
       
    75 Patch14:        mozilla-gio.patch
       
    76 Patch15:        mozilla-cairo-return.patch
       
    77 Patch16:        mozilla-ntlm-full-path.patch
       
    78 Patch17:        mozilla-gecko-version.patch
       
    79 Patch18:        mozilla-gcc46.patch
       
    80 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
       
    81 Requires:       mozilla-js20 = %{version}
       
    82 Requires(post):  update-alternatives coreutils
       
    83 Requires(preun): update-alternatives coreutils
       
    84 ### build configuration ###
       
    85 %define has_system_nspr  1
       
    86 %define has_system_nss   1
       
    87 %define has_system_cairo 0
       
    88 %define localize 1
       
    89 %ifarch ppc ppc64 s390 s390x ia64
       
    90 %define crashreporter    0
       
    91 %define plugincontainer  0
       
    92 %else
       
    93 %define crashreporter    1
       
    94 %define plugincontainer  1
       
    95 %endif
       
    96 ### configuration end ###
       
    97 %define _use_internal_dependency_generator 0
       
    98 %define __find_requires sh %{SOURCE2}
       
    99 %global provfind sh -c "grep -Ev 'mozsqlite3|dbusservice|unixprint' | %__find_provides"
       
   100 %global __find_provides %provfind
       
   101 %if %has_system_nspr
       
   102 BuildRequires:  mozilla-nspr-devel
       
   103 Requires:       mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
       
   104 %endif
       
   105 %if %has_system_nss
       
   106 BuildRequires:  mozilla-nss-devel >= 3.12.8
       
   107 Requires:       mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
       
   108 %endif
       
   109 Recommends:     %{name}-gnome
       
   110 
       
   111 %description
       
   112 XULRunner is a single installable package that can be used to bootstrap
       
   113 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   114 Thunderbird.
       
   115 
       
   116 
       
   117 %package -n mozilla-js20
       
   118 License:        MPLv1.1 or GPLv2+ or LGPLv2+
       
   119 Summary:        Mozilla JS 1.8.5 engine
       
   120 Group:          Productivity/Other
       
   121 
       
   122 %description -n mozilla-js20
       
   123 JavaScript is the Netscape-developed object scripting language used in millions
       
   124 of web pages and server applications worldwide. Netscape's JavaScript is a
       
   125 superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
       
   126 with only mild differences from the published standard.
       
   127 
       
   128 
       
   129 %package devel
       
   130 License:        MPLv1.1 or GPLv2+ or LGPLv2+
       
   131 Summary:        XULRunner/Gecko SDK 2.0
       
   132 Group:          Development/Libraries/Other
       
   133 %if %has_system_nspr
       
   134 Requires:       mozilla-nspr-devel >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr-devel)
       
   135 %endif
       
   136 %if %has_system_nss
       
   137 Requires:       mozilla-nss-devel >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss-devel)
       
   138 %endif
       
   139 Requires:       %{name} = %{version}
       
   140 
       
   141 %description devel
       
   142 Software Development Kit to embed XUL or Gecko into other applications.
       
   143 
       
   144 %if %localize
       
   145 
       
   146 %package translations-common
       
   147 License:        MPLv1.1 or GPLv2+ or LGPLv2+
       
   148 Summary:        Common translations for XULRunner 2.0
       
   149 Group:          System/Localization
       
   150 Requires:       %{name} = %{version}
       
   151 Provides:       locale(%{name}:ar;ca;cs;da;de;en_GB;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW)
       
   152 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   153 
       
   154 %description translations-common
       
   155 XULRunner is a single installable package that can be used to bootstrap
       
   156 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   157 Thunderbird.
       
   158 
       
   159 This package contains the most common languages but en-US which is
       
   160 delivered in the main package.
       
   161 
       
   162 
       
   163 %package translations-other
       
   164 License:        MPLv1.1 or GPLv2+ or LGPLv2+
       
   165 Summary:        Extra translations for XULRunner 2.0
       
   166 Group:          System/Localization
       
   167 Requires:       %{name} = %{version}
       
   168 Provides:       locale(%{name}:af;ak;ast;be;bg;bn_BD;br;bs;cy;el;en_ZA;eo;es_MX;et;eu;fa;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;kn;ku;lg;lt;lv;mai;mk;ml;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;ta_LK;te;th;tr;uk;zu)
       
   169 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   170 
       
   171 %description translations-other
       
   172 XULRunner is a single installable package that can be used to bootstrap
       
   173 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   174 Thunderbird.
       
   175 
       
   176 This package contains rarely used languages.
       
   177 %endif
       
   178 
       
   179 %package gnome
       
   180 License:        MPLv1.1 or GPLv2+ or LGPLv2+
       
   181 Summary:        XULRunner components depending on gnome-vfs
       
   182 Group:          Productivity/Other
       
   183 Requires:       %{name} = %{version}-%{release}
       
   184 Requires(post): coreutils
       
   185 
       
   186 %description gnome
       
   187 This subpackage contains the Gnome components which rely on certain
       
   188 Gnome subsystems to be installed. They are recommended for full
       
   189 desktop integration but not mandatory for small disk footprint
       
   190 KDE installations for example.
       
   191 
       
   192 
       
   193 %if %crashreporter
       
   194 %package buildsymbols
       
   195 License:        MPLv1.1 or GPLv2+ or LGPLv2+
       
   196 Summary:        Breakpad buildsymbols for %{name}
       
   197 Group:          Development/Debug
       
   198 
       
   199 %description buildsymbols
       
   200 This subpackage contains the Breakpad created and compatible debugging
       
   201 symbols meant for upload to Mozilla's crash collector database.
       
   202 %endif
       
   203 
       
   204 %prep
       
   205 %setup -n mozilla -q -b 1 -b 9
       
   206 %patch1 -p1
       
   207 %patch2 -p1
       
   208 %patch3 -p1
       
   209 %patch4 -p1
       
   210 %patch5 -p1
       
   211 %patch6 -p1
       
   212 %patch7 -p1
       
   213 %patch8 -p1
       
   214 #%patch9 -p1
       
   215 #%patch10 -p1
       
   216 #%patch11 -p1
       
   217 %if %suse_version < 1120
       
   218 #%patch12 -p1
       
   219 %endif
       
   220 %patch13 -p1
       
   221 %patch14 -p1
       
   222 %patch15 -p1
       
   223 %patch16 -p1
       
   224 %patch17 -p1
       
   225 %patch18 -p1
       
   226 
       
   227 %build
       
   228 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
       
   229 if test "$kdehelperversion" != %{kde_helper_version}; then
       
   230   echo fix kde helper version in the .spec file
       
   231   exit 1
       
   232 fi
       
   233 source other-licenses/branding/firefox/configure.sh
       
   234 unset MOZ_APP_DISPLAYNAME
       
   235 export MOZ_UA_BUILDID
       
   236 MOZ_APP_DIR=%{_libdir}/xulrunner-%{version_internal}
       
   237 export MOZ_BUILD_DATE=%{releasedate}
       
   238 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
       
   239 %ifarch ppc64
       
   240 export CFLAGS="$CFLAGS -mminimal-toc"
       
   241 %endif
       
   242 export CXXFLAGS="$CFLAGS"
       
   243 export LDFLAGS="-Wl,-rpath -Wl,${MOZ_APP_DIR}"
       
   244 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
       
   245 export MOZILLA_OFFICIAL=1
       
   246 export BUILD_OFFICIAL=1
       
   247 export MOZ_MILESTONE_RELEASE=1
       
   248 #
       
   249 cat << EOF > $MOZCONFIG
       
   250 mk_add_options MOZILLA_OFFICIAL=1
       
   251 mk_add_options BUILD_OFFICIAL=1
       
   252 mk_add_options MOZ_MILESTONE_RELEASE=1
       
   253 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
       
   254 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
       
   255 . \$topsrcdir/xulrunner/config/mozconfig
       
   256 ac_add_options --prefix=%{_prefix}
       
   257 ac_add_options --libdir=%{_libdir}
       
   258 ac_add_options --sysconfdir=%{_sysconfdir}
       
   259 ac_add_options --mandir=%{_mandir}
       
   260 ac_add_options --includedir=%{_includedir}
       
   261 ac_add_options --enable-optimize
       
   262 ac_add_options --enable-extensions=default
       
   263 ac_add_options --with-system-jpeg
       
   264 #ac_add_options --with-system-png # no APNG support
       
   265 ac_add_options --with-system-zlib
       
   266 ac_add_options --with-l10n-base=../l10n
       
   267 ac_add_options --disable-tests
       
   268 ac_add_options --disable-mochitest
       
   269 ac_add_options --disable-installer
       
   270 ac_add_options --disable-updater
       
   271 ac_add_options --disable-javaxpcom
       
   272 ac_add_options --enable-startup-notification
       
   273 ac_add_options --enable-url-classifier
       
   274 ac_add_options --enable-system-hunspell
       
   275 ac_add_options --enable-shared-js
       
   276 #ac_add_options --enable-debug
       
   277 EOF
       
   278 %if %suse_version > 1130
       
   279 cat << EOF >> $MOZCONFIG
       
   280 ac_add_options --disable-gnomevfs
       
   281 ac_add_options --enable-gio
       
   282 EOF
       
   283 %endif
       
   284 %if %has_system_nspr
       
   285 cat << EOF >> $MOZCONFIG
       
   286 ac_add_options --with-system-nspr
       
   287 EOF
       
   288 %endif
       
   289 %if %has_system_nss
       
   290 cat << EOF >> $MOZCONFIG
       
   291 ac_add_options --with-system-nss
       
   292 EOF
       
   293 %endif
       
   294 %if %has_system_cairo
       
   295 cat << EOF >> $MOZCONFIG
       
   296 ac_add_options --enable-system-cairo
       
   297 EOF
       
   298 %endif
       
   299 %if %suse_version > 1110
       
   300 cat << EOF >> $MOZCONFIG
       
   301 ac_add_options --enable-libproxy
       
   302 EOF
       
   303 %endif
       
   304 %if ! %crashreporter
       
   305 cat << EOF >> $MOZCONFIG
       
   306 ac_add_options --disable-crashreporter
       
   307 EOF
       
   308 %endif
       
   309 %if ! %plugincontainer
       
   310 cat << EOF >> $MOZCONFIG
       
   311 # Chromium IPC is not ported to Power,S/390 and Itanium (currently just x86,x86_64 and arm)
       
   312 ac_add_options --disable-ipc
       
   313 EOF
       
   314 %endif
       
   315 make -f client.mk build
       
   316 
       
   317 %install
       
   318 cd ../obj
       
   319 %makeinstall STRIP=/bin/true
       
   320 # remove some executable permissions
       
   321 find $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal} \
       
   322      -type f -perm -111 -exec chmod a-x {} \;
       
   323 find $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/ \
       
   324      -name "*.js" -o -name "*.xpm" -o -name "*.png" | xargs chmod a-x
       
   325 mkdir -p $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions
       
   326 # fixing SDK dynamic libs (symlink instead of copy)
       
   327 rm $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/*.so
       
   328 ln -sf ../../../xulrunner-%{version_internal}/libmozjs.so \
       
   329        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   330 ln -sf ../../../xulrunner-%{version_internal}/libxpcom.so \
       
   331        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   332 ln -sf ../../../xulrunner-%{version_internal}/libxul.so \
       
   333        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   334 # include basic buildenv for xulapps to use
       
   335 mkdir -p $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}
       
   336 pushd ..
       
   337 # this list has been compiled by trial and error for prism
       
   338 tar --exclude=*.cpp --exclude=*.mm \
       
   339    -cvjf $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}/mozilla-src.tar.bz2 \
       
   340     mozilla/configure.in mozilla/Makefile.in mozilla/client.py mozilla/allmakefiles.sh \
       
   341     mozilla/config mozilla/client.mk mozilla/aclocal.m4 mozilla/build mozilla/js/src/* \
       
   342     mozilla/testing mozilla/toolkit/mozapps/installer mozilla/probes mozilla/memory \
       
   343     mozilla/toolkit/xre mozilla/nsprpub/config mozilla/tools mozilla/xpcom/build
       
   344 popd
       
   345 # XPI example
       
   346 #cp -rL dist/xpi-stage/simple $RPM_BUILD_ROOT/%{_libdir}/xulrunner-%{version_internal}/
       
   347 # preferences
       
   348 cp %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/defaults/pref/all-openSUSE.js
       
   349 cp %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/defaults/pref/lockdown.js
       
   350 # install add-plugins.sh
       
   351 sed "s:%%PROGDIR:%{_libdir}/xulrunner-%{version_internal}:g" \
       
   352   %{SOURCE5} > $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
       
   353 chmod 755 $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
       
   354 # 64bit classification for GRE config
       
   355 %ifarch x86_64 s390x ppc64
       
   356 mv $RPM_BUILD_ROOT%{_sysconfdir}/gre.d/%{version_internal}.system.conf \
       
   357    $RPM_BUILD_ROOT%{_sysconfdir}/gre.d/%{version_internal}-64bit.system.conf
       
   358 %endif
       
   359 # ghosts
       
   360 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/global.reginfo
       
   361 # install additional locales
       
   362 %if %localize
       
   363 rm -f %{_tmppath}/translations.*
       
   364 touch %{_tmppath}/translations.{common,other}
       
   365 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do
       
   366   case $locale in
       
   367    ja-JP-mac|en-US|bn-IN)
       
   368       ;;
       
   369    *)
       
   370       pushd $RPM_BUILD_DIR/compare-locales
       
   371       PYTHONPATH=lib \
       
   372         scripts/compare-locales -m ../l10n-merged/$locale \
       
   373 	../mozilla/toolkit/locales/l10n.ini ../l10n $locale
       
   374       popd
       
   375       LOCALE_MERGEDIR=../l10n-merged \
       
   376       make -C toolkit/locales libs-$locale
       
   377       cp dist/xpi-stage/locale-$locale/chrome/$locale.jar \
       
   378          $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/chrome
       
   379       cp dist/xpi-stage/locale-$locale/chrome/$locale.manifest \
       
   380          $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/chrome
       
   381       # check against the fixed common list and sort into the right filelist
       
   382       _matched=0
       
   383       for _match in ar ca cs da de en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do
       
   384         [ "$_match" = "$locale" ] && _matched=1
       
   385       done
       
   386       [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
       
   387       echo %{_libdir}/xulrunner-%{version_internal}/chrome/$locale.jar \
       
   388          >> %{_tmppath}/translations.$_l10ntarget
       
   389       echo %{_libdir}/xulrunner-%{version_internal}/chrome/$locale.manifest \
       
   390          >> %{_tmppath}/translations.$_l10ntarget
       
   391   esac
       
   392 done
       
   393 %endif
       
   394 # API symlink
       
   395 ln -sf xulrunner-%{version_internal} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{apiversion}
       
   396 # compat links
       
   397 %if 0%{?ga_version:1}
       
   398 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{ga_version}
       
   399 %endif
       
   400 # excludes
       
   401 %if %suse_version < 1120
       
   402 rm -f $RPM_BUILD_ROOT%{_bindir}/xulrunner
       
   403 %endif
       
   404 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/updater
       
   405 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/update.locale
       
   406 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/LICENSE
       
   407 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/README.txt
       
   408 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/dictionaries/en-US*
       
   409 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/nspr-config
       
   410 # fdupes
       
   411 %fdupes $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal}/
       
   412 %fdupes $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/
       
   413 # create breakpad debugsymbols
       
   414 %if %crashreporter
       
   415 SYMBOLS_NAME="xulrunner-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
       
   416 make buildsymbols \
       
   417   SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
       
   418   SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \
       
   419   SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME"
       
   420 if [ -e dist/*symbols.zip ]; then
       
   421   mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   422   cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   423 fi
       
   424 %endif
       
   425 
       
   426 %clean
       
   427 rm -rf $RPM_BUILD_ROOT
       
   428 %if %localize
       
   429 rm -rf %{_tmppath}/translations.*
       
   430 %endif
       
   431 
       
   432 %post
       
   433 /usr/sbin/update-alternatives --install %{_bindir}/xulrunner \
       
   434   xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner %{uaweight} || :
       
   435 %{_libdir}/xulrunner-%{apiversion}/add-plugins.sh > /dev/null 2>&1
       
   436 exit 0
       
   437 
       
   438 %posttrans
       
   439 # needed for updates which transition directory to symlink
       
   440 %if 0%{?ga_version:1}
       
   441 test -d %{_libdir}/xulrunner-%{ga_version} && rm -rf %{_libdir}/xulrunner-%{ga_version}
       
   442 ln -sf xulrunner-%{version_internal} %{_libdir}/xulrunner-%{ga_version}
       
   443 %endif
       
   444 [ -e %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh ] && \
       
   445   %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1
       
   446 exit 0
       
   447 
       
   448 %preun
       
   449 if [ "$1" = "0" ]; then # deinstallation
       
   450   # that's not quite nice since old versions should be removed on update as well
       
   451   # but that's problematic for updates w/o raising the version number
       
   452   /usr/sbin/update-alternatives --remove xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner
       
   453 fi
       
   454 rm -f %{_libdir}/xulrunner-%{version_internal}/dictionaries/*
       
   455 exit 0
       
   456 
       
   457 %triggerin -- myspell-dictionary
       
   458 %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1
       
   459 exit 0
       
   460 
       
   461 %triggerpostun -- myspell-dictionary
       
   462 %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1
       
   463 exit 0
       
   464 
       
   465 %files
       
   466 %defattr(-,root,root)
       
   467 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   468 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   469 %dir %{_libdir}/xulrunner-%{version_internal}/dictionaries/
       
   470 %dir %{_libdir}/xulrunner-%{version_internal}/extensions/
       
   471 %{_libdir}/xulrunner-%{version_internal}/chrome/en-US.*
       
   472 %{_libdir}/xulrunner-%{version_internal}/chrome/pippki.*
       
   473 %{_libdir}/xulrunner-%{version_internal}/chrome/toolkit.*
       
   474 %{_libdir}/xulrunner-%{version_internal}/chrome/icons/
       
   475 %{_libdir}/xulrunner-%{version_internal}/components/
       
   476 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libmozgnome.so
       
   477 %if %suse_version <= 1130
       
   478 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libnkgnomevfs.so
       
   479 %endif
       
   480 %{_libdir}/xulrunner-%{version_internal}/defaults/
       
   481 %{_libdir}/xulrunner-%{version_internal}/greprefs.js
       
   482 %{_libdir}/xulrunner-%{version_internal}/icons/
       
   483 %{_libdir}/xulrunner-%{version_internal}/modules/
       
   484 %{_libdir}/xulrunner-%{version_internal}/plugins/
       
   485 %{_libdir}/xulrunner-%{version_internal}/res/
       
   486 %{_libdir}/xulrunner-%{version_internal}/*.so
       
   487 %exclude %{_libdir}/xulrunner-%{version_internal}/libmozjs.so
       
   488 %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
       
   489 %{_libdir}/xulrunner-%{version_internal}/chrome.manifest
       
   490 %{_libdir}/xulrunner-%{version_internal}/dependentlibs.list
       
   491 %{_libdir}/xulrunner-%{version_internal}/mozilla-xremote-client
       
   492 %if %plugincontainer
       
   493 %{_libdir}/xulrunner-%{version_internal}/plugin-container
       
   494 %endif
       
   495 %{_libdir}/xulrunner-%{version_internal}/run-mozilla.sh
       
   496 %{_libdir}/xulrunner-%{version_internal}/xulrunner
       
   497 %{_libdir}/xulrunner-%{version_internal}/xulrunner-bin
       
   498 %{_libdir}/xulrunner-%{version_internal}/xulrunner-stub
       
   499 %{_libdir}/xulrunner-%{version_internal}/platform.ini
       
   500 # crashreporter files
       
   501 %if %crashreporter
       
   502 %{_libdir}/xulrunner-%{version_internal}/crashreporter
       
   503 %{_libdir}/xulrunner-%{version_internal}/crashreporter.ini
       
   504 %{_libdir}/xulrunner-%{version_internal}/Throbber-small.gif
       
   505 %endif
       
   506 # ghosts
       
   507 %ghost %{_libdir}/xulrunner-%{version_internal}/global.reginfo
       
   508 %if %suse_version >= 1120
       
   509 %ghost %{_bindir}/xulrunner
       
   510 %endif
       
   511 # GRE
       
   512 %dir %{_sysconfdir}/gre.d/
       
   513 %attr(644,root,root) %{_sysconfdir}/gre.d/*
       
   514 # API symlink
       
   515 %{_libdir}/xulrunner-%{apiversion}
       
   516 # compat symlinks
       
   517 %if 0%{?ga_version:1}
       
   518 %ghost %{_libdir}/xulrunner-%{ga_version}
       
   519 %endif
       
   520 
       
   521 %files -n mozilla-js20
       
   522 %defattr(-,root,root)
       
   523 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   524 %{_libdir}/xulrunner-%{apiversion}
       
   525 %{_libdir}/xulrunner-%{version_internal}/libmozjs.so
       
   526 
       
   527 %files devel
       
   528 %defattr(-,root,root)
       
   529 %{_libdir}/xulrunner-%{version_internal}/xpcshell
       
   530 %{_libdir}/xulrunner-%{version_internal}/xpidl
       
   531 %{_libdir}/xulrunner-%{version_internal}/xpt_dump
       
   532 %{_libdir}/xulrunner-%{version_internal}/xpt_link
       
   533 %{_libdir}/xulrunner-devel-%{version_internal}/
       
   534 # FIXME symlink dynamic libs below sdk/lib
       
   535 %attr(644,root,root) %{_libdir}/pkgconfig/*
       
   536 %{_includedir}/xulrunner-%{version_internal}/
       
   537 %{_datadir}/xulrunner-%{version_internal}/
       
   538 
       
   539 %files gnome
       
   540 %defattr(-,root,root)
       
   541 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   542 %dir %{_libdir}/xulrunner-%{version_internal}/components/
       
   543 %{_libdir}/xulrunner-%{version_internal}/components/libmozgnome.so
       
   544 %if %suse_version <= 1130
       
   545 %{_libdir}/xulrunner-%{version_internal}/components/libnkgnomevfs.so
       
   546 %endif
       
   547 
       
   548 %if %localize
       
   549 %files translations-common -f %{_tmppath}/translations.common
       
   550 %defattr(-,root,root)
       
   551 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   552 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   553 
       
   554 %files translations-other -f %{_tmppath}/translations.other
       
   555 %defattr(-,root,root)
       
   556 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   557 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   558 %endif
       
   559 
       
   560 %if %crashreporter
       
   561 %files buildsymbols
       
   562 %defattr(-,root,root)
       
   563 %{_datadir}/mozilla/
       
   564 %endif
       
   565 
       
   566 %changelog