1
# ***** BEGIN LICENSE BLOCK *****
2
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
# The contents of this file are subject to the Mozilla Public License Version
5
# 1.1 (the "License"); you may not use this file except in compliance with
6
# the License. You may obtain a copy of the License at
7
# http://www.mozilla.org/MPL/
9
# Software distributed under the License is distributed on an "AS IS" basis,
10
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
# for the specific language governing rights and limitations under the
14
# The Original Code is Mozilla Application packaging specific RPM Spec file.
16
# The Initial Developer of the Original Code is
17
# Mozilla Corporation.
18
# Portions created by the Initial Developer are Copyright (C) 2011
19
# the Initial Developer. All Rights Reserved.
22
# John Ford <jhford@mozilla.com>
24
# Alternatively, the contents of this file may be used under the terms of
25
# either the GNU General Public License Version 2 or later (the "GPL"), or
26
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
# in which case the provisions of the GPL or the LGPL are applicable instead
28
# of those above. If you wish to allow use of your version of this file only
29
# under the terms of either the GPL or the LGPL, and not to allow others to
30
# use your version of this file under the terms of the MPL, indicate your
31
# decision by deleting the provisions above and replace them with the notice
32
# and other provisions required by the GPL or the LGPL. If you do not delete
33
# the provisions above, a recipient may use your version of this file under
34
# the terms of any one of the MPL, the GPL or the LGPL.
36
# ***** END LICENSE BLOCK *****
38
%global __jar_repack %{nil}
40
#Use a consistent string to refer to the package by
41
%define pr_name "%{moz_app_displayname} %{moz_app_version}"
44
Version: %{moz_numeric_app_version}
45
Release: %{?moz_rpm_release:%{moz_rpm_release}}%{?buildid:.%{buildid}}
47
Group: Applications/Internet
48
License: MPLv1.1 or GPLv2+ or LGPLv2+
50
URL: http://www.mozilla.org/projects/firefox/
51
Source0: %{name}.desktop
52
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
56
BuildRequires: desktop-file-utils
60
%{pr_name}. This package was built from
61
%{moz_source_repo}/rev/%{moz_source_stamp}
63
#We only want a subpackage for the SDK if the required
64
#files were generated. Like the tests subpackage, we
65
#probably only need to conditionaly define the %files
69
Summary: %{pr_name} SDK
70
Group: Development/Libraries
71
requires: %{name} = %{version}-%{release}
73
%{pr_name} SDK libraries, headers and interface descriptions
78
Summary: %{pr_name} tests
79
Group: Developement/Libraries
80
requires: %{name} = %{version}-%{release}
82
%{pr_name} test harness files and test cases
94
rm -rf $RPM_BUILD_ROOT
95
make install DESTDIR=$RPM_BUILD_ROOT
96
desktop-file-validate %{SOURCE0}
97
desktop-file-install --vendor mozilla \
98
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
100
#In order to make branding work in a generic way, We find
101
#all the icons that are likely to be used for desktop files
102
#and install them appropriately
103
find %{moz_branding_directory} -name "default*.png" | tee icons.list
104
for i in $(cat icons.list) ; do
105
size=$(echo $i | sed "s/.*default\([0-9]*\).png$/\1/")
106
icondir=$RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/${size}x${size}/apps/
108
cp -a $i ${icondir}%{name}.png
110
rm icons.list #cleanup
112
%if %{?createtests:1}
113
#wastefully creates a zip file, but ensures that we stage all test suites
115
testdir=$RPM_BUILD_ROOT/%{_datadir}/%{_testsinstalldir}/tests
117
cp -a dist/test-package-stage/* $testdir/
121
rm -rf $RPM_BUILD_ROOT
125
#this is needed to get gnome-panel to update the icons
126
update-desktop-database &> /dev/null || :
127
touch --no-create %{_datadir}/icons/hicolor || :
128
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
129
%{_bindir}/gtk-update-icon-cache --quiet ${_datadir}/icons/hicolor &> /dev/null || :
134
#this is needed to get gnome-panel to update the icons
135
update-desktop-database &> /dev/null || :
136
touch --no-create %{_datadir}/icons/hicolor || :
137
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
138
%{_bindir}/gtk-update-icon-cache --quiet ${_datadir}/icons/hicolor &> /dev/null || :
143
%defattr(-,root,root,-)
146
%{_datadir}/applications/
151
%if %{?createdevel:1}
153
%defattr(-,root,root,-)
160
%if %{?createtests:1}
162
%{_datadir}/%{_testsinstalldir}/tests/
166
#* %{name} %{version} %{moz_rpm_release}
167
#- Please see %{moz_source_repo}/shortlog/%{moz_source_stamp}