File wire-desktop.spec of Package wire-desktop

Name:           wire-desktop
Version:        3.9.2895
Release:        0
Summary:        Secure collaboration platform
License:        GPL-3.0
Group:			Productivity/Networking/Instant Messenger
Url:            https://wire.com/
Source0:        Wire-%{version}_amd64.deb
Source1:		%{name}-rpmlintrc

%description
Wire is an open source, cross-platform, encrypted instant messaging client. It
uses the Internet to make voice and video calls; send text messages, files,
images, videos, audio files and user drawings depending on the clients used. It
can be used on any of the available clients, requiring a phone number or email
for registration.

%prep
cp %{_sourcedir}/Wire-%{version}_amd64.deb %{_builddir}
ar -x Wire-%{version}_amd64.deb
tar -xf data.tar.xz

%install
cd opt
mkdir -p %{buildroot}/opt
cp -f -r Wire %{buildroot}/opt/Wire
cd ../
cd usr
mkdir -p %{buildroot}/%{_prefix}
cp -f -r share %{buildroot}/%{_datadir}
rm %{buildroot}/%{_datadir}/applications/%{name}.desktop
echo "[Desktop Entry]
Name=Wire Desktop
Comment=Secure collaboration platform
Exec=%{name}
Terminal=false
Type=Application
Icon=%{name}
StartupWMClass=Wire
Categories=Network;InstantMessaging;" > %{buildroot}/%{_datadir}/applications/%{name}.desktop
mkdir -p '%{buildroot}/%{_bindir}'
ln -s '/opt/Wire/%{name}' '%{buildroot}/%{_bindir}/%{name}'

%files
%defattr(-, root, root)
/opt/Wire
%{_datadir}/applications/%{name}.desktop
%{_datadir}/doc/%{name}
%{_datadir}/icons/hicolor
%{_datadir}/icons/hicolor/256x256
%{_datadir}/icons/hicolor/256x256/apps
%{_datadir}/icons/hicolor/32x32
%{_datadir}/icons/hicolor/32x32/apps
%{_bindir}/%{name}