MozillaFirefox-branding-openSUSE.spec
changeset 0 a2dad31712ff
child 1 50b4627bec92
equal deleted inserted replaced
-1:000000000000 0:a2dad31712ff
       
     1 #
       
     2 # spec file for package MozillaFirefox-branding-openSUSE (Version 3.5)
       
     3 #
       
     4 # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
       
     5 # Copyright (c) 2008-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 BuildRequires:  MozillaFirefox bc unzip zip
       
    22 Name:           MozillaFirefox-branding-openSUSE
       
    23 License:        BSD3c(or similar) ; GPLv2+
       
    24 Version:        3.5
       
    25 Release:        11
       
    26 Summary:        openSUSE branding of MozillaFirefox
       
    27 Group:          Productivity/Networking/Web/Browsers
       
    28 Source:         susefox-20100609.tar.bz2
       
    29 Source1:        search-addons.tar.bz2
       
    30 Source2:        bookmarks.html.suse
       
    31 Source3:        firefox-suse-default-prefs.js
       
    32 Source4:        firefox.schemas
       
    33 Source5:        distribution.ini.in
       
    34 Source6:        %{name}-COPYING
       
    35 Provides:       MozillaFirefox-branding = %{version}
       
    36 PreReq:         MozillaFirefox >= 3.5
       
    37 Conflicts:      otherproviders(MozillaFirefox-branding)
       
    38 Supplements:    packageand(MozillaFirefox:branding-openSUSE)
       
    39 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
       
    40 %define default_home_page http://www.opensuse.org/
       
    41 %define progdir %{_prefix}/%_lib/firefox
       
    42 %define libgssapi libgssapi_krb5.so.2
       
    43 %define suseversion %(echo -e "scale=1\\n%{suse_version}/100" | bc 2>/dev/null)
       
    44 %define gconf_confdir %{_sysconfdir}/gconf
       
    45 %gconf_schemas_prereq
       
    46 
       
    47 %description
       
    48 This package provides openSUSE Look and Feel for MozillaFirefox.
       
    49 
       
    50 
       
    51 %prep
       
    52 cp -a %{SOURCE6} COPYING
       
    53 %setup -n susefox -q 
       
    54 mv COPYING COPYING.susefox
       
    55 
       
    56 %build
       
    57 ./build.sh
       
    58 
       
    59 %install
       
    60 install -d $RPM_BUILD_ROOT%{progdir}
       
    61 # custom bookmarks
       
    62 install -d $RPM_BUILD_ROOT%{progdir}/defaults/profile
       
    63 install -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{progdir}/defaults/profile/bookmarks.html
       
    64 # apply SUSE defaults
       
    65 install -d $RPM_BUILD_ROOT%{progdir}/defaults/preferences
       
    66 sed -e 's,GSSAPI,%{libgssapi},g' \
       
    67    %{SOURCE3} > suse-default-prefs
       
    68 install -m0644 suse-default-prefs $RPM_BUILD_ROOT%{progdir}/defaults/preferences/firefox-openSUSE.js
       
    69 rm suse-default-prefs
       
    70 # distribution.ini
       
    71 install -d $RPM_BUILD_ROOT%{progdir}/distribution
       
    72 sed -e 's,%VERSION%,%{suseversion},g' \
       
    73    %{SOURCE5} > distribution.ini
       
    74 install -m 0644 distribution.ini $RPM_BUILD_ROOT%{progdir}/distribution/
       
    75 # search plugins
       
    76 install -d $RPM_BUILD_ROOT%{progdir}/searchplugins
       
    77 (cd $RPM_BUILD_ROOT%{progdir}/searchplugins ; tar xjf %{SOURCE1})
       
    78 # SCHEMA file
       
    79 mkdir -p $RPM_BUILD_ROOT%{gconf_confdir}/schemas
       
    80 install -m 644 %{SOURCE4} \
       
    81                $RPM_BUILD_ROOT%{gconf_confdir}/schemas/
       
    82 %find_gconf_schemas
       
    83 # browserconfig.properties
       
    84 cat << EOF >> suse-browserconfig.properties
       
    85 browser.startup.homepage=%{default_home_page}
       
    86 browser.startup.homepage_reset=%{default_home_page}
       
    87 EOF
       
    88 install -m0644 suse-browserconfig.properties $RPM_BUILD_ROOT%{progdir}/browserconfig.properties
       
    89 rm suse-browserconfig.properties
       
    90 # install the system extension
       
    91 mkdir susefox\@opensuse.org
       
    92 (cd susefox\@opensuse.org; unzip ../susefox.xpi)
       
    93 mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
       
    94 cp -r susefox\@opensuse.org \
       
    95       $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
       
    96 
       
    97 %clean
       
    98 rm -rf $RPM_BUILD_ROOT
       
    99 
       
   100 %pre -f %{name}.schemas_pre
       
   101 
       
   102 %preun -f %{name}.schemas_preun
       
   103 
       
   104 %posttrans -f %{name}.schemas_posttrans
       
   105 
       
   106 %files -f %{name}.schemas_list
       
   107 %defattr(-,root,root)
       
   108 %doc COPYING.susefox
       
   109 %doc ../COPYING
       
   110 %{progdir}/defaults/preferences/firefox-openSUSE.js
       
   111 %{progdir}/defaults/profile/bookmarks.html
       
   112 %{progdir}/browserconfig.properties
       
   113 %{progdir}/searchplugins/*
       
   114 %{progdir}/distribution
       
   115 %{_datadir}/mozilla
       
   116 
       
   117 %changelog