File qdevicemonitor.spec of Package qdevicemonitor

#
# spec file for package qdevicemonitor
#
# 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:           qdevicemonitor
Version:        1.0.1
Release:        0
Summary:        Log viewer for Android and iOS logs and text files
License:        GPL-3.0+
Group:          System/Monitoring
Url:            https://github.com/alopatindev/qdevicemonitor
Source:         https://github.com/alopatindev/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        %{name}.appdata.xml
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(libudev)
Requires:       android-tools
Requires:       imobiledevice-tools
Requires:       usbmuxd

%description
An application to retrieve and view Android and iOS logs,
as well as local text files.

Key Features:
 * Logs can be taken from Android, iOS or from text files.
 * Filtering support (RegExp):
   - automatic filter history that is used as autocomplete;
   - prefixes pid:, tid:, tag: or text: (Android only).
 * Verbosity level (Android only).
 * Backup to text files automatically. Automatic old files removal.
 * Colour Highlight (two colour schemes).
 * Clear Log.
 * Add a Mark to Log.
 * Open Log in an External Text Editor.

%prep
%setup -q
cp -f %{SOURCE1} icons/%{name}.appdata.xml

%build
pushd %{name}/
%qmake5
make %{?_smp_mflags}
popd

%install
install -Dm 0755 %{name}/%{name} %{buildroot}%{_bindir}/%{name}

install -Dm 0644 icons/%{name}.desktop \
  %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm 0644 icons/app_icon.svg \
  %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -Dm 0644 icons/%{name}.appdata.xml \
  %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml

%suse_update_desktop_file -r %{name} Qt System Monitor

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml

%changelog
openSUSE Build Service is sponsored by