1 # |
1 # |
2 # spec file for package MozillaFirefox-branding-openSUSE |
2 # spec file for package MozillaFirefox-branding-openSUSE |
3 # |
3 # |
4 # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. |
4 # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. |
5 # Copyright (c) 2008-2013 Wolfgang Rosenauer |
5 # Copyright (c) 2008-2013 Wolfgang Rosenauer |
6 # |
6 # |
7 # All modifications and additions to the file contributed by third parties |
7 # All modifications and additions to the file contributed by third parties |
8 # remain the property of their copyright owners, unless otherwise agreed |
8 # remain the property of their copyright owners, unless otherwise agreed |
9 # upon. The license for this file, and modifications and additions to the |
9 # upon. The license for this file, and modifications and additions to the |
43 Conflicts: otherproviders(MozillaFirefox-branding) |
43 Conflicts: otherproviders(MozillaFirefox-branding) |
44 Conflicts: otherproviders(firefox-esr-branding) |
44 Conflicts: otherproviders(firefox-esr-branding) |
45 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
45 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
46 %define progdir %{_libdir}/firefox |
46 %define progdir %{_libdir}/firefox |
47 %define libgssapi libgssapi_krb5.so.2 |
47 %define libgssapi libgssapi_krb5.so.2 |
|
48 %if %suse_version == 1315 |
|
49 # Leap 42 |
|
50 %define suseversion 42.1 |
|
51 %define distname openSUSE Leap |
|
52 %else |
|
53 # openSUSE <= 13.2 & Tumbleweed? |
48 %define suseversion %(echo -e "scale=1\\n%{suse_version}/100" | bc 2>/dev/null) |
54 %define suseversion %(echo -e "scale=1\\n%{suse_version}/100" | bc 2>/dev/null) |
49 # HINT: default homepage is a property now included in susefox |
55 %define distname openSUSE |
|
56 %endif |
|
57 %define homepage https://www.opensuse.org/searchPage/ |
|
58 %define susefox 0 |
50 |
59 |
51 %description |
60 %description |
52 This package provides openSUSE Look and Feel for Firefox. |
61 This package provides openSUSE Look and Feel for Firefox. |
53 |
62 |
54 %prep |
63 %prep |
55 cp -a %{SOURCE6} COPYING |
64 cp -a %{SOURCE6} COPYING |
|
65 %if %susefox |
56 %setup -n susefox -q |
66 %setup -n susefox -q |
57 mv COPYING COPYING.susefox |
67 mv COPYING COPYING.susefox |
|
68 %endif |
58 |
69 |
59 %build |
70 %build |
|
71 %if %susefox |
60 ./build.sh |
72 ./build.sh |
|
73 %endif |
61 |
74 |
62 %install |
75 %install |
63 install -d $RPM_BUILD_ROOT%{progdir} |
76 install -d $RPM_BUILD_ROOT%{progdir} |
64 install -d $RPM_BUILD_ROOT%{progdir}/browser |
77 install -d $RPM_BUILD_ROOT%{progdir}/browser |
65 # custom bookmarks |
78 # custom bookmarks |
73 install -m0644 suse-default-prefs $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/firefox-openSUSE.js |
86 install -m0644 suse-default-prefs $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/firefox-openSUSE.js |
74 rm suse-default-prefs |
87 rm suse-default-prefs |
75 install -m0644 %{SOURCE7} $RPM_BUILD_ROOT%{progdir}/defaults/pref/ |
88 install -m0644 %{SOURCE7} $RPM_BUILD_ROOT%{progdir}/defaults/pref/ |
76 # distribution.ini |
89 # distribution.ini |
77 install -d $RPM_BUILD_ROOT%{progdir}/distribution |
90 install -d $RPM_BUILD_ROOT%{progdir}/distribution |
78 sed -e 's,%VERSION%,%{suseversion},g' \ |
91 sed -e 's,%VERSION%,%{suseversion},g |
|
92 s,%HOMEPAGE%,%{homepage},g |
|
93 s,%DIST%,%{distname},g' \ |
79 %{SOURCE5} > distribution.ini |
94 %{SOURCE5} > distribution.ini |
80 install -m 0644 distribution.ini $RPM_BUILD_ROOT%{progdir}/distribution/ |
95 install -m 0644 distribution.ini $RPM_BUILD_ROOT%{progdir}/distribution/ |
81 # search plugins |
96 # search plugins |
82 install -d $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/ |
97 install -d $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/ |
83 sed -e 's,%VERSION%,%{suseversion},g' \ |
98 sed -e 's,%VERSION%,%{suseversion},g' \ |
84 %{SOURCE1} > $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/opensuse-software.xml |
99 %{SOURCE1} > $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/opensuse-software.xml |
85 cp %{SOURCE8} $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/ |
100 cp %{SOURCE8} $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/ |
|
101 %if %susefox |
86 # install the system extension |
102 # install the system extension |
87 mkdir susefox\@opensuse.org |
103 mkdir susefox\@opensuse.org |
88 (cd susefox\@opensuse.org; unzip ../susefox.xpi) |
104 (cd susefox\@opensuse.org; unzip ../susefox.xpi) |
89 mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ |
105 mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ |
90 cp -r susefox\@opensuse.org \ |
106 cp -r susefox\@opensuse.org \ |
91 $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ |
107 $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ |
|
108 %endif |
92 |
109 |
93 %clean |
110 %clean |
94 rm -rf $RPM_BUILD_ROOT |
111 rm -rf $RPM_BUILD_ROOT |
95 |
112 |
96 %files |
113 %files |
97 %defattr(-,root,root) |
114 %defattr(-,root,root) |
|
115 %if %susefox |
98 %doc COPYING.susefox |
116 %doc COPYING.susefox |
99 %doc ../COPYING |
117 %doc ../COPYING |
|
118 %{_datadir}/mozilla |
|
119 %endif |
100 %dir %{progdir} |
120 %dir %{progdir} |
101 %dir %{progdir}/defaults/ |
121 %dir %{progdir}/defaults/ |
102 %dir %{progdir}/defaults/pref |
122 %dir %{progdir}/defaults/pref |
103 %{progdir}/defaults/pref/all-openSUSE.js |
123 %{progdir}/defaults/pref/all-openSUSE.js |
104 %dir %{progdir}/browser/ |
124 %dir %{progdir}/browser/ |