MozillaFirefox/MozillaFirefox.spec
changeset 101 1678af7b5183
parent 99 e7df24b73a40
child 103 2d06b722437b
equal deleted inserted replaced
100:f224b7faa82f 101:1678af7b5183
    18 
    18 
    19 # norootforbuild
    19 # norootforbuild
    20 
    20 
    21 
    21 
    22 Name:           MozillaFirefox4
    22 Name:           MozillaFirefox4
       
    23 %define use_xulrunner 1
    23 %define xulrunner mozilla-xulrunner20
    24 %define xulrunner mozilla-xulrunner20
    24 BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa
    25 BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa
    25 BuildRequires:  %{xulrunner}-devel = 2.0b
       
    26 %if %suse_version > 1110
    26 %if %suse_version > 1110
    27 BuildRequires:  libiw-devel
    27 BuildRequires:  libiw-devel
    28 %else
    28 %else
    29 BuildRequires:  wireless-tools
    29 BuildRequires:  wireless-tools
       
    30 %endif
       
    31 %if 0%{?use_xulrunner}
       
    32 BuildRequires:  %{xulrunner}-devel = 2.0b
    30 %endif
    33 %endif
    31 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
    34 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
    32 Provides:       web_browser
    35 Provides:       web_browser
    33 Provides:       firefox
    36 Provides:       firefox
    34 Version:        4.0b
    37 Version:        4.0b
    35 Release:        1
    38 Release:        1
    36 %define         releasedate 2010070700
    39 %define         releasedate 2010072000
    37 Summary:        Mozilla Firefox Web Browser
    40 Summary:        Mozilla Firefox Web Browser
    38 Url:            http://www.mozilla.org/
    41 Url:            http://www.mozilla.org/
    39 Group:          Productivity/Networking/Web/Browsers
    42 Group:          Productivity/Networking/Web/Browsers
    40 Source:         firefox-%{version}-source.tar.bz2
    43 Source:         firefox-%{version}-source.tar.bz2
    41 Source1:        MozillaFirefox.desktop
    44 Source1:        MozillaFirefox.desktop
    56 Patch5:         firefox-browser-css.patch
    59 Patch5:         firefox-browser-css.patch
    57 Patch6:         firefox-cross-desktop.patch
    60 Patch6:         firefox-cross-desktop.patch
    58 Patch8:         firefox-appname.patch
    61 Patch8:         firefox-appname.patch
    59 Patch9:         firefox-kde.patch
    62 Patch9:         firefox-kde.patch
    60 Patch10:        firefox-ui-lockdown.patch
    63 Patch10:        firefox-ui-lockdown.patch
       
    64 Patch11:        firefox-no-sync-l10n.patch
    61 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    65 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    62 Requires(post):   coreutils shared-mime-info desktop-file-utils
    66 Requires(post):   coreutils shared-mime-info desktop-file-utils
    63 Requires(postun): shared-mime-info desktop-file-utils
    67 Requires(postun): shared-mime-info desktop-file-utils
       
    68 %if 0%{?use_xulrunner}
    64 Requires:       %{xulrunner} >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
    69 Requires:       %{xulrunner} >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
    65 %requires_eq    %{xulrunner}
    70 %requires_eq    %{xulrunner}
    66 %ifarch %ix86
    71 %ifarch %ix86
    67 Requires:       %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
    72 Requires:       %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
    68 Requires:       %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
    73 Requires:       %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
       
    74 %endif
    69 %endif
    75 %endif
    70 Requires:       %{name}-branding > 3.6
    76 Requires:       %{name}-branding > 3.6
    71 %define _use_internal_dependency_generator 0
    77 %define _use_internal_dependency_generator 0
    72 %define __find_requires sh %{SOURCE4}
    78 %define __find_requires sh %{SOURCE4}
    73 %global provfind sh -c "grep -v '.so' | %__find_provides"
    79 %global provfind sh -c "grep -v '.so' | %__find_provides"
    74 %global __find_provides %provfind
    80 %global __find_provides %provfind
    75 %define progname firefox4
    81 %define progname firefox4
    76 %define progdir %{_prefix}/%_lib/%{progname}
    82 %define progdir %{_prefix}/%_lib/%{progname}
    77 %define gnome_dir     %{_prefix}
    83 %define gnome_dir     %{_prefix}
    78 ### build options
    84 ### build options
    79 %define branding 0
    85 %define branding 1
    80 %define localize 0 
    86 %define localize 1
    81 ### build options end
    87 ### build options end
    82 
    88 
    83 %description
    89 %description
    84 Mozilla Firefox is a standalone web browser, designed for standards
    90 Mozilla Firefox is a standalone web browser, designed for standards
    85 compliance and performance.  Its functionality can be enhanced via a
    91 compliance and performance.  Its functionality can be enhanced via a
    91 Summary:        Common translations for MozillaFirefox
    97 Summary:        Common translations for MozillaFirefox
    92 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
    98 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
    93 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)
    99 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)
    94 Group:          System/Localization
   100 Group:          System/Localization
    95 Requires:       %{name} = %{version}
   101 Requires:       %{name} = %{version}
       
   102 %if 0%{?use_xulrunner}
    96 Requires:       %{xulrunner}-translations-common
   103 Requires:       %{xulrunner}-translations-common
       
   104 %endif
    97 Obsoletes:      %{name}-translations < %{version}-%{release}
   105 Obsoletes:      %{name}-translations < %{version}-%{release}
    98 
   106 
    99 %description translations-common
   107 %description translations-common
   100 This package contains several common languages for the user interface
   108 This package contains several common languages for the user interface
   101 of MozillaFirefox.
   109 of MozillaFirefox.
   104 Summary:        Extra translations for MozillaFirefox
   112 Summary:        Extra translations for MozillaFirefox
   105 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
   113 License:        GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
   106 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)
   114 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)
   107 Group:          System/Localization
   115 Group:          System/Localization
   108 Requires:       %{name} = %{version}
   116 Requires:       %{name} = %{version}
       
   117 %if 0%{?use_xulrunner}
   109 Requires:       %{xulrunner}-translations-other
   118 Requires:       %{xulrunner}-translations-other
       
   119 %endif
   110 Obsoletes:      %{name}-translations < %{version}-%{release}
   120 Obsoletes:      %{name}-translations < %{version}-%{release}
   111 
   121 
   112 %description translations-other
   122 %description translations-other
   113 This package contains rarely used languages for the user interface
   123 This package contains rarely used languages for the user interface
   114 of MozillaFirefox.
   124 of MozillaFirefox.
   152 #%patch9 -p1
   162 #%patch9 -p1
   153 # install kde.js
   163 # install kde.js
   154 #install -m 644 %{SOURCE6} browser/app/profile/kde.js
   164 #install -m 644 %{SOURCE6} browser/app/profile/kde.js
   155 %endif
   165 %endif
   156 #%patch10 -p1
   166 #%patch10 -p1
       
   167 %patch11 -p1
   157 
   168 
   158 %build
   169 %build
   159 export MOZ_BUILD_DATE=%{releasedate}
   170 export MOZ_BUILD_DATE=%{releasedate}
   160 export MOZILLA_OFFICIAL=1
   171 export MOZILLA_OFFICIAL=1
   161 export BUILD_OFFICIAL=1
   172 export BUILD_OFFICIAL=1
   173 ac_add_options --sysconfdir=%{_sysconfdir}
   184 ac_add_options --sysconfdir=%{_sysconfdir}
   174 ac_add_options --mandir=%{_mandir}
   185 ac_add_options --mandir=%{_mandir}
   175 ac_add_options --includedir=%{_includedir}
   186 ac_add_options --includedir=%{_includedir}
   176 ac_add_options --with-system-nspr
   187 ac_add_options --with-system-nspr
   177 ac_add_options --with-system-nss
   188 ac_add_options --with-system-nss
   178 ac_add_options --with-libxul-sdk=$SDKDIR
       
   179 ac_add_options --with-l10n-base=../l10n
   189 ac_add_options --with-l10n-base=../l10n
   180 ac_add_options --with-system-jpeg
   190 ac_add_options --with-system-jpeg
   181 #ac_add_options --with-system-png     # doesn't work because of missing APNG support
   191 #ac_add_options --with-system-png     # doesn't work because of missing APNG support
   182 ac_add_options --with-system-zlib
   192 ac_add_options --with-system-zlib
   183 ac_add_options --disable-installer
   193 ac_add_options --disable-installer
   184 ac_add_options --disable-updater
   194 ac_add_options --disable-updater
   185 ac_add_options --disable-tests
   195 ac_add_options --disable-tests
   186 ac_add_options --disable-debug
   196 ac_add_options --disable-debug
   187 EOF
   197 EOF
       
   198 %if 0%{?use_xulrunner}
       
   199 cat << EOF >> $MOZCONFIG
       
   200 ac_add_options --with-libxul-sdk=$SDKDIR
       
   201 EOF
       
   202 %endif
   188 %if %branding
   203 %if %branding
   189 cat << EOF >> $MOZCONFIG
   204 cat << EOF >> $MOZCONFIG
   190 ac_add_options --enable-official-branding
   205 ac_add_options --enable-official-branding
   191 EOF
   206 EOF
   192 %endif
   207 %endif
   201 %if %localize
   216 %if %localize
   202 rm -f %{_tmppath}/translations.*
   217 rm -f %{_tmppath}/translations.*
   203 touch %{_tmppath}/translations.{common,other}
   218 touch %{_tmppath}/translations.{common,other}
   204 for locale in $(awk '{ print $1; }' browser/locales/shipped-locales); do
   219 for locale in $(awk '{ print $1; }' browser/locales/shipped-locales); do
   205   case $locale in
   220   case $locale in
   206    ja-JP-mac|en-US)
   221    ja-JP-mac|en-US|pt-PT)
   207 	;;
   222 	;;
   208    *)
   223    *)
   209   	make -C browser/locales libs-$locale
   224   	make -C browser/locales libs-$locale
   210   	cp dist/xpi-stage/locale-$locale/chrome/$locale.jar \
   225   	cp dist/xpi-stage/locale-$locale/chrome/$locale.jar \
   211     	  $RPM_BUILD_ROOT%{progdir}/chrome
   226     	  $RPM_BUILD_ROOT%{progdir}/chrome