xulrunner/xulrunner.spec
changeset 941 ff9e20146e8b
parent 936 096e59808e91
parent 940 f63a4ac0fe06
child 942 66115255ad6f
equal deleted inserted replaced
936:096e59808e91 941:ff9e20146e8b
     1 #
       
     2 # spec file for package xulrunner
       
     3 #
       
     4 # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
       
     5 #               2006-2015 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 
       
    20 %define version_internal 38.2.0
       
    21 %define apiversion 38
       
    22 %define uaweight 3820000
       
    23 %define releasedate 2015080900
       
    24 %define shared_js 0
       
    25 %define has_system_nspr  1
       
    26 %define has_system_nss   1
       
    27 %define has_system_cairo 0
       
    28 %define localize         0
       
    29 %ifarch aarch64 ppc ppc64 ppc64le s390 s390x ia64 %arm
       
    30 %define crashreporter    0
       
    31 %else
       
    32 %define crashreporter    0
       
    33 %endif
       
    34 %if %suse_version > 1210
       
    35 %if %suse_version > 1310
       
    36 %define gstreamer_ver 1.0
       
    37 %define gstreamer 1
       
    38 %else
       
    39 %define gstreamer_ver 0.10
       
    40 %endif
       
    41 %endif
       
    42 
       
    43 Name:           xulrunner
       
    44 BuildRequires:  Mesa-devel
       
    45 BuildRequires:  autoconf213
       
    46 BuildRequires:  dbus-1-glib-devel
       
    47 BuildRequires:  fdupes
       
    48 BuildRequires:  gcc-c++
       
    49 BuildRequires:  hunspell-devel
       
    50 BuildRequires:  libcurl-devel
       
    51 BuildRequires:  libgnomeui-devel
       
    52 BuildRequires:  libidl-devel
       
    53 BuildRequires:  libnotify-devel
       
    54 %if %suse_version > 1140
       
    55 BuildRequires:  makeinfo
       
    56 %endif
       
    57 BuildRequires:  pkg-config
       
    58 BuildRequires:  python
       
    59 BuildRequires:  startup-notification-devel
       
    60 BuildRequires:  unzip
       
    61 BuildRequires:  xorg-x11-libXt-devel
       
    62 BuildRequires:  yasm
       
    63 BuildRequires:  zip
       
    64 %if %suse_version > 1110
       
    65 BuildRequires:  libiw-devel
       
    66 BuildRequires:  libproxy-devel
       
    67 %else
       
    68 BuildRequires:  wireless-tools
       
    69 %endif
       
    70 BuildRequires:  mozilla-nspr-devel >= 4.10.8
       
    71 BuildRequires:  mozilla-nss-devel >= 3.19.2
       
    72 BuildRequires:  pkgconfig(libpulse)
       
    73 %if %suse_version > 1210
       
    74 BuildRequires:  pkgconfig(gstreamer-%gstreamer_ver)
       
    75 BuildRequires:  pkgconfig(gstreamer-app-%gstreamer_ver)
       
    76 BuildRequires:  pkgconfig(gstreamer-plugins-base-%gstreamer_ver)
       
    77 %if 0%{?gstreamer} == 1
       
    78 Requires:       libgstreamer-1_0-0
       
    79 Recommends:     gstreamer-fluendo-mp3
       
    80 Recommends:     gstreamer-plugin-libav
       
    81 %else
       
    82 Requires:       libgstreamer-0_10-0
       
    83 Recommends:     gstreamer-0_10-fluendo-mp3
       
    84 Recommends:     gstreamer-0_10-plugins-ffmpeg
       
    85 %endif
       
    86 %endif
       
    87 Version:        %{version_internal}
       
    88 Release:        0
       
    89 Summary:        Mozilla Runtime Environment
       
    90 License:        MPL-2.0
       
    91 Group:          Productivity/Other
       
    92 Url:            http://www.mozilla.org/
       
    93 Provides:       gecko
       
    94 %ifarch %ix86
       
    95 Provides:       xulrunner-32bit = %{version}-%{release}
       
    96 %endif
       
    97 Source:         xulrunner-%{version}-source.tar.xz
       
    98 Source1:        l10n-%{version}.tar.xz
       
    99 Source2:        find-external-requires.sh
       
   100 Source3:        %{name}-rpmlintrc
       
   101 Source4:        xulrunner-openSUSE-prefs.js
       
   102 Source5:        spellcheck.js
       
   103 Source6:        create-tar.sh
       
   104 Source7:        baselibs.conf
       
   105 Source8:        source-stamp.txt
       
   106 Source9:        compare-locales.tar.xz
       
   107 Patch1:         toolkit-download-folder.patch
       
   108 Patch2:         mozilla-pkgconfig.patch
       
   109 Patch3:         mozilla-nongnome-proxies.patch
       
   110 Patch4:         mozilla-prefer_plugin_pref.patch
       
   111 Patch5:         mozilla-shared-nss-db.patch
       
   112 Patch6:         mozilla-preferences.patch
       
   113 Patch7:         mozilla-language.patch
       
   114 Patch8:         mozilla-ntlm-full-path.patch
       
   115 Patch9:         mozilla-repo.patch
       
   116 Patch10:        mozilla-icu-strncat.patch
       
   117 Patch11:        mozilla-arm-disable-edsp.patch
       
   118 Patch12:        mozilla-idldir.patch
       
   119 Patch13:        mozilla-skia-be-le.patch
       
   120 Patch14:        mozilla-bmo1005535.patch
       
   121 Patch15:        mozilla-add-glibcxx_use_cxx11_abi.patch
       
   122 Patch16:        mozilla-arm64-libjpeg-turbo.patch
       
   123 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
       
   124 %if 0%{?shared_js} == 1
       
   125 Requires:       mozilla-js = %{version}
       
   126 %endif
       
   127 Requires(post):  update-alternatives coreutils
       
   128 Requires(preun): update-alternatives coreutils
       
   129 Provides:       xulrunner-esr = %{version}
       
   130 Obsoletes:      xulrunner-esr < 24.0
       
   131 %define _use_internal_dependency_generator 0
       
   132 %define __find_requires sh %{SOURCE2}
       
   133 %global provfind sh -c "grep -Ev 'mozsqlite3|dbusservice|unixprint' | %__find_provides"
       
   134 %global __find_provides %provfind
       
   135 %if %has_system_nspr
       
   136 Requires:       mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
       
   137 %endif
       
   138 %if %has_system_nss
       
   139 Requires:       mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
       
   140 %endif
       
   141 
       
   142 %description
       
   143 XULRunner is a single installable package that can be used to bootstrap
       
   144 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   145 Thunderbird.
       
   146 
       
   147 %if 0%{?shared_js} == 1
       
   148 %package -n mozilla-js
       
   149 Summary:        Mozilla JS engine
       
   150 Group:          Productivity/Other
       
   151 
       
   152 %description -n mozilla-js
       
   153 JavaScript is the Netscape-developed object scripting language used in millions
       
   154 of web pages and server applications worldwide. Netscape's JavaScript is a
       
   155 superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
       
   156 with only mild differences from the published standard.
       
   157 %endif
       
   158 
       
   159 %package devel
       
   160 Summary:        XULRunner/Gecko SDK
       
   161 Group:          Development/Libraries/Other
       
   162 %if %has_system_nspr
       
   163 Requires:       mozilla-nspr-devel >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr-devel)
       
   164 %endif
       
   165 %if %has_system_nss
       
   166 Requires:       mozilla-nss-devel >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss-devel)
       
   167 %endif
       
   168 Requires:       %{name} = %{version}
       
   169 
       
   170 %description devel
       
   171 Software Development Kit to embed XUL or Gecko into other applications.
       
   172 
       
   173 %if %localize
       
   174 %package translations-common
       
   175 Summary:        Common translations for XULRunner
       
   176 Group:          System/Localization
       
   177 Requires:       %{name} = %{version}
       
   178 Provides:       locale(%{name}:ar;ca;cs;da;de;el;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)
       
   179 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   180 
       
   181 %description translations-common
       
   182 XULRunner is a single installable package that can be used to bootstrap
       
   183 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   184 Thunderbird.
       
   185 
       
   186 This package contains the most common languages but en-US which is
       
   187 delivered in the main package.
       
   188 
       
   189 
       
   190 %package translations-other
       
   191 Summary:        Extra translations for XULRunner
       
   192 Group:          System/Localization
       
   193 Requires:       %{name} = %{version}
       
   194 Provides:       locale(%{name}:ach;af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;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;vi;zu)
       
   195 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   196 
       
   197 %description translations-other
       
   198 XULRunner is a single installable package that can be used to bootstrap
       
   199 multiple XUL+XPCOM applications that are as rich as Firefox and
       
   200 Thunderbird.
       
   201 
       
   202 This package contains rarely used languages.
       
   203 %endif
       
   204 
       
   205 %if %crashreporter
       
   206 %package buildsymbols
       
   207 Summary:        Breakpad buildsymbols for %{name}
       
   208 Group:          Development/Debug
       
   209 
       
   210 %description buildsymbols
       
   211 This subpackage contains the Breakpad created and compatible debugging
       
   212 symbols meant for upload to Mozilla's crash collector database.
       
   213 %endif
       
   214 
       
   215 %prep
       
   216 %setup -n mozilla -q -b 1 -b 9
       
   217 %patch1 -p1
       
   218 %patch2 -p1
       
   219 %patch3 -p1
       
   220 %patch4 -p1
       
   221 %patch5 -p1
       
   222 %patch6 -p1
       
   223 %patch7 -p1
       
   224 %patch8 -p1
       
   225 %patch9 -p1
       
   226 %patch10 -p1
       
   227 %patch11 -p1
       
   228 %patch12 -p1
       
   229 %patch13 -p1
       
   230 %patch14 -p1
       
   231 %patch15 -p1
       
   232 %patch16 -p1
       
   233 
       
   234 %build
       
   235 # no need to add build time to binaries
       
   236 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
       
   237 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
       
   238 TIME="\"$(date -d "${modified}" "+%%R")\""
       
   239 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
       
   240 #
       
   241 MOZ_APP_DIR=%{_libdir}/xulrunner-%{version_internal}
       
   242 source %{SOURCE8}
       
   243 export MOZ_BUILD_DATE=%{releasedate}
       
   244 export MOZ_SOURCE_STAMP=$REV
       
   245 export SOURCE_REPO=$REPO
       
   246 export source_repo=$REPO
       
   247 export MOZ_SOURCE_REPO=$REPO
       
   248 export MOZILLA_OFFICIAL=1
       
   249 export BUILD_OFFICIAL=1
       
   250 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
       
   251 %ifarch %ix86
       
   252 export CFLAGS="${CFLAGS} -Os"
       
   253 %endif
       
   254 %ifarch ppc64
       
   255 export CFLAGS="$CFLAGS -mminimal-toc"
       
   256 %endif
       
   257 export LDFLAGS=" -Wl,-rpath -Wl,${MOZ_APP_DIR}"
       
   258 %ifarch %arm
       
   259 # debug symbols require too much memory during build
       
   260 export CFLAGS="${CFLAGS/-g / }"
       
   261 # Limit RAM usage during link
       
   262 LDFLAGS+="-Wl,--reduce-memory-overheads -Wl,--no-keep-memory"
       
   263 %endif
       
   264 export CXXFLAGS="$CFLAGS"
       
   265 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
       
   266 export MOZ_MILESTONE_RELEASE=1
       
   267 #
       
   268 cat << EOF > $MOZCONFIG
       
   269 mk_add_options MOZILLA_OFFICIAL=1
       
   270 mk_add_options BUILD_OFFICIAL=1
       
   271 mk_add_options MOZ_MILESTONE_RELEASE=1
       
   272 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
       
   273 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
       
   274 . \$topsrcdir/xulrunner/config/mozconfig
       
   275 ac_add_options --prefix=%{_prefix}
       
   276 ac_add_options --libdir=%{_libdir}
       
   277 ac_add_options --sysconfdir=%{_sysconfdir}
       
   278 ac_add_options --mandir=%{_mandir}
       
   279 ac_add_options --includedir=%{_includedir}
       
   280 ac_add_options --enable-release
       
   281 ac_add_options --enable-stdcxx-compat
       
   282 %ifarch %ix86
       
   283 %if 0%{?suse_version} > 1230
       
   284 ac_add_options --disable-optimize
       
   285 %endif
       
   286 %endif
       
   287 %ifnarch aarch64 ppc ppc64 ppc64le
       
   288 ac_add_options --enable-elf-hack
       
   289 %endif
       
   290 ac_add_options --enable-extensions=default
       
   291 #ac_add_options --with-system-jpeg # mozilla uses internal libjpeg-turbo now
       
   292 #ac_add_options --with-system-png  # no APNG support
       
   293 ac_add_options --with-system-zlib
       
   294 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
       
   295 ac_add_options --disable-tests
       
   296 ac_add_options --disable-mochitest
       
   297 ac_add_options --disable-installer
       
   298 ac_add_options --disable-updater
       
   299 ac_add_options --disable-javaxpcom
       
   300 ac_add_options --enable-system-hunspell
       
   301 ac_add_options --enable-startup-notification
       
   302 %if 0%{?shared_js} == 1
       
   303 ac_add_options --enable-shared-js
       
   304 %endif
       
   305 #ac_add_options --enable-debug
       
   306 %if %suse_version > 1130
       
   307 ac_add_options --disable-gnomevfs
       
   308 ac_add_options --enable-gio
       
   309 %endif
       
   310 %if 0%{?gstreamer} == 1
       
   311 ac_add_options --enable-gstreamer=1.0
       
   312 %endif
       
   313 %if %suse_version < 1220
       
   314 ac_add_options --disable-gstreamer
       
   315 %endif
       
   316 %if %has_system_nspr
       
   317 ac_add_options --with-system-nspr
       
   318 %endif
       
   319 %if %has_system_nss
       
   320 ac_add_options --with-system-nss
       
   321 %endif
       
   322 %if %has_system_cairo
       
   323 ac_add_options --enable-system-cairo
       
   324 %endif
       
   325 %if %suse_version > 1110
       
   326 ac_add_options --enable-libproxy
       
   327 %endif
       
   328 %if ! %crashreporter
       
   329 ac_add_options --disable-crashreporter
       
   330 %endif
       
   331 # ARM
       
   332 %ifarch %arm
       
   333 ac_add_options --disable-neon
       
   334 %endif
       
   335 %ifnarch %ix86 x86_64
       
   336 ac_add_options --disable-webrtc
       
   337 %endif
       
   338 # try to use OpenGL-ES on ARM
       
   339 %ifarch %arm
       
   340 ac_add_options --with-gl-provider=EGL
       
   341 %endif
       
   342 EOF
       
   343 make -f client.mk build
       
   344 
       
   345 %install
       
   346 cd ../obj
       
   347 # preferences (to package in omni.jar)
       
   348 cp %{SOURCE4} dist/bin/defaults/pref/all-openSUSE.js
       
   349 cp %{SOURCE5} dist/bin/defaults/pref/
       
   350 %makeinstall STRIP=/bin/true
       
   351 # xpt.py is not executable
       
   352 chmod a+x $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/bin/*.py
       
   353 # remove some executable permissions
       
   354 find $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal} \
       
   355      -type f -perm -111 -exec chmod a-x {} \;
       
   356 find $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/ \
       
   357      -name "*.js" -o -name "*.xpm" -o -name "*.png" | xargs chmod a-x
       
   358 # remove mkdir.done files from installed base
       
   359 #find $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal} -name ".mkdir.done" | xargs rm
       
   360 mkdir -p $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions
       
   361 # fixing SDK dynamic libs (symlink instead of copy)
       
   362 rm $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/*.so
       
   363 %if 0%{?shared_js} == 1
       
   364 ln -sf ../../../xulrunner-%{version_internal}/libmozjs.so \
       
   365        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   366 %endif
       
   367 ln -sf ../../../xulrunner-%{version_internal}/libxul.so \
       
   368        $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/
       
   369 # include basic buildenv for xulapps to use
       
   370 mkdir -p $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}
       
   371 pushd ..
       
   372 # this list has been compiled by trial and error for prism
       
   373 tar --exclude=*.cpp --exclude=*.mm \
       
   374    -cvjf $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}/mozilla-src.tar.bz2 \
       
   375     mozilla/configure.in mozilla/Makefile.in mozilla/client.py \
       
   376     mozilla/config mozilla/client.mk mozilla/aclocal.m4 mozilla/build mozilla/js/src/* \
       
   377     mozilla/testing mozilla/toolkit/mozapps/installer mozilla/probes mozilla/memory \
       
   378     mozilla/toolkit/xre mozilla/nsprpub/config mozilla/tools mozilla/xpcom/build
       
   379 popd
       
   380 # ghosts
       
   381 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/global.reginfo
       
   382 # install additional locales
       
   383 %if %localize
       
   384 rm -f %{_tmppath}/translations.*
       
   385 touch %{_tmppath}/translations.{common,other}
       
   386 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do
       
   387   case $locale in
       
   388    ja-JP-mac|en-US)
       
   389       ;;
       
   390    *)
       
   391       pushd $RPM_BUILD_DIR/compare-locales
       
   392       PYTHONPATH=lib \
       
   393         scripts/compare-locales -m ../l10n-merged/$locale \
       
   394 	../mozilla/toolkit/locales/l10n.ini ../l10n $locale
       
   395       popd
       
   396       LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
       
   397       make -C toolkit/locales langpack-$locale
       
   398       cp dist/xpi-stage/locale-$locale \
       
   399          $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions/langpack-$locale@firefox.mozilla.org
       
   400       # remove prefs and profile defaults from langpack
       
   401       rm -rf $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions/langpack-$locale@firefox.mozilla.org/defaults
       
   402       # check against the fixed common list and sort into the right filelist
       
   403       _matched=0
       
   404       for _match in ar ca cs da de el 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
       
   405         [ "$_match" = "$locale" ] && _matched=1
       
   406       done
       
   407       [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
       
   408       echo %{_libdir}/xulrunner-%{version_internal}/extensions/langpack-$locale@firefox.mozilla.org \ \
       
   409          >> %{_tmppath}/translations.$_l10ntarget
       
   410   esac
       
   411 done
       
   412 %endif
       
   413 # API symlink
       
   414 ln -sf xulrunner-%{version_internal} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{apiversion}
       
   415 # compat links
       
   416 %if 0%{?ga_version:1}
       
   417 touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{ga_version}
       
   418 %endif
       
   419 # excludes
       
   420 %if %suse_version < 1120
       
   421 rm -f $RPM_BUILD_ROOT%{_bindir}/xulrunner
       
   422 %endif
       
   423 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/updater
       
   424 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/update.locale
       
   425 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/LICENSE
       
   426 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/README.txt
       
   427 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/dictionaries/en-US*
       
   428 rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/nspr-config
       
   429 rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/mozilla-plugin.pc
       
   430 rm -rf $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/gmp-fake/
       
   431 rm -rf $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/gmp-fakeopenh264/
       
   432 # fdupes
       
   433 %fdupes $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal}/
       
   434 %fdupes $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/
       
   435 # create breakpad debugsymbols
       
   436 %if %crashreporter
       
   437 SYMBOLS_NAME="xulrunner-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
       
   438 make buildsymbols \
       
   439   SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
       
   440   SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \
       
   441   SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME"
       
   442 if [ -e dist/*symbols.zip ]; then
       
   443   mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   444   cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   445 fi
       
   446 %endif
       
   447 
       
   448 %clean
       
   449 rm -rf $RPM_BUILD_ROOT
       
   450 %if %localize
       
   451 rm -rf %{_tmppath}/translations.*
       
   452 %endif
       
   453 
       
   454 %post
       
   455 /usr/sbin/update-alternatives --install %{_bindir}/xulrunner \
       
   456   xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner %{uaweight} || :
       
   457 exit 0
       
   458 
       
   459 %posttrans
       
   460 # needed for updates which transition directory to symlink
       
   461 %if 0%{?ga_version:1}
       
   462 test -d %{_libdir}/xulrunner-%{ga_version} && rm -rf %{_libdir}/xulrunner-%{ga_version}
       
   463 ln -sf xulrunner-%{version_internal} %{_libdir}/xulrunner-%{ga_version}
       
   464 %endif
       
   465 exit 0
       
   466 
       
   467 %preun
       
   468 if [ "$1" = "0" ]; then # deinstallation
       
   469   # that's not quite nice since old versions should be removed on update as well
       
   470   # but that's problematic for updates w/o raising the version number
       
   471   /usr/sbin/update-alternatives --remove xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner
       
   472 fi
       
   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/icons/
       
   482 %{_libdir}/xulrunner-%{version_internal}/components/
       
   483 %{_libdir}/xulrunner-%{version_internal}/*.so
       
   484 %{_libdir}/xulrunner-%{version_internal}/gmp-clearkey/
       
   485 %if 0%{?shared_js} == 1
       
   486 %exclude %{_libdir}/xulrunner-%{version_internal}/libmozjs.so
       
   487 %endif
       
   488 %{_libdir}/xulrunner-%{version_internal}/chrome.manifest
       
   489 %{_libdir}/xulrunner-%{version_internal}/dependentlibs.list
       
   490 %{_libdir}/xulrunner-%{version_internal}/plugin-container
       
   491 %{_libdir}/xulrunner-%{version_internal}/xulrunner
       
   492 %{_libdir}/xulrunner-%{version_internal}/xulrunner-stub
       
   493 %{_libdir}/xulrunner-%{version_internal}/platform.ini
       
   494 %{_libdir}/xulrunner-%{version_internal}/omni.ja
       
   495 %{_libdir}/xulrunner-%{version_internal}/README.xulrunner
       
   496 # crashreporter files
       
   497 %if %crashreporter
       
   498 %{_libdir}/xulrunner-%{version_internal}/crashreporter
       
   499 %{_libdir}/xulrunner-%{version_internal}/crashreporter.ini
       
   500 %{_libdir}/xulrunner-%{version_internal}/Throbber-small.gif
       
   501 %endif
       
   502 # ghosts
       
   503 %ghost %{_libdir}/xulrunner-%{version_internal}/global.reginfo
       
   504 %if %suse_version >= 1120
       
   505 %ghost %{_bindir}/xulrunner
       
   506 %endif
       
   507 # API symlink (already in mozilla-js)
       
   508 %if 0%{?shared_js} == 0
       
   509 %{_libdir}/xulrunner-%{apiversion}
       
   510 %endif
       
   511 # compat symlinks
       
   512 %if 0%{?ga_version:1}
       
   513 %ghost %{_libdir}/xulrunner-%{ga_version}
       
   514 %endif
       
   515 
       
   516 %if 0%{?shared_js} == 1
       
   517 %files -n mozilla-js
       
   518 %defattr(-,root,root)
       
   519 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   520 %{_libdir}/xulrunner-%{apiversion}
       
   521 %{_libdir}/xulrunner-%{version_internal}/libmozjs.so
       
   522 %endif
       
   523 
       
   524 %files devel
       
   525 %defattr(-,root,root)
       
   526 %{_libdir}/xulrunner-devel-%{version_internal}/
       
   527 %{_libdir}/xulrunner-%{version_internal}/js-gdb.py
       
   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 %if %localize
       
   534 %files translations-common -f %{_tmppath}/translations.common
       
   535 %defattr(-,root,root)
       
   536 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   537 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   538 
       
   539 %files translations-other -f %{_tmppath}/translations.other
       
   540 %defattr(-,root,root)
       
   541 %dir %{_libdir}/xulrunner-%{version_internal}/
       
   542 %dir %{_libdir}/xulrunner-%{version_internal}/chrome/
       
   543 %endif
       
   544 
       
   545 %if %crashreporter
       
   546 %files buildsymbols
       
   547 %defattr(-,root,root)
       
   548 %{_datadir}/mozilla/
       
   549 %endif
       
   550 
       
   551 %changelog