[arch-commits] Commit in i8kutils/repos (12 files)

Eric Bélanger eric at nymeria.archlinux.org
Fri Feb 7 20:38:36 UTC 2014


    Date: Friday, February 7, 2014 @ 21:38:36
  Author: eric
Revision: 205566

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  i8kutils/repos/extra-i686/PKGBUILD
    (from rev 205565, i8kutils/trunk/PKGBUILD)
  i8kutils/repos/extra-i686/i8kmon.service
    (from rev 205565, i8kutils/trunk/i8kmon.service)
  i8kutils/repos/extra-i686/i8kutils-probe.diff
    (from rev 205565, i8kutils/trunk/i8kutils-probe.diff)
  i8kutils/repos/extra-x86_64/PKGBUILD
    (from rev 205565, i8kutils/trunk/PKGBUILD)
  i8kutils/repos/extra-x86_64/i8kmon.service
    (from rev 205565, i8kutils/trunk/i8kmon.service)
  i8kutils/repos/extra-x86_64/i8kutils-probe.diff
    (from rev 205565, i8kutils/trunk/i8kutils-probe.diff)
Deleted:
  i8kutils/repos/extra-i686/PKGBUILD
  i8kutils/repos/extra-i686/i8kmon.service
  i8kutils/repos/extra-i686/i8kutils-probe.diff
  i8kutils/repos/extra-x86_64/PKGBUILD
  i8kutils/repos/extra-x86_64/i8kmon.service
  i8kutils/repos/extra-x86_64/i8kutils-probe.diff

----------------------------------+
 /PKGBUILD                        |   80 +++++++++++++++++
 /i8kmon.service                  |   18 +++
 /i8kutils-probe.diff             |  168 +++++++++++++++++++++++++++++++++++++
 extra-i686/PKGBUILD              |   40 --------
 extra-i686/i8kmon.service        |    9 -
 extra-i686/i8kutils-probe.diff   |   84 ------------------
 extra-x86_64/PKGBUILD            |   40 --------
 extra-x86_64/i8kmon.service      |    9 -
 extra-x86_64/i8kutils-probe.diff |   84 ------------------
 9 files changed, 266 insertions(+), 266 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2014-02-07 20:38:06 UTC (rev 205565)
+++ extra-i686/PKGBUILD	2014-02-07 20:38:36 UTC (rev 205566)
@@ -1,40 +0,0 @@
-# $Id$
-# Maintainer: 
-
-pkgname=i8kutils
-pkgver=1.40
-pkgrel=3
-pkgdesc="Dell Inspiron/Latitude kernel driver and utilities"
-arch=('i686' 'x86_64')
-url="https://launchpad.net/i8kutils"
-license=('GPL')
-depends=('bash')
-optdepends=('tk: for i8kmon deamon')
-backup=('etc/i8kutils/i8kmon.conf')
-source=(http://ftp.de.debian.org/debian/pool/main/i/${pkgname}/${pkgname}_${pkgver}.tar.gz
-        i8kmon.service i8kutils-probe.diff)
-sha1sums=('584edfbd90aa167885520b84848381585d9212fb'
-          '5c20f5241de7e60b46117269f4e867b08734cdc8'
-          'ab9058f92adb3e8b9306568005d5751908fb1765')
-
-prepare() {
-  cd $pkgname-$pkgver
-  patch -p0 -i "$srcdir"/i8kutils-probe.diff
-
-  # conform to Arch Linux guidelines
-  sed -i 's|/etc/i8kmon|/etc/i8kutils/i8kmon.conf|g' i8kmon.1
-  sed -i 's|/etc/i8kmon.conf|/etc/i8kutils/i8kmon.conf|g' i8kmon
-}
-
-build() {
-  cd $pkgname-$pkgver
-  make
-}
-
-package() {
-  cd $pkgname-$pkgver
-  install -d "$pkgdir"/usr/{bin,share/man/man1}
-  make DESTDIR="$pkgdir" install install-man
-  install -D -m644 i8kmon.conf "$pkgdir/etc/i8kutils/i8kmon.conf"
-  install -D -m644 ../i8kmon.service "$pkgdir/usr/lib/systemd/system/i8kmon.service"
-}

Copied: i8kutils/repos/extra-i686/PKGBUILD (from rev 205565, i8kutils/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2014-02-07 20:38:36 UTC (rev 205566)
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: 
+
+pkgname=i8kutils
+pkgver=1.40
+pkgrel=4
+pkgdesc="Dell Inspiron/Latitude kernel driver and utilities"
+arch=('i686' 'x86_64')
+url="https://launchpad.net/i8kutils"
+license=('GPL')
+depends=('bash' 'acpi')
+optdepends=('tk: for i8kmon deamon')
+backup=('etc/i8kutils/i8kmon.conf')
+source=(http://ftp.de.debian.org/debian/pool/main/i/${pkgname}/${pkgname}_${pkgver}.tar.gz
+        i8kmon.service i8kutils-probe.diff)
+sha1sums=('584edfbd90aa167885520b84848381585d9212fb'
+          '5c20f5241de7e60b46117269f4e867b08734cdc8'
+          'ab9058f92adb3e8b9306568005d5751908fb1765')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p0 -i "$srcdir"/i8kutils-probe.diff
+
+  # conform to Arch Linux guidelines
+  sed -i 's|/etc/i8kmon|/etc/i8kutils/i8kmon.conf|g' i8kmon.1
+  sed -i 's|/etc/i8kmon.conf|/etc/i8kutils/i8kmon.conf|g' i8kmon
+}
+
+build() {
+  cd $pkgname-$pkgver
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  install -d "$pkgdir"/usr/{bin,share/man/man1}
+  make DESTDIR="$pkgdir" install install-man
+  install -D -m644 i8kmon.conf "$pkgdir/etc/i8kutils/i8kmon.conf"
+  install -D -m644 ../i8kmon.service "$pkgdir/usr/lib/systemd/system/i8kmon.service"
+}

Deleted: extra-i686/i8kmon.service
===================================================================
--- extra-i686/i8kmon.service	2014-02-07 20:38:06 UTC (rev 205565)
+++ extra-i686/i8kmon.service	2014-02-07 20:38:36 UTC (rev 205566)
@@ -1,9 +0,0 @@
-[Unit]
-Description=Dell laptop thermal monitoring
-ConditionPathExists=/proc/i8k
-
-[Service]
-ExecStart=/usr/bin/i8kmon -d
-
-[Install]
-WantedBy=multi-user.target

Copied: i8kutils/repos/extra-i686/i8kmon.service (from rev 205565, i8kutils/trunk/i8kmon.service)
===================================================================
--- extra-i686/i8kmon.service	                        (rev 0)
+++ extra-i686/i8kmon.service	2014-02-07 20:38:36 UTC (rev 205566)
@@ -0,0 +1,9 @@
+[Unit]
+Description=Dell laptop thermal monitoring
+ConditionPathExists=/proc/i8k
+
+[Service]
+ExecStart=/usr/bin/i8kmon -d
+
+[Install]
+WantedBy=multi-user.target

Deleted: extra-i686/i8kutils-probe.diff
===================================================================
--- extra-i686/i8kutils-probe.diff	2014-02-07 20:38:06 UTC (rev 205565)
+++ extra-i686/i8kutils-probe.diff	2014-02-07 20:38:36 UTC (rev 205566)
@@ -1,84 +0,0 @@
-=== modified file 'i8kmon'
---- i8kmon	2013-11-23 19:41:17 +0000
-+++ i8kmon	2013-11-23 20:30:47 +0000
-@@ -27,6 +27,7 @@
-     sysconfig	/etc/i8kmon.conf
-     userconfig	~/.i8kmon
-     i8kfan	/usr/bin/i8kfan
-+    acpi    "acpi"
-     geometry	{}
-     use_conf    1
-     auto	1
-@@ -202,22 +202,15 @@
- 
-     set status(acpi_timer) [expr 60 / $config(timeout)]
- 
--    set cmd "acpi -a"; set acpi_ac [eval exec $cmd]
--    set cmd2 "acpitool -a"; set acpi_ac2 [eval exec $cmd2]
--    set ret [string first "on-line" $acpi_ac]
--	set ret2 [string first "online" $acpi_ac2]
--    if {$ret >= 0 | $ret2 >= 0} {
-+    set acpi_ac [exec {*}$config(acpi)]
-+    if {[string match *on-line* $acpi_ac] || [string match *online* $acpi_ac]} {
-         set status(ac) 1
-     } else {
-         set status(ac) 0
-     }
- 
-     if {$config(verbose) > 0} {
--        if {$ret >= 0} {
--            puts "[clock seconds] acpi: $acpi_ac"
--        } elseif {$ret2 >= 0} {
--            puts "[clock seconds] acpi: $acpi_ac2"
--        }
-+        puts "[clock seconds] acpi: $acpi_ac"
-     }
- 
-     return 0
-@@ -495,8 +487,8 @@
-     -a|--auto               control automatically the fans
-    -na|--noauto	            don\x27t control automatically the fans
-     -d|--daemon             run in daemon mode without user interface
--   -nd|--nodaemon           don\x27 run as daemon, open the user interface
--   -nc|--nouserconfig       don't use \$HOME/.i8kmon
-+   -nd|--nodaemon           don\x27t run as daemon, open the user interface
-+   -nc|--nouserconfig       don\x27t use \$HOME/.i8kmon
-     -v|--verbose            report status on stdout
-     -g|--geometry <geom>    set applet geometry
-     -t|--timeout <secs>     set poll timeout
-@@ -556,7 +548,7 @@
-     }
- 
-     if {$config(verbose) > 0} {
--	set copyright "Copyright (C) 2013 i8kutils <https://launchpad.net/i8kutils>"
-+	set copyright "Copyright (C) 2013 Vitor Augusto <vitorafsr at gmail.com>"
- 	puts "i8kmon $PROG_VERSION - $copyright"
- 	parray config
- 	parray status
-@@ -596,8 +588,25 @@
-     set status(rightspeed) "0 $rspeed1 $rspeed2 $rspeed3"
- }
- 
-+# probe external tools
-+proc probe_tools {} {
-+
-+    # The possibility of choosing 'acpi' or 'acpitool' is for compatibility
-+    # between different architectures: amd64, i386, kFreeBSD
-+    # This code below is strictly related on package dependency stated at
-+    # keyword 'Depends:' on file 'debian/control'
-+    if {![catch {exec acpi}]} {
-+        set config(acpi) "acpi"
-+    } elseif {[catch {exec acpitool}]} {
-+        set config(acpi) "acpitool"
-+    } else {
-+        puts stderr "Package dependency problem: neither 'acpi' nor 'acpitool' package is installed"
-+    }
-+}
-+
- proc main {} {
-     probe_fan_speed
-+    probe_tools
-     read_config
-     parse_options
-     make_ui
-

Copied: i8kutils/repos/extra-i686/i8kutils-probe.diff (from rev 205565, i8kutils/trunk/i8kutils-probe.diff)
===================================================================
--- extra-i686/i8kutils-probe.diff	                        (rev 0)
+++ extra-i686/i8kutils-probe.diff	2014-02-07 20:38:36 UTC (rev 205566)
@@ -0,0 +1,84 @@
+=== modified file 'i8kmon'
+--- i8kmon	2013-11-23 19:41:17 +0000
++++ i8kmon	2013-11-23 20:30:47 +0000
+@@ -27,6 +27,7 @@
+     sysconfig	/etc/i8kmon.conf
+     userconfig	~/.i8kmon
+     i8kfan	/usr/bin/i8kfan
++    acpi    "acpi"
+     geometry	{}
+     use_conf    1
+     auto	1
+@@ -202,22 +202,15 @@
+ 
+     set status(acpi_timer) [expr 60 / $config(timeout)]
+ 
+-    set cmd "acpi -a"; set acpi_ac [eval exec $cmd]
+-    set cmd2 "acpitool -a"; set acpi_ac2 [eval exec $cmd2]
+-    set ret [string first "on-line" $acpi_ac]
+-	set ret2 [string first "online" $acpi_ac2]
+-    if {$ret >= 0 | $ret2 >= 0} {
++    set acpi_ac [exec {*}$config(acpi)]
++    if {[string match *on-line* $acpi_ac] || [string match *online* $acpi_ac]} {
+         set status(ac) 1
+     } else {
+         set status(ac) 0
+     }
+ 
+     if {$config(verbose) > 0} {
+-        if {$ret >= 0} {
+-            puts "[clock seconds] acpi: $acpi_ac"
+-        } elseif {$ret2 >= 0} {
+-            puts "[clock seconds] acpi: $acpi_ac2"
+-        }
++        puts "[clock seconds] acpi: $acpi_ac"
+     }
+ 
+     return 0
+@@ -495,8 +487,8 @@
+     -a|--auto               control automatically the fans
+    -na|--noauto	            don\x27t control automatically the fans
+     -d|--daemon             run in daemon mode without user interface
+-   -nd|--nodaemon           don\x27 run as daemon, open the user interface
+-   -nc|--nouserconfig       don't use \$HOME/.i8kmon
++   -nd|--nodaemon           don\x27t run as daemon, open the user interface
++   -nc|--nouserconfig       don\x27t use \$HOME/.i8kmon
+     -v|--verbose            report status on stdout
+     -g|--geometry <geom>    set applet geometry
+     -t|--timeout <secs>     set poll timeout
+@@ -556,7 +548,7 @@
+     }
+ 
+     if {$config(verbose) > 0} {
+-	set copyright "Copyright (C) 2013 i8kutils <https://launchpad.net/i8kutils>"
++	set copyright "Copyright (C) 2013 Vitor Augusto <vitorafsr at gmail.com>"
+ 	puts "i8kmon $PROG_VERSION - $copyright"
+ 	parray config
+ 	parray status
+@@ -596,8 +588,25 @@
+     set status(rightspeed) "0 $rspeed1 $rspeed2 $rspeed3"
+ }
+ 
++# probe external tools
++proc probe_tools {} {
++
++    # The possibility of choosing 'acpi' or 'acpitool' is for compatibility
++    # between different architectures: amd64, i386, kFreeBSD
++    # This code below is strictly related on package dependency stated at
++    # keyword 'Depends:' on file 'debian/control'
++    if {![catch {exec acpi}]} {
++        set config(acpi) "acpi"
++    } elseif {[catch {exec acpitool}]} {
++        set config(acpi) "acpitool"
++    } else {
++        puts stderr "Package dependency problem: neither 'acpi' nor 'acpitool' package is installed"
++    }
++}
++
+ proc main {} {
+     probe_fan_speed
++    probe_tools
+     read_config
+     parse_options
+     make_ui
+

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2014-02-07 20:38:06 UTC (rev 205565)
+++ extra-x86_64/PKGBUILD	2014-02-07 20:38:36 UTC (rev 205566)
@@ -1,40 +0,0 @@
-# $Id$
-# Maintainer: 
-
-pkgname=i8kutils
-pkgver=1.40
-pkgrel=3
-pkgdesc="Dell Inspiron/Latitude kernel driver and utilities"
-arch=('i686' 'x86_64')
-url="https://launchpad.net/i8kutils"
-license=('GPL')
-depends=('bash')
-optdepends=('tk: for i8kmon deamon')
-backup=('etc/i8kutils/i8kmon.conf')
-source=(http://ftp.de.debian.org/debian/pool/main/i/${pkgname}/${pkgname}_${pkgver}.tar.gz
-        i8kmon.service i8kutils-probe.diff)
-sha1sums=('584edfbd90aa167885520b84848381585d9212fb'
-          '5c20f5241de7e60b46117269f4e867b08734cdc8'
-          'ab9058f92adb3e8b9306568005d5751908fb1765')
-
-prepare() {
-  cd $pkgname-$pkgver
-  patch -p0 -i "$srcdir"/i8kutils-probe.diff
-
-  # conform to Arch Linux guidelines
-  sed -i 's|/etc/i8kmon|/etc/i8kutils/i8kmon.conf|g' i8kmon.1
-  sed -i 's|/etc/i8kmon.conf|/etc/i8kutils/i8kmon.conf|g' i8kmon
-}
-
-build() {
-  cd $pkgname-$pkgver
-  make
-}
-
-package() {
-  cd $pkgname-$pkgver
-  install -d "$pkgdir"/usr/{bin,share/man/man1}
-  make DESTDIR="$pkgdir" install install-man
-  install -D -m644 i8kmon.conf "$pkgdir/etc/i8kutils/i8kmon.conf"
-  install -D -m644 ../i8kmon.service "$pkgdir/usr/lib/systemd/system/i8kmon.service"
-}

Copied: i8kutils/repos/extra-x86_64/PKGBUILD (from rev 205565, i8kutils/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2014-02-07 20:38:36 UTC (rev 205566)
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: 
+
+pkgname=i8kutils
+pkgver=1.40
+pkgrel=4
+pkgdesc="Dell Inspiron/Latitude kernel driver and utilities"
+arch=('i686' 'x86_64')
+url="https://launchpad.net/i8kutils"
+license=('GPL')
+depends=('bash' 'acpi')
+optdepends=('tk: for i8kmon deamon')
+backup=('etc/i8kutils/i8kmon.conf')
+source=(http://ftp.de.debian.org/debian/pool/main/i/${pkgname}/${pkgname}_${pkgver}.tar.gz
+        i8kmon.service i8kutils-probe.diff)
+sha1sums=('584edfbd90aa167885520b84848381585d9212fb'
+          '5c20f5241de7e60b46117269f4e867b08734cdc8'
+          'ab9058f92adb3e8b9306568005d5751908fb1765')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p0 -i "$srcdir"/i8kutils-probe.diff
+
+  # conform to Arch Linux guidelines
+  sed -i 's|/etc/i8kmon|/etc/i8kutils/i8kmon.conf|g' i8kmon.1
+  sed -i 's|/etc/i8kmon.conf|/etc/i8kutils/i8kmon.conf|g' i8kmon
+}
+
+build() {
+  cd $pkgname-$pkgver
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  install -d "$pkgdir"/usr/{bin,share/man/man1}
+  make DESTDIR="$pkgdir" install install-man
+  install -D -m644 i8kmon.conf "$pkgdir/etc/i8kutils/i8kmon.conf"
+  install -D -m644 ../i8kmon.service "$pkgdir/usr/lib/systemd/system/i8kmon.service"
+}

Deleted: extra-x86_64/i8kmon.service
===================================================================
--- extra-x86_64/i8kmon.service	2014-02-07 20:38:06 UTC (rev 205565)
+++ extra-x86_64/i8kmon.service	2014-02-07 20:38:36 UTC (rev 205566)
@@ -1,9 +0,0 @@
-[Unit]
-Description=Dell laptop thermal monitoring
-ConditionPathExists=/proc/i8k
-
-[Service]
-ExecStart=/usr/bin/i8kmon -d
-
-[Install]
-WantedBy=multi-user.target

Copied: i8kutils/repos/extra-x86_64/i8kmon.service (from rev 205565, i8kutils/trunk/i8kmon.service)
===================================================================
--- extra-x86_64/i8kmon.service	                        (rev 0)
+++ extra-x86_64/i8kmon.service	2014-02-07 20:38:36 UTC (rev 205566)
@@ -0,0 +1,9 @@
+[Unit]
+Description=Dell laptop thermal monitoring
+ConditionPathExists=/proc/i8k
+
+[Service]
+ExecStart=/usr/bin/i8kmon -d
+
+[Install]
+WantedBy=multi-user.target

Deleted: extra-x86_64/i8kutils-probe.diff
===================================================================
--- extra-x86_64/i8kutils-probe.diff	2014-02-07 20:38:06 UTC (rev 205565)
+++ extra-x86_64/i8kutils-probe.diff	2014-02-07 20:38:36 UTC (rev 205566)
@@ -1,84 +0,0 @@
-=== modified file 'i8kmon'
---- i8kmon	2013-11-23 19:41:17 +0000
-+++ i8kmon	2013-11-23 20:30:47 +0000
-@@ -27,6 +27,7 @@
-     sysconfig	/etc/i8kmon.conf
-     userconfig	~/.i8kmon
-     i8kfan	/usr/bin/i8kfan
-+    acpi    "acpi"
-     geometry	{}
-     use_conf    1
-     auto	1
-@@ -202,22 +202,15 @@
- 
-     set status(acpi_timer) [expr 60 / $config(timeout)]
- 
--    set cmd "acpi -a"; set acpi_ac [eval exec $cmd]
--    set cmd2 "acpitool -a"; set acpi_ac2 [eval exec $cmd2]
--    set ret [string first "on-line" $acpi_ac]
--	set ret2 [string first "online" $acpi_ac2]
--    if {$ret >= 0 | $ret2 >= 0} {
-+    set acpi_ac [exec {*}$config(acpi)]
-+    if {[string match *on-line* $acpi_ac] || [string match *online* $acpi_ac]} {
-         set status(ac) 1
-     } else {
-         set status(ac) 0
-     }
- 
-     if {$config(verbose) > 0} {
--        if {$ret >= 0} {
--            puts "[clock seconds] acpi: $acpi_ac"
--        } elseif {$ret2 >= 0} {
--            puts "[clock seconds] acpi: $acpi_ac2"
--        }
-+        puts "[clock seconds] acpi: $acpi_ac"
-     }
- 
-     return 0
-@@ -495,8 +487,8 @@
-     -a|--auto               control automatically the fans
-    -na|--noauto	            don\x27t control automatically the fans
-     -d|--daemon             run in daemon mode without user interface
--   -nd|--nodaemon           don\x27 run as daemon, open the user interface
--   -nc|--nouserconfig       don't use \$HOME/.i8kmon
-+   -nd|--nodaemon           don\x27t run as daemon, open the user interface
-+   -nc|--nouserconfig       don\x27t use \$HOME/.i8kmon
-     -v|--verbose            report status on stdout
-     -g|--geometry <geom>    set applet geometry
-     -t|--timeout <secs>     set poll timeout
-@@ -556,7 +548,7 @@
-     }
- 
-     if {$config(verbose) > 0} {
--	set copyright "Copyright (C) 2013 i8kutils <https://launchpad.net/i8kutils>"
-+	set copyright "Copyright (C) 2013 Vitor Augusto <vitorafsr at gmail.com>"
- 	puts "i8kmon $PROG_VERSION - $copyright"
- 	parray config
- 	parray status
-@@ -596,8 +588,25 @@
-     set status(rightspeed) "0 $rspeed1 $rspeed2 $rspeed3"
- }
- 
-+# probe external tools
-+proc probe_tools {} {
-+
-+    # The possibility of choosing 'acpi' or 'acpitool' is for compatibility
-+    # between different architectures: amd64, i386, kFreeBSD
-+    # This code below is strictly related on package dependency stated at
-+    # keyword 'Depends:' on file 'debian/control'
-+    if {![catch {exec acpi}]} {
-+        set config(acpi) "acpi"
-+    } elseif {[catch {exec acpitool}]} {
-+        set config(acpi) "acpitool"
-+    } else {
-+        puts stderr "Package dependency problem: neither 'acpi' nor 'acpitool' package is installed"
-+    }
-+}
-+
- proc main {} {
-     probe_fan_speed
-+    probe_tools
-     read_config
-     parse_options
-     make_ui
-

Copied: i8kutils/repos/extra-x86_64/i8kutils-probe.diff (from rev 205565, i8kutils/trunk/i8kutils-probe.diff)
===================================================================
--- extra-x86_64/i8kutils-probe.diff	                        (rev 0)
+++ extra-x86_64/i8kutils-probe.diff	2014-02-07 20:38:36 UTC (rev 205566)
@@ -0,0 +1,84 @@
+=== modified file 'i8kmon'
+--- i8kmon	2013-11-23 19:41:17 +0000
++++ i8kmon	2013-11-23 20:30:47 +0000
+@@ -27,6 +27,7 @@
+     sysconfig	/etc/i8kmon.conf
+     userconfig	~/.i8kmon
+     i8kfan	/usr/bin/i8kfan
++    acpi    "acpi"
+     geometry	{}
+     use_conf    1
+     auto	1
+@@ -202,22 +202,15 @@
+ 
+     set status(acpi_timer) [expr 60 / $config(timeout)]
+ 
+-    set cmd "acpi -a"; set acpi_ac [eval exec $cmd]
+-    set cmd2 "acpitool -a"; set acpi_ac2 [eval exec $cmd2]
+-    set ret [string first "on-line" $acpi_ac]
+-	set ret2 [string first "online" $acpi_ac2]
+-    if {$ret >= 0 | $ret2 >= 0} {
++    set acpi_ac [exec {*}$config(acpi)]
++    if {[string match *on-line* $acpi_ac] || [string match *online* $acpi_ac]} {
+         set status(ac) 1
+     } else {
+         set status(ac) 0
+     }
+ 
+     if {$config(verbose) > 0} {
+-        if {$ret >= 0} {
+-            puts "[clock seconds] acpi: $acpi_ac"
+-        } elseif {$ret2 >= 0} {
+-            puts "[clock seconds] acpi: $acpi_ac2"
+-        }
++        puts "[clock seconds] acpi: $acpi_ac"
+     }
+ 
+     return 0
+@@ -495,8 +487,8 @@
+     -a|--auto               control automatically the fans
+    -na|--noauto	            don\x27t control automatically the fans
+     -d|--daemon             run in daemon mode without user interface
+-   -nd|--nodaemon           don\x27 run as daemon, open the user interface
+-   -nc|--nouserconfig       don't use \$HOME/.i8kmon
++   -nd|--nodaemon           don\x27t run as daemon, open the user interface
++   -nc|--nouserconfig       don\x27t use \$HOME/.i8kmon
+     -v|--verbose            report status on stdout
+     -g|--geometry <geom>    set applet geometry
+     -t|--timeout <secs>     set poll timeout
+@@ -556,7 +548,7 @@
+     }
+ 
+     if {$config(verbose) > 0} {
+-	set copyright "Copyright (C) 2013 i8kutils <https://launchpad.net/i8kutils>"
++	set copyright "Copyright (C) 2013 Vitor Augusto <vitorafsr at gmail.com>"
+ 	puts "i8kmon $PROG_VERSION - $copyright"
+ 	parray config
+ 	parray status
+@@ -596,8 +588,25 @@
+     set status(rightspeed) "0 $rspeed1 $rspeed2 $rspeed3"
+ }
+ 
++# probe external tools
++proc probe_tools {} {
++
++    # The possibility of choosing 'acpi' or 'acpitool' is for compatibility
++    # between different architectures: amd64, i386, kFreeBSD
++    # This code below is strictly related on package dependency stated at
++    # keyword 'Depends:' on file 'debian/control'
++    if {![catch {exec acpi}]} {
++        set config(acpi) "acpi"
++    } elseif {[catch {exec acpitool}]} {
++        set config(acpi) "acpitool"
++    } else {
++        puts stderr "Package dependency problem: neither 'acpi' nor 'acpitool' package is installed"
++    }
++}
++
+ proc main {} {
+     probe_fan_speed
++    probe_tools
+     read_config
+     parse_options
+     make_ui
+




More information about the arch-commits mailing list