summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaël Guillemenot2015-06-11 15:50:43 +0200
committerLaël Guillemenot2015-06-11 15:50:43 +0200
commit8e40e1830ac8e383026dcd018c0c8cdf5a0c65de (patch)
treee149d61977985b044aea52b921cd5cfebbfcce88
downloadaur-8e40e1830ac8e383026dcd018c0c8cdf5a0c65de.tar.gz
Récupération en provenance de aur
-rw-r--r--.AURINFO19
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD29
-rw-r--r--munin.patch21
-rw-r--r--python2-temper.install11
5 files changed, 101 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO
new file mode 100644
index 000000000000..fee3a716b7a0
--- /dev/null
+++ b/.AURINFO
@@ -0,0 +1,19 @@
+pkgbase = python2-temper
+ pkgdesc = This is a rewrite of a userspace USB driver for TEMPer devices presenting a USB ID like this: 0c45:7401 Microdia
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = https://github.com/padelt/temper-python
+ install = python2-temper.install
+ arch = any
+ license = unknown
+ makedepends = python-distribute
+ depends = python2
+ depends = python2-pyusb-beta
+ depends = python2-setuptools
+ depends = python2-snmp-passpersist
+ provides = python2-temper
+ source = https://github.com/padelt/temper-python/archive/master.zip
+ source = munin.patch
+
+pkgname = python2-temper
+
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e2a23d795e56
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = python2-temper
+ pkgdesc = This is a rewrite of a userspace USB driver for TEMPer devices presenting a USB ID like this: 0c45:7401 Microdia
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = https://github.com/padelt/temper-python
+ install = python2-temper.install
+ arch = any
+ license = unknown
+ makedepends = python-distribute
+ depends = python2
+ depends = python2-pyusb-beta
+ depends = python2-setuptools
+ depends = python2-snmp-passpersist
+ provides = python2-temper
+ source = https://github.com/padelt/temper-python/archive/master.zip
+ source = munin.patch
+ sha256sums = a335199bc8cdbc01a642d8336ab356dbcb6016a7b43c961908fa97bb5a634a3b
+ sha256sums = 2f19940d78f04c72e85d3fed2e896179d71a3a750c069043d77f9adb59f6545b
+
+pkgname = python2-temper
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a98ac93659f2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+pkgname=python2-temper
+pkgver=1.2.1
+pkgrel=1
+pkgdesc="This is a rewrite of a userspace USB driver for TEMPer devices presenting a USB ID like this: 0c45:7401 Microdia"
+arch=('any')
+license=('unknown')
+url=('https://github.com/padelt/temper-python')
+makedepends=('python-distribute')
+install=${pkgname}.install
+source=(https://github.com/padelt/temper-python/archive/master.zip
+ munin.patch)
+sha256sums=('a335199bc8cdbc01a642d8336ab356dbcb6016a7b43c961908fa97bb5a634a3b'
+ '2f19940d78f04c72e85d3fed2e896179d71a3a750c069043d77f9adb59f6545b')
+depends=('python2' 'python2-pyusb-beta' 'python2-setuptools' 'python2-snmp-passpersist')
+provides=("${pkgname}")
+
+prepare() {
+ cd "${srcdir}/temper-python-master"
+ sed -i 's/python/python2/g' "${srcdir}/temper-python-master/etc/munin-temperature"
+ cd "etc"
+ patch -Np1 -i "${srcdir}/munin.patch"
+}
+package() {
+ cd "${srcdir}/temper-python-master"
+ python2 setup.py install --root "${pkgdir}"
+ mkdir -p "${pkgdir}/etc/udev/rules.d" "${pkgdir}/usr/lib/munin/plugins"
+ install -Dm644 "${srcdir}/temper-python-master/etc/99-tempsensor.rules" "${pkgdir}/etc/udev/rules.d/"
+ install -Dm755 "${srcdir}/temper-python-master/etc/munin-temperature" "${pkgdir}/usr/lib/munin/plugins/temper"
+}
diff --git a/munin.patch b/munin.patch
new file mode 100644
index 000000000000..ace5bf895fef
--- /dev/null
+++ b/munin.patch
@@ -0,0 +1,21 @@
+--- etc/munin-temperature.orig 2014-07-02 16:26:17.000000000 +0200
++++ etc/munin-temperature 2014-08-29 20:42:59.770393653 +0200
+@@ -7,7 +7,7 @@
+ #
+ # This code is licensed under the GNU public license (GPL). See LICENSE.md for details.
+
+-from temper.temper import TemperHandler
++from temperusb.temper import TemperHandler
+ import sys
+
+ handler = TemperHandler()
+@@ -21,7 +21,8 @@
+ devices = handler.get_devices()
+ for device in devices:
+ port = device.get_ports()
+- port_name = port.replace('.', '_')
++ port_name = str(port)
++ #.replace('.', '_')
+ if is_config:
+ if len(devices) > 1:
+ print "temp_" + port_name + ".label Temperature in °C (port {0:s})".format(port)
diff --git a/python2-temper.install b/python2-temper.install
new file mode 100644
index 000000000000..0acb55f45da6
--- /dev/null
+++ b/python2-temper.install
@@ -0,0 +1,11 @@
+post_install() {
+ echo "What to add to snmpd.conf"
+ echo ""
+ echo "To emulate an APC Battery/Internal temperature value, add something like this to snmpd.conf. The highest of all measured temperatures in degrees celcius as an integer is reported."
+ echo "pass_persist .1.3.6.1.4.1.318.1.1.1.2.2.2 /usr/bin/temper-snmp"
+ echo ""
+ echo "Alternatively, emulate a Cisco device's temperature information with the following. The first three detected devices will be reported as ..13.1.3.1.3.1, ..3.2 and ..3.3 . The value is the temperature in degree celcius as an integer."
+ echo "pass_persist .1.3.6.1.4.1.9.9.13.1.3 /usr/bin/temper-snmp"
+ echo ""
+ echo "Add --testmode to the line (as an option to snmp.py to enable a mode where APC reports 99°C and Cisco OIDs report 97, 98 and 99°C respectively."
+}