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