1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this
3
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
%global __jar_repack %{nil}
7
#Use a consistent string to refer to the package by
8
%define pr_name "%{moz_app_displayname} %{moz_app_version}"
11
Version: %{moz_numeric_app_version}
12
Release: %{?moz_rpm_release:%{moz_rpm_release}}%{?buildid:.%{buildid}}
14
Group: Applications/Internet
15
License: MPLv1.1 or GPLv2+ or LGPLv2+
17
URL: http://www.mozilla.org/projects/firefox/
18
Source0: %{name}.desktop
19
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
23
BuildRequires: desktop-file-utils
27
%{pr_name}. This package was built from
28
%{moz_source_repo}/rev/%{moz_source_stamp}
30
#We only want a subpackage for the SDK if the required
31
#files were generated. Like the tests subpackage, we
32
#probably only need to conditionaly define the %files
36
Summary: %{pr_name} SDK
37
Group: Development/Libraries
38
requires: %{name} = %{version}-%{release}
40
%{pr_name} SDK libraries, headers and interface descriptions
45
Summary: %{pr_name} tests
46
Group: Developement/Libraries
47
requires: %{name} = %{version}-%{release}
49
%{pr_name} test harness files and test cases
61
rm -rf $RPM_BUILD_ROOT
62
make install DESTDIR=$RPM_BUILD_ROOT
63
desktop-file-validate %{SOURCE0}
64
desktop-file-install --vendor mozilla \
65
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
67
#In order to make branding work in a generic way, We find
68
#all the icons that are likely to be used for desktop files
69
#and install them appropriately
70
find %{moz_branding_directory} -name "default*.png" | tee icons.list
71
for i in $(cat icons.list) ; do
72
size=$(echo $i | sed "s/.*default\([0-9]*\).png$/\1/")
73
icondir=$RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/${size}x${size}/apps/
75
cp -a $i ${icondir}%{name}.png
77
rm icons.list #cleanup
80
#wastefully creates a zip file, but ensures that we stage all test suites
82
testdir=$RPM_BUILD_ROOT/%{_datadir}/%{_testsinstalldir}/tests
84
cp -a dist/test-package-stage/* $testdir/
88
rm -rf $RPM_BUILD_ROOT
92
#this is needed to get gnome-panel to update the icons
93
update-desktop-database &> /dev/null || :
94
touch --no-create %{_datadir}/icons/hicolor || :
95
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
96
%{_bindir}/gtk-update-icon-cache --quiet ${_datadir}/icons/hicolor &> /dev/null || :
101
#this is needed to get gnome-panel to update the icons
102
update-desktop-database &> /dev/null || :
103
touch --no-create %{_datadir}/icons/hicolor || :
104
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
105
%{_bindir}/gtk-update-icon-cache --quiet ${_datadir}/icons/hicolor &> /dev/null || :
110
%defattr(-,root,root,-)
113
%{_datadir}/applications/
118
%if %{?createdevel:1}
120
%defattr(-,root,root,-)
127
%if %{?createtests:1}
129
%{_datadir}/%{_testsinstalldir}/tests/
133
#* %{name} %{version} %{moz_rpm_release}
134
#- Please see %{moz_source_repo}/shortlog/%{moz_source_stamp}