new package: hw-probe
This commit is contained in:
parent
9f6dc23595
commit
d048a73a44
17
root-packages/hw-probe/build.sh
Normal file
17
root-packages/hw-probe/build.sh
Normal file
@ -0,0 +1,17 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/linuxhw/hw-probe
|
||||
TERMUX_PKG_DESCRIPTION="Tool to probe for hardware and check its operability"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=1.4
|
||||
TERMUX_PKG_SRCURL=https://github.com/linuxhw/hw-probe/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=90f3ea83bf641348b209e4a2a910f65d836ae7828c0be0f660236ea413bc46bb
|
||||
TERMUX_PKG_DEPENDS="curl, hwinfo, net-tools, perl"
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_make() {
|
||||
:
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm700 hw-probe.pl "$TERMUX_PREFIX"/bin/hw-probe
|
||||
}
|
89
root-packages/hw-probe/hw-probe.pl.patch
Normal file
89
root-packages/hw-probe/hw-probe.pl.patch
Normal file
@ -0,0 +1,89 @@
|
||||
diff -uNr hw-probe-1.4/hw-probe.pl hw-probe-1.4.mod/hw-probe.pl
|
||||
--- hw-probe-1.4/hw-probe.pl 2018-04-14 17:15:35.000000000 +0300
|
||||
+++ hw-probe-1.4.mod/hw-probe.pl 2019-06-26 13:16:14.050656056 +0300
|
||||
@@ -81,7 +81,7 @@
|
||||
my $URL = "https://linux-hardware.org";
|
||||
my $GITHUB = "https://github.com/linuxhw/hw-probe";
|
||||
|
||||
-my $PROBE_DIR = "/root/HW_PROBE";
|
||||
+my $PROBE_DIR = "@TERMUX_HOME@/HW_PROBE";
|
||||
my $DATA_DIR = $PROBE_DIR."/LATEST/hw.info";
|
||||
my $LOG_DIR = $DATA_DIR."/logs";
|
||||
my $TEST_DIR = $DATA_DIR."/tests";
|
||||
@@ -1285,11 +1285,11 @@
|
||||
$Path = $PnpIDs;
|
||||
}
|
||||
else {
|
||||
- $Path = "/usr/share/hwdata/pnp.ids"; # ROSA Fresh, RELS
|
||||
+ $Path = "@TERMUX_PREFIX@/share/hwdata/pnp.ids"; # ROSA Fresh, RELS
|
||||
}
|
||||
|
||||
if(not -e $Path) {
|
||||
- $Path = "/usr/share/misc/pnp.ids"; # ROSA Marathon
|
||||
+ $Path = "@TERMUX_PREFIX@/share/misc/pnp.ids"; # ROSA Marathon
|
||||
}
|
||||
|
||||
if(not -e $Path) {
|
||||
@@ -1325,7 +1325,7 @@
|
||||
|
||||
sub readVendorIds()
|
||||
{
|
||||
- my $Path = "/usr/share/hwdata/pci.ids";
|
||||
+ my $Path = "@TERMUX_PREFIX@/share/hwdata/pci.ids";
|
||||
|
||||
if($PciIDs) {
|
||||
$Path = $PciIDs;
|
||||
@@ -4232,7 +4232,7 @@
|
||||
writeLog($LOG_DIR."/dmesg", $Dmesg);
|
||||
|
||||
listProbe("logs", "xorg.log");
|
||||
- my $XLog = readFile("/var/log/Xorg.0.log");
|
||||
+ my $XLog = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log");
|
||||
$XLog = hideTags($XLog, "Serial#");
|
||||
if(my $HostName = $ENV{"HOSTNAME"}) {
|
||||
$XLog=~s/ $HostName / NODE /g;
|
||||
@@ -5817,7 +5817,7 @@
|
||||
}
|
||||
|
||||
listProbe("logs", "xorg.log.1");
|
||||
- my $XLog_Old = readFile("/var/log/Xorg.0.log.old");
|
||||
+ my $XLog_Old = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log.old");
|
||||
$XLog_Old = hideTags($XLog_Old, "Serial#");
|
||||
if(my $HostName = $ENV{"HOSTNAME"}) {
|
||||
$XLog_Old=~s/ $HostName / NODE /g;
|
||||
@@ -5862,7 +5862,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if(-f "/var/log/boot.log")
|
||||
+ if(-f "/log/boot.log")
|
||||
{
|
||||
listProbe("logs", "boot.log");
|
||||
my $BootLog = clearLog(readFile("/var/log/boot.log"));
|
||||
@@ -6533,7 +6533,7 @@
|
||||
{
|
||||
if($Admin)
|
||||
{
|
||||
- my $ELog = "/var/log/cups/error_log";
|
||||
+ my $ELog = "@TERMUX_PREFIX@/var/log/cups/error_log";
|
||||
if(-e $ELog)
|
||||
{
|
||||
listProbe("logs", "cups_error_log");
|
||||
@@ -6541,7 +6541,7 @@
|
||||
writeLog($LOG_DIR."/cups_error_log", $CupsError);
|
||||
}
|
||||
|
||||
- my $ALog = "/var/log/cups/access_log";
|
||||
+ my $ALog = "@TERMUX_PREFIX@/var/log/cups/access_log";
|
||||
if(-e $ALog)
|
||||
{
|
||||
listProbe("logs", "cups_access_log");
|
||||
@@ -7169,7 +7169,7 @@
|
||||
}
|
||||
|
||||
sub readSdioIds_Sys() {
|
||||
- readSdioIds("/usr/share/hwdata/sdio.ids", \%SdioInfo, \%SdioVendor);
|
||||
+ readSdioIds("@TERMUX_PREFIX@/share/hwdata/sdio.ids", \%SdioInfo, \%SdioVendor);
|
||||
}
|
||||
|
||||
sub readSdioIds($$$)
|
Loading…
Reference in New Issue
Block a user