aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2006-08-19 22:07:17 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2006-08-19 22:07:17 +0000
commit2606eee2d0f280a54208af7f6e2ad9b6d2097eed (patch)
tree73f345d9ad053108ade64457fe7b78cde01be7cd
parent4addacc312d3ee05bb17d59d9658349b5b9b70ab (diff)
Misc fixes
-rw-r--r--hardinfo2/Makefile.in4
-rw-r--r--hardinfo2/arch/common/printers.h9
-rw-r--r--hardinfo2/autopackage/default.apspec78
-rw-r--r--hardinfo2/callbacks.c1
-rw-r--r--hardinfo2/computer.c20
-rw-r--r--hardinfo2/hardinfo.desktop6
6 files changed, 93 insertions, 25 deletions
diff --git a/hardinfo2/Makefile.in b/hardinfo2/Makefile.in
index 51b35714..1eaf0727 100644
--- a/hardinfo2/Makefile.in
+++ b/hardinfo2/Makefile.in
@@ -74,7 +74,9 @@ install: all
cp benchmark.data ${DESTDIR}/usr/share/hardinfo
@echo '*** Fixing permissions...'
- chmod -R 755 ${DESTDIR}/usr/share/hardinfo
chmod 755 ${DESTDIR}/usr/bin/hardinfo
@echo '*** Done installing.'
+
+installer:
+ makeinstaller
diff --git a/hardinfo2/arch/common/printers.h b/hardinfo2/arch/common/printers.h
index af4793ac..59d49dfa 100644
--- a/hardinfo2/arch/common/printers.h
+++ b/hardinfo2/arch/common/printers.h
@@ -22,6 +22,7 @@ scan_printers(void)
static GModule *cups = NULL;
static int (*cupsGetPrinters) (char ***printers) = NULL;
static char *(*cupsGetDefault) (void) = NULL;
+
static char *libcups[] = { "libcups",
"libcups.so",
"libcups.so.1",
@@ -47,11 +48,9 @@ scan_printers(void)
}
if (!g_module_symbol(cups, "cupsGetPrinters", (gpointer) & cupsGetPrinters)
- || !g_module_symbol(cups, "cupsGetDefault",
- (gpointer) & cupsGetDefault)) {
- printer_list =
- g_strdup("[Printers]\n"
- "No suitable CUPS library found=");
+ || !g_module_symbol(cups, "cupsGetDefault", (gpointer) & cupsGetDefault)) {
+ printer_list = g_strdup("[Printers]\n"
+ "No suitable CUPS library found=");
g_module_close(cups);
return;
}
diff --git a/hardinfo2/autopackage/default.apspec b/hardinfo2/autopackage/default.apspec
new file mode 100644
index 00000000..ea6ffb8b
--- /dev/null
+++ b/hardinfo2/autopackage/default.apspec
@@ -0,0 +1,78 @@
+# -*- shell-script -*-
+# Generated by mkapspec 0.2
+[Meta]
+ShortName: hardinfo
+SoftwareVersion: 0.4.1
+DisplayName: HardInfo $SOFTWAREVERSION
+RootName: @tia.mat.br/hardinfo:$SOFTWAREVERSION
+Summary: System profiler and benchmark tool
+Maintainer: Leandro A. F. Pereira <leandro@linuxmag.com.br>
+Packager: Leandro A. F. Pereira <leandro@linuxmag.com.br>
+PackageVersion: 1
+CPUArchitectures: x86
+AutopackageTarget: 1.0
+Type: Application
+License: GPL
+
+[Description]
+HardInfo is a system information and benchmark tool for Linux systems. Using HardInfo, you can:
+
+ * Get information about your computer:
+ o The Processor
+ o Operating System
+ o Languages
+ o Sensors
+ o Filesystems
+ o Shared Directories
+ o Display
+ o Network Interfaces
+ * Its devices (and what controls them):
+ o Kernel Modules
+ o PCI Devices
+ o USB Devices
+ o Printers
+ o Input Devices
+ o Storage
+ * Benchmark:
+ o ZLib
+ o MD5 and SHA1
+ * Generate nicely-formatted HTML reports
+
+[BuildPrepare]
+# If you're using autotools, the default should be enough.
+# prepareBuild will set up apbuild and run configure for you. If you
+# need to pass arguments to configure, just add them to prepareBuild:
+# prepareBuild --enable-foo --disable-bar
+export APBUILD_INCLUDE="/usr/local/gtk-headers/2.6"
+prepareBuild
+
+[BuildUnprepare]
+# If you're using prepareBuild above, there is no need to change this!
+unprepareBuild
+
+[Globals]
+
+[Prepare]
+require '@gtk.org/gtk' 2.6
+
+[Imports]
+# This command will tell makeinstaller what to include in the package.
+# The selection comes from the files created by 'make install' or equivalent.
+# Usually, you can leave this at the default
+cd ../
+echo '*' | import
+
+[Install]
+# See http://www.autopackage.org/api/ for details
+installExe bin/*
+installData share/*
+copyFile lib/hardinfo/modules/benchmark.so $PREFIX/lib/hardinfo/modules/benchmark.so
+copyFile lib/hardinfo/modules/computer.so $PREFIX/lib/hardinfo/modules/computer.so
+copyFile lib/hardinfo/modules/devices.so $PREFIX/lib/hardinfo/modules/devices.so
+installDesktop "System" share/applications/hardinfo.desktop
+
+[Uninstall]
+# Leaving this at the default is safe unless you use custom commands in
+# "Install" to create files. By default, all autopackage API functions are
+# logged.
+uninstallFromLog
diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c
index fd862984..da193c47 100644
--- a/hardinfo2/callbacks.c
+++ b/hardinfo2/callbacks.c
@@ -57,6 +57,7 @@ void cb_about()
"MD5 implementation by Colin Plumb",
"SHA1 implementation by Steve Raid",
"Blowfish implementation by Paul Kocher",
+ "Some code partly based on x86cpucaps by Osamu Kayasono",
NULL
};
diff --git a/hardinfo2/computer.c b/hardinfo2/computer.c
index e2ee3ee6..041225d5 100644
--- a/hardinfo2/computer.c
+++ b/hardinfo2/computer.c
@@ -192,11 +192,6 @@ hi_info(gint entry)
static Computer *computer = NULL;
static gchar *tmp = NULL;
- /*if (tmp != NULL) {
- g_free(tmp);
- tmp = NULL;
- } */
-
if (!computer) {
computer = computer_get_info();
}
@@ -230,7 +225,8 @@ hi_info(gint entry)
"ReloadInterval=5000\n"
"[Mounted File Systems]\n%s\n", fs_list);
case COMPUTER_SUMMARY:
- tmp = computer_get_alsacards(computer);
+ if (tmp) g_free(tmp);
+ tmp = computer_get_alsacards(computer);
return g_strdup_printf("[$ShellParam$]\n"
"UpdateInterval$Memory=1000\n"
"UpdateInterval$Date/Time=1000\n"
@@ -245,12 +241,7 @@ hi_info(gint entry)
"OpenGL Renderer=%s\n"
"X11 Vendor=%s\n"
"[Multimedia]\n"
- "%s\n"
- "#[Storage]\n"
- "#IDE Controller=\n"
- "#SCSI Controller=\n"
- "#Floppy Drive=\n"
- "#Disk Drive=\n",
+ "%s\n",
computer->processor->model_name,
computer->os->distro,
computer->os->username,
@@ -283,7 +274,6 @@ hi_info(gint entry)
computer->display->ogl_renderer,
computer->display->ogl_version);
case COMPUTER_OPERATING_SYSTEM:
- tmp = computer_get_formatted_uptime();
return g_strdup_printf("[$ShellParam$]\n"
"UpdateInterval$Uptime=10000\n"
"UpdateInterval$Load Average=1000\n"
@@ -299,7 +289,7 @@ hi_info(gint entry)
"Home Directory=%s\n"
"Desktop Environment=%s\n"
"[Misc]\n"
- "Uptime=%s\n"
+ "Uptime=...\n"
"Load Average=...",
computer->os->kernel,
computer->os->compiled_date,
@@ -309,7 +299,7 @@ hi_info(gint entry)
computer->os->username,
computer->os->language,
computer->os->homedir,
- computer->os->desktop, tmp);
+ computer->os->desktop);
case COMPUTER_LANGUAGE:
return g_strdup_printf("[$ShellParam$]\n"
"ViewType=1\n"
diff --git a/hardinfo2/hardinfo.desktop b/hardinfo2/hardinfo.desktop
index 32895d6d..e790da16 100644
--- a/hardinfo2/hardinfo.desktop
+++ b/hardinfo2/hardinfo.desktop
@@ -1,8 +1,6 @@
[Desktop Entry]
-Name=System Information (hardinfo)
-Name[pt_BR]=Informações do Sistema (hardinfo)
-Comment=Information on your hardware devices
-Comment[pt_BR]=Informações sobre seus dispositivos de hardware
+Name=System Profiler and Benchmark
+Name[pt_BR]=Informações e Testes do Sistema
Exec=hardinfo
Icon=/usr/share/hardinfo/pixmaps/logo.png
Terminal=false