summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTérence Clastres2019-05-07 13:57:55 +0200
committerTérence Clastres2019-05-07 13:57:55 +0200
commit3eb9f878308d84bddabdb25d5998c2376e907707 (patch)
treef5f2469c3a5a31918b4ad622a49bf40620c97d7e
downloadaur-3eb9f878308d84bddabdb25d5998c2376e907707.tar.gz
Initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD48
-rw-r--r--is_error.patch26
3 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e4d67663059
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = psensor-git
+ pkgdesc = A graphical hardware temperature monitor for Linux
+ pkgver = v1.2.0.r70.gd9832db
+ pkgrel = 1
+ url = https://gitlab.com/jeanfi/psensor
+ arch = x86_64
+ license = GPL2
+ makedepends = help2man
+ depends = lm_sensors
+ depends = dconf
+ depends = gtk3
+ depends = udisks2
+ depends = curl
+ depends = libgtop
+ depends = libnotify
+ depends = libxnvctrl
+ depends = json-c
+ depends = libmicrohttpd
+ conflicts = psensor
+ source = psensor-git::git+https://gitlab.com/jeanfi/psensor.git
+ source = is_error.patch
+ sha512sums = SKIP
+ sha512sums = fa1f0a8cdbd75fba2ad980a5beb1807e533ef12154db1f0cc97c9130080584cb0251e29a56068b0400f152e540f326a7b16749bf11b1e844d1d519d7bb0e71ed
+
+pkgname = psensor-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..dd726cb8013
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Térence Clastres <t.clastres@gmail.com>
+# Maintainer: Robin Broda <robin@broda.me>
+# Contributor: X0rg
+# Contributor: marlock <marlock87@hotmail.com>
+# Contributor: Diogo Leal <estranho@diogoleal.com>
+
+pkgname=psensor-git
+pkgver=v1.2.0.r70.gd9832db
+pkgrel=1
+pkgdesc='A graphical hardware temperature monitor for Linux'
+arch=('x86_64')
+url='https://gitlab.com/jeanfi/psensor'
+license=('GPL2')
+depends=('lm_sensors' 'dconf' 'gtk3' 'udisks2' 'curl' 'libgtop' 'libnotify'
+ 'libxnvctrl' 'json-c' 'libmicrohttpd')
+makedepends=('help2man')
+conflicts=("${pkgname%-git}")
+source=("${pkgname}::git+${url}.git"
+ 'is_error.patch')
+sha512sums=('SKIP'
+ 'fa1f0a8cdbd75fba2ad980a5beb1807e533ef12154db1f0cc97c9130080584cb0251e29a56068b0400f152e540f326a7b16749bf11b1e844d1d519d7bb0e71ed')
+
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$pkgname"
+
+ patch -Np1 -i "${srcdir}/is_error.patch"
+}
+
+build() {
+ cd "$pkgname"
+
+ autoreconf -i
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$pkgname"
+
+ make DESTDIR="${pkgdir}/" install
+}
diff --git a/is_error.patch b/is_error.patch
new file mode 100644
index 00000000000..60aaa2d076e
--- /dev/null
+++ b/is_error.patch
@@ -0,0 +1,26 @@
+--- a/src/rsensor.c 2016-12-20 00:39:54.000000000 +0100
++++ b/src/rsensor.c 2018-01-05 19:30:09.089759050 +0100
+@@ -133,7 +133,7 @@
+
+ obj = get_json_object(url);
+
+- if (obj && !is_error(obj)) {
++ if (obj && (obj != NULL)) {
+ n = json_object_array_length(obj);
+ sensors = malloc((n + 1) * sizeof(struct psensor *));
+
+@@ -168,12 +168,12 @@
+
+ obj = get_json_object(get_url(s));
+
+- if (obj && !is_error(obj)) {
++ if (obj && (obj != NULL)) {
+ json_object *om;
+
+ json_object_object_get_ex(obj, "last_measure", &om);
+
+- if (!is_error(obj)) {
++ if (obj != NULL) {
+ json_object *ov, *ot;
+ struct timeval tv;
+