Mailspring/app/build/resources/linux/redhat/mailspring.spec.in

50 lines
1.5 KiB
RPMSpec

Name: <%= name %>
Version: <%= version %>
Release: 0.1%{?dist}
Summary: <%= description %>
License: GPLv3
URL: https://getmailspring.com/
AutoReqProv: no # Avoid libchromiumcontent.so missing dependency
%ifarch i386 i486 i586 i686
Requires: lsb-core-noarch, libXss.so.1 libsecret-1.so.0 ca-certificates
%else
Requires: lsb-core-noarch, libXss.so.1()(64bit) libsecret-1.so.0()(64bit) ca-certificates
%endif
%description
<%= description %>
%install
mkdir -p %{buildroot}/usr/share/mailspring
cp -r <%= contentsDir %>/* %{buildroot}/usr/share/mailspring
mkdir -p %{buildroot}/usr/bin/
ln -s ../share/mailspring/mailspring %{buildroot}/usr/bin/mailspring
chmod 755 %{buildroot}/usr/bin/mailspring
mkdir -p %{buildroot}/usr/share/applications/
mv mailspring.desktop %{buildroot}/usr/share/applications/
for s in 16 32 64 128 256 512; do
mkdir -p %{buildroot}/usr/share/icons/hicolor/${s}x${s}/apps
cp -p <%= linuxAssetsDir %>/icons/${s}.png %{buildroot}/usr/share/icons/hicolor/${s}x${s}/apps/mailspring.png
done
%files
/usr/bin/mailspring
/usr/share/mailspring
/usr/share/applications/mailspring.desktop
/usr/share/icons/hicolor/16x16/apps/mailspring.png
/usr/share/icons/hicolor/32x32/apps/mailspring.png
/usr/share/icons/hicolor/64x64/apps/mailspring.png
/usr/share/icons/hicolor/128x128/apps/mailspring.png
/usr/share/icons/hicolor/256x256/apps/mailspring.png
/usr/share/icons/hicolor/512x512/apps/mailspring.png
%post
update-desktop-database &> /dev/null
%postun
update-desktop-database &> /dev/null