From 9dea31e3d77c8d55ce308d230e4573f16c3f49a5 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Fri, 19 May 2017 21:10:39 +0000 Subject: [PATCH] Don't generate tar.gz distribution files. Compatibility with gtk3 <= 3.8. Updated spec file to avoid errors on Fedora. --- gsmartcontrol/configure.ac | 2 +- gsmartcontrol/gsmartcontrol.spec.in | 13 ++++++++++--- gsmartcontrol/src/gsc_executor_log_window.cpp | 11 ++++------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/gsmartcontrol/configure.ac b/gsmartcontrol/configure.ac index 7782e55..dc43086 100644 --- a/gsmartcontrol/configure.ac +++ b/gsmartcontrol/configure.ac @@ -6,7 +6,7 @@ AC_CONFIG_HEADERS([config.h]) AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE([foreign dist-bzip2 -Wall]) +AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 -Wall]) # Clear *FLAGS, LIBS, LDFLAGS if requested through configure option. diff --git a/gsmartcontrol/gsmartcontrol.spec.in b/gsmartcontrol/gsmartcontrol.spec.in index c6a57f6..1b8c6e3 100644 --- a/gsmartcontrol/gsmartcontrol.spec.in +++ b/gsmartcontrol/gsmartcontrol.spec.in @@ -2,10 +2,10 @@ Name: gsmartcontrol Version: @VERSION@ Release: 1as License: GPL-2.0 AND GPL-3.0 -Url: http://gsmartcontrol.sourceforge.net +Url: http://gsmartcontrol.sourceforge.net/ Vendor: Alexander Shaduri # Packager: Alexander Shaduri -Source: gsmartcontrol-%{version}.tar.bz2 +Source: http://sourceforge.net/projects/gsmartcontrol/files/%{version}/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: GSmartControl - Hard Disk Drive and SSD Health Inspection Tool @@ -15,6 +15,9 @@ Group: System/Kernel and hardware Group: Hardware/Other %endif +# Empty debug packages cause errors in new RPM. Disable them. +%global debug_package %{nil} + # Dependencies for various distributions. The actual deps are: # smartmontools, pcre, gtkmm3 >= 3.4.0 @@ -61,6 +64,7 @@ on it. %setup -q %configure + %build make %{?_smp_mflags} @@ -137,6 +141,10 @@ rm -rf %buildroot %files %defattr(-,root,root) +# In fedora /usr/bin/gsmartcontrol is linked to consolehelper, cannot set attrs on symlink. +%if 0%{?fedora_version} +%{_bindir}/* +%else %attr(0755,root,root) %{_bindir}/* # %%attr(0644,root,root) %%config(noreplace) %%{_sysconfdir}/* @@ -147,7 +155,6 @@ rm -rf %buildroot # %%{_datadir}/gsmartcontrol/* %{_datadir}/applications/*.desktop %{_datadir}/metainfo -%{_datadir}/metainfo/*.appdata.xml %{_datadir}/icons/* %{_datadir}/pixmaps/* diff --git a/gsmartcontrol/src/gsc_executor_log_window.cpp b/gsmartcontrol/src/gsc_executor_log_window.cpp index bf475d3..dbca2c1 100644 --- a/gsmartcontrol/src/gsc_executor_log_window.cpp +++ b/gsmartcontrol/src/gsc_executor_log_window.cpp @@ -158,13 +158,10 @@ void GscExecutorLogWindow::on_command_output_received(const CmdexSyncCommandInfo row[col_entry] = entry; // if visible, set the selection to it - if (this->is_visible()) { - Gtk::TreeView* treeview = this->lookup_widget("command_list_treeview"); - - if (treeview) { - selection->select(row); - treeview->scroll_to_row(list_store->get_path(row)); - } + Gtk::TreeView* treeview = this->lookup_widget("command_list_treeview"); + if (treeview) { + selection->select(row); + treeview->scroll_to_row(list_store->get_path(row)); } }