File rambox.spec of Package rambox

#
# spec file for package rambox
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name:           rambox
Version:        0.8.0
Release:        0
Summary:        Combines common messaging and emailing apps
License:        MIT
Group:          Productivity/Networking/Instant Messenger
Url:            http://rambox.pro
ExclusiveArch:  x86_64 %ix86
Source0:        https://github.com/ramboxapp/community-edition/releases/download/%{version}/Rambox-%{version}-linux-x64.tar.gz
Source1:        https://github.com/ramboxapp/community-edition/releases/download/%{version}/Rambox-%{version}-linux-ia32.tar.gz
Source2:        %{name}.desktop
Source3:        %{name}.png
Source4:        %{name}.sh
Source5:        %{name}.1
BuildRequires:  update-desktop-files
Requires(post): update-desktop-files
Requires(postun): update-desktop-files

%description
Free and Open Source messaging and emailing app that combines common web
applications into one.

%prep
%ifarch x86_64
%setup -q -n Rambox-%{version}-linux-x64
%endif
%ifarch %ix86
%setup -q -T -b 1 -n Rambox-%{version}-linux-ia32
%endif
# rpmlint
chmod -x LICENSE*

%build

%install
install -d %{buildroot}/{/usr/lib/rambox,usr/{bin,share/{pixmaps,man/man1}}}
cp -R * %{buildroot}/usr/lib/%{name}
install -Dm755 %{SOURCE4} %{buildroot}%{_bindir}/%{name}
cp %{SOURCE3} %{buildroot}%{_datadir}/pixmaps
cp %{SOURCE5} %{buildroot}%{_datadir}/man/man1
%suse_update_desktop_file -i %{name}
chmod +x %{buildroot}/usr/lib/%{name}

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc LICENSE*
/usr/lib/%{name}
%{_bindir}/%{name}
%{_mandir}/man?/%{name}*.?.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by