MozillaFirefox/MozillaFirefox.spec
changeset 225 5a7504b93699
parent 223 4555a5d0d661
child 226 6bf3bb4c115e
equal deleted inserted replaced
224:f6a61d48d483 225:5a7504b93699
    16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
    16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
    17 #
    17 #
    18 
    18 
    19 # norootforbuild
    19 # norootforbuild
    20 
    20 
       
    21 %define major 4
       
    22 %define mainver %major.0
    21 
    23 
    22 Name:           MozillaFirefox
    24 Name:           MozillaFirefox
    23 %define use_xulrunner 1
    25 %define use_xulrunner 1
    24 %define xulrunner mozilla-xulrunner20
    26 %define xulrunner mozilla-xulrunner20
    25 BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm
    27 BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm
    30 %endif
    32 %endif
    31 %if 0%{?use_xulrunner}
    33 %if 0%{?use_xulrunner}
    32 BuildRequires:  %{xulrunner}-devel = 2.0b10
    34 BuildRequires:  %{xulrunner}-devel = 2.0b10
    33 %endif
    35 %endif
    34 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
    36 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
    35 Version:        4.0b10
    37 Version:        %{mainver}b10
       
    38 Release:        1
    36 Provides:       web_browser
    39 Provides:       web_browser
    37 Provides:       firefox = %{version}
    40 Provides:       firefox = %{version}-%{release}
    38 Release:        1
    41 Provides:       firefox = %{mainver}
    39 %define         releasedate 2011012100
    42 %define         releasedate 2011012100
    40 Summary:        Mozilla Firefox Web Browser
    43 Summary:        Mozilla Firefox Web Browser
    41 Url:            http://www.mozilla.org/
    44 Url:            http://www.mozilla.org/
    42 Group:          Productivity/Networking/Web/Browsers
    45 Group:          Productivity/Networking/Web/Browsers
    43 Source:         firefox-%{version}-source.tar.bz2
    46 Source:         firefox-%{version}-source.tar.bz2
    50 Source7:        l10n-%{version}.tar.bz2
    53 Source7:        l10n-%{version}.tar.bz2
    51 Source8:        firefox-mimeinfo.xml
    54 Source8:        firefox-mimeinfo.xml
    52 Source9:        firefox-lockdown.js
    55 Source9:        firefox-lockdown.js
    53 Source10:       compare-locales.tar.bz2
    56 Source10:       compare-locales.tar.bz2
    54 Source11:       firefox.1
    57 Source11:       firefox.1
       
    58 Source12:       mozilla-get-app-id
    55 Patch1:         toolkit-download-folder.patch
    59 Patch1:         toolkit-download-folder.patch
    56 Patch2:         firefox-linkorder.patch
    60 Patch2:         firefox-linkorder.patch
    57 Patch3:         firefox-browser-css.patch
    61 Patch3:         firefox-browser-css.patch
    58 Patch4:         firefox-cross-desktop.patch
    62 Patch4:         firefox-cross-desktop.patch
    59 Patch5:         firefox-kde.patch
    63 Patch5:         firefox-kde.patch
    60 Patch6:         firefox-kde-114.patch
    64 Patch6:         firefox-kde-114.patch
    61 Patch7:         firefox-ui-lockdown.patch
    65 Patch7:         firefox-ui-lockdown.patch
    62 Patch8:         firefox-no-sync-l10n.patch
    66 Patch8:         firefox-no-sync-l10n.patch
    63 Patch9:         firefox-libxulsdk-locales.patch
    67 Patch9:         firefox-libxulsdk-locales.patch
    64 Patch10:         firefox-no-default-ualocale.patch
    68 Patch10:        firefox-no-default-ualocale.patch
    65 Patch11:        firefox-multilocale-chrome.patch
    69 Patch11:        firefox-multilocale-chrome.patch
    66 Patch12:        firefox-shellservice.patch
    70 Patch12:        firefox-shellservice.patch
    67 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    71 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    68 Requires(post):   coreutils shared-mime-info desktop-file-utils
    72 Requires(post):   coreutils shared-mime-info desktop-file-utils
    69 Requires(postun): shared-mime-info desktop-file-utils
    73 Requires(postun): shared-mime-info desktop-file-utils
    74 Requires:       %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
    78 Requires:       %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
    75 Requires:       %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
    79 Requires:       %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
    76 %endif
    80 %endif
    77 %endif
    81 %endif
    78 Requires:       %{name}-branding >= 4.0
    82 Requires:       %{name}-branding >= 4.0
       
    83 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
    79 %define _use_internal_dependency_generator 0
    84 %define _use_internal_dependency_generator 0
    80 %define __find_requires sh %{SOURCE4}
    85 %define __find_requires sh %{SOURCE4}
    81 %global provfind sh -c "grep -v '.so' | %__find_provides"
    86 %global provfind sh -c "grep -v '.so' | %__find_provides"
    82 %global __find_provides %provfind
    87 %global __find_provides %provfind
    83 %define progname firefox
    88 %define progname firefox
   101 %description
   106 %description
   102 Mozilla Firefox is a standalone web browser, designed for standards
   107 Mozilla Firefox is a standalone web browser, designed for standards
   103 compliance and performance.  Its functionality can be enhanced via a
   108 compliance and performance.  Its functionality can be enhanced via a
   104 plethora of extensions.
   109 plethora of extensions.
   105 
   110 
       
   111 %package devel
       
   112 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
       
   113 Summary:        Devel package for Firefox
       
   114 Group:          Development/Tools/Other
       
   115 Provides:       firefox-devel = %{version}-%{release}
       
   116 Requires:       %{name} = %{version}
       
   117 Requires:       perl(XML::Simple)
       
   118 Requires:       perl(Archive::Zip)
       
   119 
       
   120 %description devel
       
   121 Development files for Firefox to make packaging of addons easier.
   106 
   122 
   107 %if %localize
   123 %if %localize
   108 %package translations-common
   124 %package translations-common
   109 Summary:        Common translations for MozillaFirefox
   125 Summary:        Common translations for MozillaFirefox
   110 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
   126 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
   126 Obsoletes:      %{name}-translations < %{version}-%{release}
   142 Obsoletes:      %{name}-translations < %{version}-%{release}
   127 
   143 
   128 %description translations-other
   144 %description translations-other
   129 This package contains rarely used languages for the user interface
   145 This package contains rarely used languages for the user interface
   130 of MozillaFirefox.
   146 of MozillaFirefox.
   131 
       
   132 %endif
   147 %endif
   133 
   148 
   134 %package branding-upstream
   149 %package branding-upstream
   135 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
   150 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
   136 Summary:        Upstream branding for MozillaFirefox
   151 Summary:        Upstream branding for MozillaFirefox
   289 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
   304 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
   290 cp %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1/%{progname}.1
   305 cp %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1/%{progname}.1
   291 ##########
   306 ##########
   292 # ADDONS
   307 # ADDONS
   293 #
   308 #
       
   309 mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_appid}
       
   310 mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_appid}
   294 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
   311 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
   295 ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}.png
   312 ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}.png
   296 ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}-gnome.png
   313 ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}-gnome.png
   297 %if %branding
   314 %if %branding
   298 for size in 16 32 48; do
   315 for size in 16 32 48; do
   307 rm -f $RPM_BUILD_ROOT%{progdir}/removed-files
   324 rm -f $RPM_BUILD_ROOT%{progdir}/removed-files
   308 rm -f $RPM_BUILD_ROOT%{progdir}/README.txt
   325 rm -f $RPM_BUILD_ROOT%{progdir}/README.txt
   309 rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties
   326 rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties
   310 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh
   327 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh
   311 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE
   328 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE
       
   329 # devel
       
   330 mkdir -p %{buildroot}%{_bindir}
       
   331 install -m 755 %SOURCE12 %{buildroot}%{_bindir}
       
   332 # inspired by mandriva
       
   333 mkdir -p %{buildroot}/etc/rpm
       
   334 cat <<'FIN' >%{buildroot}/etc/rpm/macros.%{progname}
       
   335 # Macros from %{name} package
       
   336 %%firefox_major              %{major}
       
   337 %%firefox_version            %{version}
       
   338 %%firefox_mainver            %{mainver}
       
   339 %%firefox_mozillapath        %{progdir}
       
   340 %%firefox_xulrunner          %{xulrunner}
       
   341 %%firefox_xulrunner_version  %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
       
   342 %%firefox_pluginsdir         %{_libdir}/browser-plugins
       
   343 %%firefox_appid              \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
       
   344 %%firefox_extdir             %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
       
   345 
       
   346 %%firefox_ext_install() \
       
   347    extdir="%%{buildroot}%%{firefox_extdir}/`mozilla-get-app-id '%%1'`" \
       
   348    mkdir -p "$extdir" \
       
   349    %%{__unzip} -q -d "$extdir" "%%1" \
       
   350    %%{nil}
       
   351 FIN
       
   352 # just dumping an xpi file there doesn't work...
       
   353 #%%firefox_ext_install() \
       
   354 #       extdir="%%{buildroot}%%{firefox_extdir}" \
       
   355 #       mkdir -p "$extdir" \
       
   356 #       cp "%%1" "$extdir" \
       
   357 #       %%{nil}
   312 # fdupes
   358 # fdupes
   313 %fdupes $RPM_BUILD_ROOT%{progdir}
   359 %fdupes $RPM_BUILD_ROOT%{progdir}
   314 %fdupes $RPM_BUILD_ROOT%{_datadir}
   360 %fdupes $RPM_BUILD_ROOT%{_datadir}
   315 
   361 
   316 %clean
   362 %clean
   378 %endif
   424 %endif
   379 %{progdir}/chrome.manifest
   425 %{progdir}/chrome.manifest
   380 %{_datadir}/applications/%{desktop_file_name}.desktop
   426 %{_datadir}/applications/%{desktop_file_name}.desktop
   381 %{_datadir}/mime/packages/%{progname}.xml
   427 %{_datadir}/mime/packages/%{progname}.xml
   382 %{_datadir}/pixmaps/firefox*
   428 %{_datadir}/pixmaps/firefox*
       
   429 %dir %{_datadir}/mozilla
       
   430 %dir %{_datadir}/mozilla/extensions
       
   431 %dir %{_datadir}/mozilla/extensions/%{firefox_appid}
       
   432 %dir %{_libdir}/mozilla
       
   433 %dir %{_libdir}/mozilla/extensions
       
   434 %dir %{_libdir}/mozilla/extensions/%{firefox_appid}
   383 %if %branding
   435 %if %branding
   384 %{gnome_dir}/share/icons/hicolor/
   436 %{gnome_dir}/share/icons/hicolor/
   385 %endif
   437 %endif
   386 %{_bindir}/%{progname}
   438 %{_bindir}/%{progname}
   387 %doc %{_mandir}/man1/%{progname}.1.gz
   439 %doc %{_mandir}/man1/%{progname}.1.gz
       
   440 
       
   441 %files devel
       
   442 %defattr(-,root,root)
       
   443 %{_bindir}/mozilla-get-app-id
       
   444 %config /etc/rpm/macros.%{progname}
   388 
   445 
   389 %if %localize
   446 %if %localize
   390 %files translations-common -f %{_tmppath}/translations.common
   447 %files translations-common -f %{_tmppath}/translations.common
   391 %defattr(-,root,root)
   448 %defattr(-,root,root)
   392 %dir %{progdir}
   449 %dir %{progdir}