Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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}"
10 Name: %{moz_app_name}
11 Version: %{moz_numeric_app_version}
12 Release: %{?moz_rpm_release:%{moz_rpm_release}}%{?buildid:.%{buildid}}
13 Summary: %{pr_name}
14 Group: Applications/Internet
15 License: MPL 2
16 Vendor: Mozilla
17 URL: http://www.mozilla.org/projects/firefox/
18 Source0: %{name}.desktop
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
21 #AutoProv: no
23 BuildRequires: desktop-file-utils
26 %description
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
33 #section.
34 %if %{?createdevel:1}
35 %package devel
36 Summary: %{pr_name} SDK
37 Group: Development/Libraries
38 requires: %{name} = %{version}-%{release}
39 %description devel
40 %{pr_name} SDK libraries, headers and interface descriptions
41 %endif
43 %if %{?createtests:1}
44 %package tests
45 Summary: %{pr_name} tests
46 Group: Developement/Libraries
47 requires: %{name} = %{version}-%{release}
48 %description tests
49 %{pr_name} test harness files and test cases
50 %endif
52 %prep
53 echo No-op prep
56 %build
57 echo No-op build
60 %install
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 \
66 %{SOURCE0}
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/
74 mkdir -p $icondir
75 cp -a $i ${icondir}%{name}.png
76 done
77 rm icons.list #cleanup
79 %if %{?createtests:1}
80 #wastefully creates a zip file, but ensures that we stage all test suites
81 make package-tests
82 testdir=$RPM_BUILD_ROOT/%{_datadir}/%{_testsinstalldir}/tests
83 mkdir -p $testdir
84 cp -a dist/test-package-stage/* $testdir/
85 %endif
87 %clean
88 rm -rf $RPM_BUILD_ROOT
91 %post
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 || :
97 fi
100 %postun
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 || :
106 fi
109 %files
110 %defattr(-,root,root,-)
111 %{_installdir}
112 %{_bindir}
113 %{_datadir}/applications/
114 %{_datadir}/icons/
115 %doc
118 %if %{?createdevel:1}
119 %files devel
120 %defattr(-,root,root,-)
121 %{_includedir}
122 %{_sdkdir}
123 %{_idldir}
124 %endif
127 %if %{?createtests:1}
128 %files tests
129 %{_datadir}/%{_testsinstalldir}/tests/
130 %endif
132 #%changelog
133 #* %{name} %{version} %{moz_rpm_release}
134 #- Please see %{moz_source_repo}/shortlog/%{moz_source_stamp}