File dianara.spec of Package dianara

#
# spec file for package dianara
#
# Copyright (c) 2017 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/
#


%define _name   Dianara
Name:           dianara
Version:        1.3.7
Release:        0
Summary:        Pump.io social network desktop client
License:        GPL-2.0+
Group:          Productivity/Networking/Other
Url:            https://gitlab.com/dianara/dianara-dev
Source:         http://download-mirror.savannah.gnu.org/releases/%{name}/%{name}-v%{version}.tar.gz
Source1:        %{name}.changes
BuildRequires:  file-devel
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 0%{?is_opensuse})
BuildRequires:  qoauth-qt5-devel
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
%else
BuildRequires:  qoauth-devel
BuildRequires:  pkgconfig(QJson)
BuildRequires:  pkgconfig(QtDBus)
BuildRequires:  pkgconfig(QtGui)
BuildRequires:  pkgconfig(QtNetwork)
%endif

%description
Dianara is a client for pump.io (and GNU MediaGoblin), a desktop
application for GNU/Linux that allows users to manage their pump.io
social networking accounts without the need to use a web browser.
You can read your timelines, post messages and pictures, and manage
your contacts.

%prep
%setup -q -n %{name}-v%{version}

%build
SOURCE_DATE="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
export SOURCE_DATE_EPOCH="$(date -d "$SOURCE_DATE" "+%%s")"

%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 0%{?is_opensuse})
%qmake5
%else
%{_libdir}/qt4/bin/qmake \
  QMAKE_CFLAGS="%{optflags}"   \
  QMAKE_CXXFLAGS="%{optflags}"
%endif
make %{?_smp_mflags} V=1

%install
%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 0%{?is_opensuse})
%qmake5_install
%else
make INSTALL_ROOT=%{buildroot} install
%endif

%suse_update_desktop_file -r %{name} Network InstantMessaging

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc CHANGELOG LICENSE README TRANSLATING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%{_mandir}/man1/dianara.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by