mozilla-xulrunner193/mozilla-xulrunner193.spec
changeset 77 f2df98836e17
parent 76 93fb7400b957
child 78 e0271a18500f
equal deleted inserted replaced
76:93fb7400b957 77:f2df98836e17
       
     1 #
       
     2 # spec file for package mozilla-xulrunner193 (Version 1.9.3a4)
       
     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-xulrunner193
       
    23 BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python startup-notification-devel zip pkg-config fdupes hunspell-devel
       
    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:        1.9.3a4
       
    37 Release:        1
       
    38 %define         releasedate 2010060800
       
    39 %define         version_internal 1.9.3a5pre
       
    40 %define         apiversion 1.9.3
       
    41 %define         uaweight 192900
       
    42 Summary:        Mozilla Runtime Environment 1.9.3
       
    43 Url:            http://www.mozilla.org
       
    44 Group:          Productivity/Other
       
    45 Provides:       gecko193
       
    46 %if %suse_version >= 1110
       
    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
       
    49 %define kde_helper_version 6
       
    50 Provides:       mozilla-kde4-version = %{kde_helper_version}
       
    51 %endif
       
    52 %ifarch %ix86
       
    53 Provides:       mozilla-xulrunner193-32bit = %{version}-%{release}
       
    54 %endif
       
    55 Source:         xulrunner-source-%{version}.tar.bz2
       
    56 Source1:        l10n-%{version}.tar.bz2
       
    57 Source2:        find-external-requires.sh
       
    58 Source3:        %{name}-rpmlintrc
       
    59 Source4:        xulrunner-openSUSE-prefs.js
       
    60 Source5:        add-plugins.sh.in
       
    61 Source6:        create-tar.sh
       
    62 Source7:        baselibs.conf
       
    63 Source8:        toolkit-lockdown.js
       
    64 Patch1:         toolkit-download-folder.patch
       
    65 Patch2:         mozilla-libproxy.patch
       
    66 Patch3:         mozilla-pkgconfig.patch
       
    67 Patch4:         idldir.patch
       
    68 Patch5:         mozilla-nongnome-proxies.patch
       
    69 Patch7:         mozilla-prefer_plugin_pref.patch
       
    70 Patch8:         mozilla-shared-nss-db.patch
       
    71 Patch10:        mozilla-kde.patch
       
    72 # PATCH-FEATURE-SLED FATE#302023, FATE#302024
       
    73 Patch11:        mozilla-gconf-backend.patch
       
    74 Patch12:        gecko-lockdown.patch
       
    75 Patch13:        toolkit-ui-lockdown.patch
       
    76 # ---
       
    77 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
       
    78 Requires:       mozilla-js193
       
    79 Requires(post):  update-alternatives coreutils
       
    80 Requires(preun): update-alternatives coreutils
       
    81 ### build configuration ###
       
    82 %define crashreporter    1
       
    83 %define has_system_nspr  1
       
    84 %define has_system_nss   1
       
    85 %define has_system_cairo 0
       
    86 %define localize 1
       
    87 %if %suse_version > 1110
       
    88 %define has_system_cairo 1
       
    89 %endif
       
    90 ### configuration end ###
       
    91 %define _use_internal_dependency_generator 0
       
    92 %define __find_requires sh %{SOURCE2}
       
    93 %global provfind sh -c "grep -v 'libsqlite3.so' | %__find_provides"
       
    94 %global __find_provides %provfind
       
    95 %if %has_system_nspr
       
    96 BuildRequires:  mozilla-nspr-devel
       
    97 Requires:       mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
       
    98 %endif
       
    99 %if %has_system_nss
       
   100 BuildRequires:  mozilla-nss-devel >= 3.12.6
       
   101 Requires:       mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
       
   102 %endif
       
   103 Recommends:     %{name}-gnome
       
   104 
       
   105 %description
       
   106 XULRunner is a single installable package that can be used to bootstrap
       
   107 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   108 Thunderbird.
       
   109 
       
   110 
       
   111 %package -n mozilla-js193
       
   112 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
       
   113 Summary:        Mozilla JS 1.8 engine
       
   114 Group:          Productivity/Other
       
   115 
       
   116 %description -n mozilla-js193
       
   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 1.9.3
       
   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 1.9.3
       
   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 
       
   148 %description translations-common
       
   149 XULRunner is a single installable package that can be used to bootstrap
       
   150 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   151 Thunderbird.
       
   152 
       
   153 This package contains the most common languages but en-US which is
       
   154 delivered in the main package.
       
   155 
       
   156 
       
   157 %package translations-other
       
   158 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
       
   159 Summary:        Extra translations for XULRunner 1.9.3
       
   160 Group:          System/Localization
       
   161 Requires:       %{name} = %{version}
       
   162 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)
       
   163 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   164 
       
   165 %description translations-other
       
   166 XULRunner is a single installable package that can be used to bootstrap
       
   167 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   168 Thunderbird.
       
   169 
       
   170 This package contains rarely used languages.
       
   171 %endif
       
   172 
       
   173 %package gnome
       
   174 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
       
   175 Summary:        XULRunner components depending on gnome-vfs
       
   176 Group:          Productivity/Other
       
   177 Requires:       %{name} = %{version}-%{release}
       
   178 Requires(post): coreutils
       
   179 
       
   180 %description gnome
       
   181 This subpackage contains the Necko Gnome-VFS and Gnome components which
       
   182 rely on the gnome-vfs subsystem to be installed. They are recommended
       
   183 for full desktop integration but not mandatory for small disk footprint
       
   184 KDE installations for example.
       
   185 
       
   186 
       
   187 %if %crashreporter
       
   188 %package buildsymbols
       
   189 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
       
   190 Summary:        Breakpad buildsymbols for %{name}
       
   191 Group:          Development/Debug
       
   192 
       
   193 %description buildsymbols
       
   194 This subpackage contains the Breakpad created and compatible debugging
       
   195 symbols meant for upload to Mozilla's crash collector database.
       
   196 %endif
       
   197 
       
   198 %prep
       
   199 %setup -n mozilla -q -b 1
       
   200 %patch1 -p1
       
   201 %patch2 -p1
       
   202 %patch3 -p1
       
   203 %patch4 -p1
       
   204 %patch5 -p1
       
   205 %patch7 -p1
       
   206 #%patch8 -p1
       
   207 #%if %suse_version >= 1110
       
   208 #%patch10 -p1
       
   209 #%endif
       
   210 #%patch11 -p1
       
   211 #%patch12 -p1
       
   212 #%patch13 -p1
       
   213 
       
   214 %build
       
   215 %if %suse_version >= 1110
       
   216 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
       
   217 if test "$kdehelperversion" != %{kde_helper_version}; then
       
   218   echo fix kde helper version in the .spec file
       
   219   exit 1
       
   220 fi
       
   221 %endif
       
   222 MOZ_APP_DIR=%{_libdir}/xulrunner-%{version_internal}
       
   223 export MOZ_BUILD_DATE=%{releasedate}
       
   224 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
       
   225 %ifarch ppc64
       
   226 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
       
   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-debug
       
   271 EOF
       
   272 %if %has_system_nspr
       
   273 cat << EOF >> $MOZCONFIG
       
   274 ac_add_options --with-system-nspr
       
   275 EOF
       
   276 %endif
       
   277 %if %has_system_nss
       
   278 cat << EOF >> $MOZCONFIG
       
   279 ac_add_options --with-system-nss
       
   280 EOF
       
   281 %endif
       
   282 %if %has_system_cairo
       
   283 cat << EOF >> $MOZCONFIG
       
   284 ac_add_options --enable-system-cairo
       
   285 EOF
       
   286 %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
       
   298 cat << EOF >> $MOZCONFIG
       
   299 ac_add_options --enable-libproxy
       
   300 EOF
       
   301 %endif
       
   302 %if ! %crashreporter
       
   303 cat << EOF >> $MOZCONFIG
       
   304 ac_add_options --disable-crashreporter
       
   305 EOF
       
   306 %endif
       
   307 make -f client.mk build
       
   308 
       
   309 %install
       
   310 cd ../obj
       
   311 %makeinstall STRIP=/bin/true
       
   312 # remove some executable permissions
       
   313 find $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal} \
       
   314      -type f -perm -111 -exec chmod a-x {} \;
       
   315 find $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/ \
       
   316      -name "*.js" -o -name "*.xpm" -o -name "*.png" | xargs chmod a-x
       
   317 mkdir -p $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions
       
   318 # fixing SDK dynamic libs (symlink instead of copy)
       
   319 rm $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/*.so
       
   320 ln -sf ../../../xulrunner-%{version_internal}/libmozjs.so \
       
   321        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   322 ln -sf ../../../xulrunner-%{version_internal}/libxpcom.so \
       
   323        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   324 ln -sf ../../../xulrunner-%{version_internal}/libxul.so \
       
   325        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   326 # include basic buildenv for xulapps to use
       
   327 mkdir -p $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}
       
   328 pushd ..
       
   329 # this list has been compiled by trial and error for prism
       
   330 tar --exclude=*.cpp --exclude=*.mm \
       
   331    -cvjf $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}/mozilla-src.tar.bz2 \
       
   332     mozilla/configure.in mozilla/Makefile.in mozilla/client.py mozilla/allmakefiles.sh \
       
   333     mozilla/config mozilla/client.mk mozilla/aclocal.m4 mozilla/build mozilla/js/src/* \
       
   334     mozilla/testing mozilla/toolkit/mozapps/installer mozilla/probes mozilla/memory \
       
   335     mozilla/toolkit/xre mozilla/nsprpub/config mozilla/tools mozilla/xpcom/build
       
   336 popd
       
   337 # XPI example
       
   338 #cp -rL dist/xpi-stage/simple $RPM_BUILD_ROOT/%{_libdir}/xulrunner-%{version_internal}/
       
   339 # preferences
       
   340 cp %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/greprefs/all-openSUSE.js
       
   341 cp %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/greprefs/lockdown.js
       
   342 # install add-plugins.sh
       
   343 sed "s:%%PROGDIR:%{_libdir}/xulrunner-%{version_internal}:g" \
       
   344   %{SOURCE5} > $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
       
   345 chmod 755 $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
       
   346 # 64bit classification for GRE config
       
   347 %ifarch x86_64 s390x ppc64
       
   348 mv $RPM_BUILD_ROOT%{_sysconfdir}/gre.d/%{version_internal}.system.conf \
       
   349    $RPM_BUILD_ROOT%{_sysconfdir}/gre.d/%{version_internal}-64bit.system.conf
       
   350 %endif
       
   351 # ghosts
       
   352 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/global.reginfo
       
   353 # install additional locales
       
   354 %if %localize
       
   355 rm -f %{_tmppath}/translations.*
       
   356 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do
       
   357   case $locale in
       
   358    ja-JP-mac|en-US)
       
   359       ;;
       
   360    *)
       
   361       make -C toolkit/locales libs-$locale
       
   362       cp dist/xpi-stage/locale-$locale/chrome/$locale.jar \
       
   363          $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/chrome
       
   364       cp dist/xpi-stage/locale-$locale/chrome/$locale.manifest \
       
   365          $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/chrome
       
   366       # check against the fixed common list and sort into the right filelist
       
   367       _matched=0
       
   368       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
       
   369         [ "$_match" = "$locale" ] && _matched=1
       
   370       done
       
   371       [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
       
   372       echo %{_libdir}/xulrunner-%{version_internal}/chrome/$locale.jar \
       
   373          >> %{_tmppath}/translations.$_l10ntarget
       
   374       echo %{_libdir}/xulrunner-%{version_internal}/chrome/$locale.manifest \
       
   375          >> %{_tmppath}/translations.$_l10ntarget
       
   376   esac
       
   377 done
       
   378 %endif
       
   379 # API symlink
       
   380 ln -sf xulrunner-%{version_internal} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{apiversion}
       
   381 # compat links
       
   382 %if 0%{?ga_version:1}
       
   383 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{ga_version}
       
   384 %endif
       
   385 # excludes
       
   386 %if %suse_version < 1120
       
   387 rm -f $RPM_BUILD_ROOT%{_bindir}/xulrunner
       
   388 %endif
       
   389 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/updater
       
   390 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/update.locale
       
   391 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/LICENSE
       
   392 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/README.txt
       
   393 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/dictionaries/en-US*
       
   394 # autoreg
       
   395 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/.autoreg
       
   396 # fdupes
       
   397 %if %suse_version > 1020
       
   398 %fdupes $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal}/
       
   399 %fdupes $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/
       
   400 %endif
       
   401 # create breakpad debugsymbols
       
   402 %if %crashreporter
       
   403 SYMBOLS_NAME="xulrunner-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
       
   404 make buildsymbols \
       
   405   SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
       
   406   SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME"
       
   407 if [ -e dist/*symbols.zip ]; then
       
   408   mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   409   cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   410 fi
       
   411 %endif
       
   412 
       
   413 %clean
       
   414 rm -rf $RPM_BUILD_ROOT
       
   415 %if %localize
       
   416 rm -rf %{_tmppath}/translations.*
       
   417 %endif
       
   418 
       
   419 %post
       
   420 /usr/sbin/update-alternatives --install %{_bindir}/xulrunner \
       
   421   xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner %{uaweight} || :
       
   422 %{_libdir}/xulrunner-%{apiversion}/add-plugins.sh > /dev/null 2>&1
       
   423 exit 0
       
   424 
       
   425 %posttrans
       
   426 # needed for updates which transition directory to symlink
       
   427 %if 0%{?ga_version:1} 
       
   428 test -d %{_libdir}/xulrunner-%{ga_version} && rm -rf %{_libdir}/xulrunner-%{ga_version}
       
   429 ln -sf xulrunner-%{version_internal} %{_libdir}/xulrunner-%{ga_version}
       
   430 %endif
       
   431 [ -e %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh ] && \
       
   432   %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1
       
   433 exit 0
       
   434 
       
   435 %preun
       
   436 if [ "$1" = "0" ]; then # deinstallation
       
   437   # that's not quite nice since old versions should be removed on update as well
       
   438   # but that's problematic for updates w/o raising the version number
       
   439   /usr/sbin/update-alternatives --remove xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner
       
   440 fi
       
   441 rm -f %{_libdir}/xulrunner-%{version_internal}/dictionaries/*
       
   442 exit 0
       
   443 
       
   444 %triggerin -- myspell-dictionary
       
   445 %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1
       
   446 exit 0
       
   447 
       
   448 %triggerpostun -- myspell-dictionary
       
   449 %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1
       
   450 exit 0
       
   451 
       
   452 %post gnome
       
   453 touch %{_libdir}/xulrunner-%{version_internal}/.autoreg
       
   454 exit 0
       
   455 
       
   456 %files
       
   457 %defattr(-,root,root)
       
   458 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   459 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   460 %dir %{_libdir}/xulrunner-%{version_internal}/dictionaries/
       
   461 %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.*
       
   465 %{_libdir}/xulrunner-%{version_internal}/chrome/pippki.*
       
   466 %{_libdir}/xulrunner-%{version_internal}/chrome/toolkit.*
       
   467 %{_libdir}/xulrunner-%{version_internal}/chrome/icons/
       
   468 %{_libdir}/xulrunner-%{version_internal}/components/
       
   469 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libmozgnome.so
       
   470 %exclude %{_libdir}/xulrunner-%{version_internal}/components/libnkgnomevfs.so
       
   471 %{_libdir}/xulrunner-%{version_internal}/defaults/
       
   472 %dir %{_libdir}/xulrunner-%{version_internal}/greprefs/
       
   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/
       
   479 %{_libdir}/xulrunner-%{version_internal}/modules/
       
   480 %{_libdir}/xulrunner-%{version_internal}/plugins/
       
   481 %{_libdir}/xulrunner-%{version_internal}/res/
       
   482 %{_libdir}/xulrunner-%{version_internal}/*.so
       
   483 %exclude %{_libdir}/xulrunner-%{version_internal}/libmozjs.so
       
   484 %{_libdir}/xulrunner-%{version_internal}/.autoreg
       
   485 %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh
       
   486 %{_libdir}/xulrunner-%{version_internal}/dependentlibs.list
       
   487 %{_libdir}/xulrunner-%{version_internal}/mozilla-xremote-client
       
   488 %{_libdir}/xulrunner-%{version_internal}/plugin-container
       
   489 %{_libdir}/xulrunner-%{version_internal}/run-mozilla.sh
       
   490 %{_libdir}/xulrunner-%{version_internal}/xulrunner
       
   491 %{_libdir}/xulrunner-%{version_internal}/xulrunner-bin
       
   492 %{_libdir}/xulrunner-%{version_internal}/xulrunner-stub
       
   493 %{_libdir}/xulrunner-%{version_internal}/platform.ini
       
   494 # crashreporter files
       
   495 %if %crashreporter
       
   496 %{_libdir}/xulrunner-%{version_internal}/crashreporter
       
   497 %{_libdir}/xulrunner-%{version_internal}/crashreporter.ini
       
   498 %{_libdir}/xulrunner-%{version_internal}/Throbber-small.gif
       
   499 %endif
       
   500 # ghosts
       
   501 %ghost %{_libdir}/xulrunner-%{version_internal}/global.reginfo
       
   502 %if %suse_version >= 1120
       
   503 %ghost %{_bindir}/xulrunner
       
   504 %endif
       
   505 # GRE
       
   506 %dir %{_sysconfdir}/gre.d/
       
   507 %attr(644,root,root) %{_sysconfdir}/gre.d/*
       
   508 # API symlink
       
   509 %{_libdir}/xulrunner-%{apiversion}
       
   510 # compat symlinks
       
   511 %if 0%{?ga_version:1} 
       
   512 %ghost %{_libdir}/xulrunner-%{ga_version}
       
   513 %endif
       
   514 
       
   515 %files -n mozilla-js193
       
   516 %defattr(-,root,root)
       
   517 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   518 %{_libdir}/xulrunner-%{apiversion}
       
   519 %{_libdir}/xulrunner-%{version_internal}/libmozjs.so
       
   520 
       
   521 %files devel
       
   522 %defattr(-,root,root)
       
   523 %{_libdir}/xulrunner-%{version_internal}/xpcshell
       
   524 %{_libdir}/xulrunner-%{version_internal}/xpidl
       
   525 %{_libdir}/xulrunner-%{version_internal}/xpt_dump
       
   526 %{_libdir}/xulrunner-%{version_internal}/xpt_link
       
   527 %{_libdir}/xulrunner-devel-%{version_internal}/
       
   528 # FIXME symlink dynamic libs below sdk/lib
       
   529 %attr(644,root,root) %{_libdir}/pkgconfig/*
       
   530 %{_includedir}/xulrunner-%{version_internal}/
       
   531 %{_datadir}/xulrunner-%{version_internal}/
       
   532 
       
   533 %files gnome
       
   534 %defattr(-,root,root)
       
   535 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   536 %dir %{_libdir}/xulrunner-%{version_internal}/components/
       
   537 %ghost %{_libdir}/xulrunner-%{version_internal}/.autoreg
       
   538 %{_libdir}/xulrunner-%{version_internal}/components/libmozgnome.so
       
   539 %{_libdir}/xulrunner-%{version_internal}/components/libnkgnomevfs.so
       
   540 
       
   541 %if %localize
       
   542 
       
   543 %files translations-common -f %{_tmppath}/translations.common
       
   544 %defattr(-,root,root)
       
   545 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   546 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   547 
       
   548 %files translations-other -f %{_tmppath}/translations.other
       
   549 %defattr(-,root,root)
       
   550 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   551 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   552 %endif
       
   553 
       
   554 %if %crashreporter
       
   555 
       
   556 %files buildsymbols
       
   557 %defattr(-,root,root)
       
   558 %{_datadir}/mozilla/
       
   559 %endif
       
   560 
       
   561 %changelog