1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/installer/linux/rpm/mozilla.spec Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,134 @@ 1.4 +# This Source Code Form is subject to the terms of the Mozilla Public 1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + 1.8 +%global __jar_repack %{nil} 1.9 + 1.10 +#Use a consistent string to refer to the package by 1.11 +%define pr_name "%{moz_app_displayname} %{moz_app_version}" 1.12 + 1.13 +Name: %{moz_app_name} 1.14 +Version: %{moz_numeric_app_version} 1.15 +Release: %{?moz_rpm_release:%{moz_rpm_release}}%{?buildid:.%{buildid}} 1.16 +Summary: %{pr_name} 1.17 +Group: Applications/Internet 1.18 +License: MPL 2 1.19 +Vendor: Mozilla 1.20 +URL: http://www.mozilla.org/projects/firefox/ 1.21 +Source0: %{name}.desktop 1.22 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 1.23 + 1.24 +#AutoProv: no 1.25 + 1.26 +BuildRequires: desktop-file-utils 1.27 + 1.28 + 1.29 +%description 1.30 +%{pr_name}. This package was built from 1.31 +%{moz_source_repo}/rev/%{moz_source_stamp} 1.32 + 1.33 +#We only want a subpackage for the SDK if the required 1.34 +#files were generated. Like the tests subpackage, we 1.35 +#probably only need to conditionaly define the %files 1.36 +#section. 1.37 +%if %{?createdevel:1} 1.38 +%package devel 1.39 +Summary: %{pr_name} SDK 1.40 +Group: Development/Libraries 1.41 +requires: %{name} = %{version}-%{release} 1.42 +%description devel 1.43 +%{pr_name} SDK libraries, headers and interface descriptions 1.44 +%endif 1.45 + 1.46 +%if %{?createtests:1} 1.47 +%package tests 1.48 +Summary: %{pr_name} tests 1.49 +Group: Developement/Libraries 1.50 +requires: %{name} = %{version}-%{release} 1.51 +%description tests 1.52 +%{pr_name} test harness files and test cases 1.53 +%endif 1.54 + 1.55 +%prep 1.56 +echo No-op prep 1.57 + 1.58 + 1.59 +%build 1.60 +echo No-op build 1.61 + 1.62 + 1.63 +%install 1.64 +rm -rf $RPM_BUILD_ROOT 1.65 +make install DESTDIR=$RPM_BUILD_ROOT 1.66 +desktop-file-validate %{SOURCE0} 1.67 +desktop-file-install --vendor mozilla \ 1.68 + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ 1.69 + %{SOURCE0} 1.70 +#In order to make branding work in a generic way, We find 1.71 +#all the icons that are likely to be used for desktop files 1.72 +#and install them appropriately 1.73 +find %{moz_branding_directory} -name "default*.png" | tee icons.list 1.74 +for i in $(cat icons.list) ; do 1.75 + size=$(echo $i | sed "s/.*default\([0-9]*\).png$/\1/") 1.76 + icondir=$RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/${size}x${size}/apps/ 1.77 + mkdir -p $icondir 1.78 + cp -a $i ${icondir}%{name}.png 1.79 +done 1.80 +rm icons.list #cleanup 1.81 + 1.82 +%if %{?createtests:1} 1.83 +#wastefully creates a zip file, but ensures that we stage all test suites 1.84 +make package-tests 1.85 +testdir=$RPM_BUILD_ROOT/%{_datadir}/%{_testsinstalldir}/tests 1.86 +mkdir -p $testdir 1.87 +cp -a dist/test-package-stage/* $testdir/ 1.88 +%endif 1.89 + 1.90 +%clean 1.91 +rm -rf $RPM_BUILD_ROOT 1.92 + 1.93 + 1.94 +%post 1.95 +#this is needed to get gnome-panel to update the icons 1.96 +update-desktop-database &> /dev/null || : 1.97 +touch --no-create %{_datadir}/icons/hicolor || : 1.98 +if [ -x %{_bindir}/gtk-update-icon-cache ] ; then 1.99 + %{_bindir}/gtk-update-icon-cache --quiet ${_datadir}/icons/hicolor &> /dev/null || : 1.100 +fi 1.101 + 1.102 + 1.103 +%postun 1.104 +#this is needed to get gnome-panel to update the icons 1.105 +update-desktop-database &> /dev/null || : 1.106 +touch --no-create %{_datadir}/icons/hicolor || : 1.107 +if [ -x %{_bindir}/gtk-update-icon-cache ] ; then 1.108 + %{_bindir}/gtk-update-icon-cache --quiet ${_datadir}/icons/hicolor &> /dev/null || : 1.109 +fi 1.110 + 1.111 + 1.112 +%files 1.113 +%defattr(-,root,root,-) 1.114 +%{_installdir} 1.115 +%{_bindir} 1.116 +%{_datadir}/applications/ 1.117 +%{_datadir}/icons/ 1.118 +%doc 1.119 + 1.120 + 1.121 +%if %{?createdevel:1} 1.122 +%files devel 1.123 +%defattr(-,root,root,-) 1.124 +%{_includedir} 1.125 +%{_sdkdir} 1.126 +%{_idldir} 1.127 +%endif 1.128 + 1.129 + 1.130 +%if %{?createtests:1} 1.131 +%files tests 1.132 +%{_datadir}/%{_testsinstalldir}/tests/ 1.133 +%endif 1.134 + 1.135 +#%changelog 1.136 +#* %{name} %{version} %{moz_rpm_release} 1.137 +#- Please see %{moz_source_repo}/shortlog/%{moz_source_stamp}