import ports/sysutils/gsmartcontrol, incorporating bits from giovanni@'s

version of the same port, tweak + ok aja@

GSmartControl is a graphical user interface for smartctl (from the
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.
This commit is contained in:
sthen 2011-07-08 18:17:12 +00:00
parent 44afc44b5a
commit 9e6a668801
6 changed files with 193 additions and 0 deletions

View File

@ -0,0 +1,39 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/07/08 18:17:12 sthen Exp $
COMMENT= graphical hard drive inspection tool (smartctl front-end)
DISTNAME= gsmartcontrol-0.8.6
EXTRACT_SUFX= .tar.bz2
CATEGORIES= sysutils x11
HOMEPAGE= http://gsmartcontrol.berlios.de/
# GPLv2 or GPLv3
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += GL X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
WANTLIB += Xrandr Xrender atk-1.0 atkmm-1.6 c cairo cairomm-1.0
WANTLIB += expat fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
WANTLIB += gdkmm-2.4 gio-2.0 giomm-2.4 glib-2.0 glibmm-2.4 gmodule-2.0
WANTLIB += gobject-2.0 gthread-2.0 gtk-x11-2.0 gtkmm-2.4 m pango-1.0
WANTLIB += pangocairo-1.0 pangoft2-1.0 pangomm-1.4 pcre pixman-1
WANTLIB += png pthread pthread-stubs sigc-2.0 stdc++ util xcb
WANTLIB += xcb-render xcb-shm z
MASTER_SITES= ${MASTER_SITE_BERLIOS:=gsmartcontrol/}
MODULES= devel/gettext
RUN_DEPENDS= devel/desktop-file-utils \
sysutils/smartmontools
LIB_DEPENDS= x11/gtk2mm
CONFIGURE_STYLE= gnu
pre-configure:
${SUBST_CMD} ${WRKSRC}/src/gsc_settings.h
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (gsmartcontrol-0.8.6.tar.bz2) = 0qxoXi5zsF97p0yTYjr3OQ==
RMD160 (gsmartcontrol-0.8.6.tar.bz2) = I4ejsHj26U3LcSLF9yuU8U2Now8=
SHA1 (gsmartcontrol-0.8.6.tar.bz2) = 4F3aKBWSGqDSqhiFDi5xXBpeAOA=
SHA256 (gsmartcontrol-0.8.6.tar.bz2) = sIBsCmssPTN1Xni2e9iizolbB67ipadXZxMmlOD0Hto=
SIZE (gsmartcontrol-0.8.6.tar.bz2) = 673712

View File

@ -0,0 +1,67 @@
$OpenBSD: patch-data_gsmartcontrol-root_in,v 1.1.1.1 2011/07/08 18:17:12 sthen Exp $
--- data/gsmartcontrol-root.in.orig Sat Apr 30 20:39:54 2011
+++ data/gsmartcontrol-root.in Fri Jul 8 13:04:54 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
############################################################################
# Copyright:
# (C) 2008 - 2010 Alexander Shaduri <ashaduri 'at' gmail.com>
@@ -22,7 +22,6 @@ elif [ "$DESKTOP" != "auto" ] && [ "$DESKTOP" != "kde"
echo "Usage: $0 [<auto|kde|gnome|other> [<${prog_name}_options>] ]";
exit 1;
fi
-shift; # remove $1
# Auto-detect current desktop if auto was specified.
@@ -46,8 +45,8 @@ fi
# sux requires xterm to ask for the password.
# xdg-su is basically like this script, except worse :)
# su-to-root is a debian/ubuntu official method (although gksu is available).
-gnome_sus="su-to-root gnomesu gksu kdesu beesu xdg-su sux";
-kde_sus="su-to-root kdesu gnomesu gksu beesu xdg-su sux";
+gnome_sus="gksu-polkit";
+kde_sus="kdesu";
other_sus="$gnome_sus";
@@ -64,7 +63,7 @@ fi
if [ "$GSMARTCONTROL_SU" = "" ]; then
for subin in $candidates; do
- which $subin &>/dev/null
+ which $subin > /dev/null 2>&1
if [ $? -eq 0 ]; then
found_su="$subin";
break;
@@ -73,7 +72,7 @@ if [ "$GSMARTCONTROL_SU" = "" ]; then
if [ "$found_su" = "" ]; then
xmessage "Error launching ${prog_name}: No suitable su mechanism found.
-Try installing kdesu, gnomesu, gksu, beesu or sux first.";
+Try installing kdesu or gksu-polkit first.";
exit 1;
fi
fi
@@ -88,7 +87,7 @@ fi
# the user's env after all).
# Note that beesu won't show a GUI login box if /usr/sbin is before /usr/bin,
# so add it first as well.
-EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin";
+EXTRA_PATHS="/usr/bin:/usr/sbin:@prefix@/sbin";
export PATH="$EXTRA_PATHS:$PATH"
@@ -118,7 +117,10 @@ elif [ "$found_su" = "beesu" ]; then
elif [ "$found_su" = "su-to-root" ]; then
full_cmd="$found_su -X -c '$EXEC_BIN $@'";
-else # gnomesu, kdesu, xdg-su
+elif [ "$found_su" = "$gnome_sus" ]; then
+ full_cmd="$found_su $EXEC_BIN $@";
+
+else # kdesu, xdg-su
full_cmd="$found_su -c '$EXEC_BIN $@'";
fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_gsc_settings_h,v 1.1.1.1 2011/07/08 18:17:12 sthen Exp $
--- src/gsc_settings.h.orig Sun May 1 14:13:09 2011
+++ src/gsc_settings.h Fri Jul 8 15:19:14 2011
@@ -31,7 +31,7 @@ inline void init_default_settings()
#ifndef _WIN32
- rconfig::set_default_data("system/smartctl_binary", "smartctl"); // must be in PATH or use absolute path.
+ rconfig::set_default_data("system/smartctl_binary", "${LOCALBASE}/sbin/smartctl"); // must be in PATH or use absolute path.
rconfig::set_default_data("system/tw_cli_binary", "tw_cli"); // must be in PATH or use absolute path.
#else
rconfig::set_default_data("system/smartctl_binary", "smartctl-nc.exe"); // use no-console version by default.

View File

@ -0,0 +1,7 @@
GSmartControl is a graphical user interface for smartctl (from the
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.

View File

@ -0,0 +1,63 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/07/08 18:17:12 sthen Exp $
@bin bin/gsmartcontrol
bin/gsmartcontrol-root
@man man/man1/gsmartcontrol-root.1
@man man/man1/gsmartcontrol.1
share/applications/gsmartcontrol.desktop
share/doc/gsmartcontrol/
share/doc/gsmartcontrol/AUTHORS.txt
share/doc/gsmartcontrol/ChangeLog
share/doc/gsmartcontrol/LICENSE_boost_1_0.txt
share/doc/gsmartcontrol/LICENSE_bsd-ac.txt
share/doc/gsmartcontrol/LICENSE_bsd-ucb.txt
share/doc/gsmartcontrol/LICENSE_gpl2.txt
share/doc/gsmartcontrol/LICENSE_gpl3.txt
share/doc/gsmartcontrol/LICENSE_gsmartcontrol.txt
share/doc/gsmartcontrol/LICENSE_hz.txt
share/doc/gsmartcontrol/LICENSE_pcrecpp.txt
share/doc/gsmartcontrol/LICENSE_unlicense.txt
share/doc/gsmartcontrol/LICENSE_zlib.txt
share/doc/gsmartcontrol/NEWS
share/doc/gsmartcontrol/README.txt
share/doc/gsmartcontrol/contrib/
share/doc/gsmartcontrol/contrib/cron-based_noadmin/
share/doc/gsmartcontrol/contrib/cron-based_noadmin/README
share/doc/gsmartcontrol/contrib/cron-based_noadmin/cron_gather_smart.sh
share/doc/gsmartcontrol/contrib/cron-based_noadmin/crontab.example
share/doc/gsmartcontrol/contrib/cron-based_noadmin/smartctl_subst.sh
share/gsmartcontrol/
share/gsmartcontrol/icon_cddvd.png
share/gsmartcontrol/icon_hdd.png
share/icons/
share/icons/hicolor/
share/icons/hicolor/128x128/
share/icons/hicolor/128x128/apps/
share/icons/hicolor/128x128/apps/gsmartcontrol.png
share/icons/hicolor/16x16/
share/icons/hicolor/16x16/apps/
share/icons/hicolor/16x16/apps/gsmartcontrol.png
share/icons/hicolor/22x22/
share/icons/hicolor/22x22/apps/
share/icons/hicolor/22x22/apps/gsmartcontrol.png
share/icons/hicolor/24x24/
share/icons/hicolor/24x24/apps/
share/icons/hicolor/24x24/apps/gsmartcontrol.png
share/icons/hicolor/256x256/
share/icons/hicolor/256x256/apps/
share/icons/hicolor/256x256/apps/gsmartcontrol.png
share/icons/hicolor/32x32/
share/icons/hicolor/32x32/apps/
share/icons/hicolor/32x32/apps/gsmartcontrol.png
share/icons/hicolor/48x48/
share/icons/hicolor/48x48/apps/
share/icons/hicolor/48x48/apps/gsmartcontrol.png
share/icons/hicolor/64x64/
share/icons/hicolor/64x64/apps/
share/icons/hicolor/64x64/apps/gsmartcontrol.png
share/pixmaps/
share/pixmaps/gsmartcontrol.png
share/pixmaps/gsmartcontrol.xpm
@exec %D/bin/gtk-update-icon-cache -q -f -t %D/share/icons/hicolor 2> /dev/null || true
@unexec-delete %D/bin/gtk-update-icon-cache -q -f -t %D/share/icons/hicolor 2> /dev/null || true
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database