File franz.spec of Package franz
Name: franz
Version: 5.10.0
Release: 0
Url: https://meetfranz.com/
Summary: Messaging app for desktop
Group: System/GUI/KDE
BuildRequires: xz
BuildRequires: desktop-file-utils
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
BuildRequires: -post-build-checks
Requires: gconf2
Requires: libnotify4
Requires: libappindicator1
Requires: libXtst6
Requires: libXss1
Requires: xz
License: Apache-2.0
Source1: franz_%{version}_amd64.deb
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.
%build
ar -x %{SOURCE1}
%install
mkdir -p %{buildroot}/opt/Franz/
cp -f data.tar.xz %{buildroot}/opt/Franz/data.tar.xz
%post
if test -e /opt/Franz/data.tar.xz ; then
tar xf /opt/Franz/data.tar.xz -C /
fi
ln -sf '/usr/share/icons/hicolor/1024x1024/apps/franz.png' '/usr/share/pixmaps/franz.png'
chmod -R 777 /usr/share/icons/hicolor/1024x1024
chmod -R 777 /usr/share/icons/hicolor/1024x1024/*
# Link to the binary
ln -sf '/opt/Franz/franz' '/usr/local/bin/franz'
sed -i 's/Icon=franz/Icon=franz/' /usr/share/applications/franz.desktop
echo "GenericName=Chat & messaging services" >> /usr/share/applications/franz.desktop
update-desktop-database
%preun
if [ "$1" = 0 ]; then
rm -f '/usr/local/bin/franz'
rm -f /usr/share/applications/franz.desktop
rm -rf /opt/Franz/
fi
update-desktop-database
%clean
%files
%defattr(-,root,root)
/opt/Franz/data.tar.xz
%changelog