[gsmartcontrol] Initial import (#697247).
Eric Smith
brouhaha at fedoraproject.org
Fri Dec 9 04:01:22 UTC 2011
commit 7de8fa8ac9a3fa3a982a053cc0fe3dd056cc4041
Author: Eric Smith <eric at brouhaha.com>
Date: Thu Dec 8 20:01:19 2011 -0800
Initial import (#697247).
.gitignore | 1 +
gsmartcontrol-console-helper.patch | 44 ++++++++++++++
gsmartcontrol.spec | 116 ++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 162 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e725195 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gsmartcontrol-0.8.6.tar.bz2
diff --git a/gsmartcontrol-console-helper.patch b/gsmartcontrol-console-helper.patch
new file mode 100644
index 0000000..af56d5e
--- /dev/null
+++ b/gsmartcontrol-console-helper.patch
@@ -0,0 +1,44 @@
+diff -up gsmartcontrol-0.8.5/data/gsmartcontrol.1.console-helper gsmartcontrol-0.8.5/data/gsmartcontrol.1
+--- gsmartcontrol-0.8.5/data/gsmartcontrol.1.console-helper 2011-04-17 00:57:22.000000000 -0700
++++ gsmartcontrol-0.8.5/data/gsmartcontrol.1 2011-04-17 00:57:57.000000000 -0700
+@@ -4,7 +4,6 @@ GSmartControl \- Hard disk drive health
+ .SH SYNOPSIS
+ \fBgsmartcontrol\fP [OPTIONS]
+
+-\fBgsmartcontrol\-root\fP [\fI<desktop>\fP [OPTIONS]]
+ .SH DESCRIPTION
+ \fBGSmartControl\fP is a graphical user interface for smartctl (from
+ smartmontools), which is a tool for querying and controlling SMART
+@@ -12,13 +11,7 @@ smartmontools), which is a tool for quer
+ drives. It allows you to inspect the drive's SMART data to determine its
+ health, as well as run various tests on it.
+ .PP
+-This manual page documents briefly the \fBgsmartcontrol\fP and
+-\fBgsmartcontrol\-root\fP commands.
+-.PP
+-\fBgsmartcontrol\-root\fP command launches \fBgsmartcontrol\fP with
+-administrative privileges. The \fIdesktop\fP argument specifies which desktop
+-is currently running, for automatic selection of native su mechanism. Valid
+-values for \fIdesktop\fP are \fBauto\fP, \fBkde\fP, \fBgnome\fP, \fBother\fP.
++This manual page documents briefly the \fBgsmartcontrol\fP command.
+
+ .SH OPTIONS
+ .SS "Help Options:"
+diff -up gsmartcontrol-0.8.5/data/gsmartcontrol.desktop.in.console-helper gsmartcontrol-0.8.5/data/gsmartcontrol.desktop.in
+--- gsmartcontrol-0.8.5/data/gsmartcontrol.desktop.in.console-helper 2011-04-17 00:56:32.000000000 -0700
++++ gsmartcontrol-0.8.5/data/gsmartcontrol.desktop.in 2011-04-17 00:57:07.000000000 -0700
+@@ -17,13 +17,7 @@ Comment=Monitor and control SMART data o
+ # An absolute file path is also supported.
+ Icon=gsmartcontrol
+
+-# Run with root permissions. This should work with newer GNOME too.
+-# It _should_ work with kde, but it hangs on mine, so use plain kdesu.
+-#X-KDE-SubstituteUID=true
+-#X-KDE-RootOnly=true
+-
+-# Run with root permissions.
+-Exec="@prefix@/bin/gsmartcontrol-root"
++Exec="@prefix@/bin/gsmartcontrol"
+
+ # Build service rpmlint gives errors without this
+ X-SuSE-translate=false
diff --git a/gsmartcontrol.spec b/gsmartcontrol.spec
new file mode 100644
index 0000000..0cd545a
--- /dev/null
+++ b/gsmartcontrol.spec
@@ -0,0 +1,116 @@
+Name: gsmartcontrol
+Version: 0.8.6
+Release: 2%{?dist}
+Summary: Graphical user interface for smartctl
+Group: Applications/System
+
+# Note that the "Whatever" license is effectively the MIT license. See email
+# from Tom Callaway to Fedora-legal-list on 18-APR-2011.
+License: (GPLv2 or GPLv3) and BSD and zlib and Boost and MIT
+
+URL: http://%{name}.berlios.de/home/index.php/en/Home
+Source0: http://download.berlios.de/%{name}/%{name}-%{version}.tar.bz2
+Requires: smartmontools
+Requires: hicolor-icon-theme
+Requires: usermode
+
+# Patch man page and .desktop file to drop references to gsmartcontrol-root,
+# as Fedora uses console-helper instead.
+Patch0: gsmartcontrol-console-helper.patch
+
+BuildRequires: gtkmm24-devel pcre-devel desktop-file-utils
+
+%description
+GSmartControl is a graphical user interface for smartctl (from
+smartmontools package), which is a tool for querying and controlling
+SMART (Self-Monitoring, Analysis, and Reporting Technology) data on
+modern hard disk drives. It allows you to inspect the drive's SMART
+data to determine its health, as well as run various tests on it.
+
+%prep
+%setup -q
+%patch -P 0 -p1 -b .console-helper
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot}
+
+# make install puts the docs into an unversioned doc directory,
+# move them to a versioned doc directory to prevent having both
+# a versioned and an unversioned doc directory
+mv %{buildroot}%{_defaultdocdir}/%{name}{,-%{version}}
+install -m 644 COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}
+
+desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
+
+# Fedora uses console-helper to run privileged programs, so we don't
+# need the gsmartcontrol-root executable
+rm %{buildroot}%{_bindir}/%{name}-root
+
+# Set up for console-helper
+mkdir -p %{buildroot}%{_sbindir}
+mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name}
+ln -s consolehelper %{buildroot}%{_bindir}/%{name}
+
+mkdir -p %{buildroot}%{_sysconfdir}/pam.d
+cat <<EOF >%{buildroot}%{_sysconfdir}/pam.d/%{name}
+#%%PAM-1.0
+auth include config-util
+account include config-util
+session include config-util
+EOF
+
+mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
+cat <<EOF >%{buildroot}%{_sysconfdir}/security/console.apps/%{name}
+USER=root
+PROGRAM=/usr/sbin/gsmartcontrol
+SESSION=true
+EOF
+
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%files
+%{_bindir}/%{name}
+%{_sbindir}/%{name}
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/%{name}
+%{_datadir}/pixmaps/%{name}.png
+%{_datadir}/pixmaps/%{name}.xpm
+%{_datadir}/icons/hicolor/*x*/apps/%{name}.png
+%{_mandir}/man1/%{name}.1.*
+%{_mandir}/man1/%{name}-root.1.*
+%{_docdir}/%{name}-%{version}
+%config(noreplace) %{_sysconfdir}/pam.d/%{name}
+%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}
+
+%changelog
+* Sat Dec 03 2011 Eric Smith <eric at brouhaha.com> 0.8.6-2
+- Updated per package review comments.
+
+* Sat Oct 08 2011 Eric Smith <eric at brouhaha.com> 0.8.6-1
+- Updated to latest upstream release.
+- Removed obsolte BuildRoot tag, clean section, defattr, etc.
+- Added runtime requirements for smartmontools and hicolor-icon-theme,
+ per the suggestions in the package review (bug 697247).
+
+* Mon Apr 18 2011 Eric Smith <eric at brouhaha.com> 0.8.5-2
+- Changed "Whatever" to "MIT" in license tag, based on Tom Callaway's
+ post to Fedora-legal-list.
+
+* Sun Apr 17 2011 Eric Smith <eric at brouhaha.com> 0.8.5-1
+- Initial version
diff --git a/sources b/sources
index e69de29..ea69262 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d2ac685e2e73b05f7ba74c93623af739 gsmartcontrol-0.8.6.tar.bz2
More information about the scm-commits
mailing list