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