]> git.pld-linux.org Git - packages/psensor.git/commitdiff
- updated to 1.2.0
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 18 May 2018 17:54:48 +0000 (19:54 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 18 May 2018 17:54:48 +0000 (19:54 +0200)
- removed obsolete x32,json-c,ac patches
- added json patch (fixes build with json-c 0.13)
- added sh patch (remove bashisms from configure)

ac.patch [deleted file]
json-c.patch [deleted file]
psensor-json.patch [new file with mode: 0644]
psensor-sh.patch [new file with mode: 0644]
psensor.spec
x32.patch [deleted file]

diff --git a/ac.patch b/ac.patch
deleted file mode 100644 (file)
index be1e269..0000000
--- a/ac.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- psensor-0.6.2.19/configure.ac~     2015-12-31 12:20:05.000000000 +0100
-+++ psensor-0.6.2.19/configure.ac      2015-12-31 12:20:38.767654738 +0100
-@@ -4,7 +4,7 @@
- AC_PREREQ([2.64])
- AC_INIT([psensor], [0.6.2.19],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor])
--AM_INIT_AUTOMAKE([-Wall -Werror gnu])
-+AM_INIT_AUTOMAKE([-Wall])
- AC_CONFIG_SRCDIR([src/compat.h])
- AC_CONFIG_HEADERS([config.h])
-@@ -15,6 +15,7 @@
- # Checks lib build
- AC_PROG_RANLIB
-+AM_PROG_AR
- # Checks for header files.
- AC_PATH_X
---- psensor-0.6.2.19/src/lib/Makefile.am~      2012-08-11 10:47:20.000000000 +0200
-+++ psensor-0.6.2.19/src/lib/Makefile.am       2015-12-31 12:23:20.733150672 +0100
-@@ -13,7 +13,7 @@
-       p_io.h p_io.c \
-       url.c url.h
--AM_CPPFLAGS = -Wall -Werror
-+AM_CPPFLAGS = -Wall
- if NVIDIA
- libpsensor_a_SOURCES += nvidia.c
---- psensor-0.6.2.19/src/Makefile.am~  2012-08-11 10:47:21.000000000 +0200
-+++ psensor-0.6.2.19/src/Makefile.am   2015-12-31 12:23:51.160221404 +0100
-@@ -8,7 +8,7 @@
- endif
- endif
--AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
-+AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
-       -I$(top_srcdir)/src/lib \
-       -I$(top_srcdir)/src/unity \
-       $(GTK_CFLAGS)\
---- psensor-0.6.2.19/src/server/Makefile.am~   2012-08-11 10:47:21.000000000 +0200
-+++ psensor-0.6.2.19/src/server/Makefile.am    2015-12-31 12:24:04.713734531 +0100
-@@ -1,7 +1,7 @@
- bin_PROGRAMS =  psensor-server
- psensor_server_SOURCES = server.c server.h
--AM_CPPFLAGS = -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
-+AM_CPPFLAGS = -Wall -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
-       -I$(top_srcdir)/src \
-       -I$(top_srcdir)/src/lib \
-       $(SENSORS_CFLAGS)\
diff --git a/json-c.patch b/json-c.patch
deleted file mode 100644 (file)
index 560e1ac..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- psensor-0.6.2.19/configure.ac~     2012-08-11 10:47:38.000000000 +0200
-+++ psensor-0.6.2.19/configure.ac      2015-12-31 12:19:13.663175576 +0100
-@@ -125,7 +125,7 @@
- # Check JSON, needed for remote monitoring
- JSON_LIBS=
- PKG_CHECK_MODULES(JSON, 
--  json, 
-+  json-c, 
-   [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], 
-   [AC_MSG_WARN("Remote monitoring disabled, json missing")])
- AM_CONDITIONAL(JSON, test -n "$JSON_LIBS")
---- psensor-0.6.2.19/src/lib/psensor_json.h~   2012-08-11 10:47:20.000000000 +0200
-+++ psensor-0.6.2.19/src/lib/psensor_json.h    2015-12-31 12:21:46.345226316 +0100
-@@ -19,7 +19,7 @@
- #ifndef _PSENSOR_PSENSOR_JSON_H_
- #define _PSENSOR_PSENSOR_JSON_H_
--#include <json/json.h>
-+#include <json-c/json.h>
- #include "psensor.h"
---- psensor-0.6.2.19/src/server/sysinfo.c~     2012-08-11 10:47:21.000000000 +0200
-+++ psensor-0.6.2.19/src/server/sysinfo.c      2015-12-31 12:25:00.497806672 +0100
-@@ -21,7 +21,7 @@
- #include <glibtop/netlist.h>
- #include <glibtop/netload.h>
--#include <json/json.h>
-+#include <json-c/json.h>
- #include "sysinfo.h"
diff --git a/psensor-json.patch b/psensor-json.patch
new file mode 100644 (file)
index 0000000..111e372
--- /dev/null
@@ -0,0 +1,26 @@
+--- psensor-1.2.0/src/rsensor.c.orig   2016-12-20 00:39:54.000000000 +0100
++++ psensor-1.2.0/src/rsensor.c        2018-05-18 19:32:37.455589334 +0200
+@@ -133,7 +133,7 @@
+       obj = get_json_object(url);
+-      if (obj && !is_error(obj)) {
++      if (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 != 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;
diff --git a/psensor-sh.patch b/psensor-sh.patch
new file mode 100644 (file)
index 0000000..02f1878
--- /dev/null
@@ -0,0 +1,20 @@
+--- psensor-1.2.0/configure.ac.orig    2016-12-20 00:39:54.000000000 +0100
++++ psensor-1.2.0/configure.ac 2018-05-18 19:48:41.908911654 +0200
+@@ -67,13 +67,13 @@
+                 [AC_MSG_WARN("gtk missing psensor will not be built")])
+ AM_CONDITIONAL(GTK, test -n "$GTK_LIBS")
+ # ensure that only allowed headers are included
+-GTK_CFLAGS+=" -DGTK_DISABLE_SINGLE_INCLUDES "
++GTK_CFLAGS="$GTK_CFLAGS -DGTK_DISABLE_SINGLE_INCLUDES "
+ # ensure that no gtk/dk deprecated symbols are used
+-GTK_CFLAGS+=" -DGDK_DISABLE_DEPRECATED "
++GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATED "
+ # do not enable flag because GtkStatusIcon is deprecated
+-#GTK_CFLAGS+=" -DGTK_DISABLE_DEPRECATED "
++#GTK_CFLAGS="$GTK_CFLAGS -DGTK_DISABLE_DEPRECATED "
+ # ensure use of accessors
+-GTK_CFLAGS+=" -DGSEAL_ENABLE "
++GTK_CFLAGS="$GTK_CFLAGS -DGSEAL_ENABLE "
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
index 2f324a17c987521e48b47d5e4983b09252b2d51a..c56a1ad6417f17b49751a3274988d06d2ff2470a 100644 (file)
+# TODO: ATI ADL on bcond?
+#
+# Conditional build:
+%bcond_without appindicator    # application indicators support
+%bcond_with    unity           # Unity support
+%bcond_without nvidia          # NVidia GPU support (using libXNVCtrl)
+%bcond_with    ati             # ATI GPU support (using libatiadl)
+
 Summary:       A Graphical Temperature Monitor
+Summary(pl.UTF-8):     Graficzny monitor temperatury
 Name:          psensor
-Version:       0.6.2.19
-Release:       6
+Version:       1.2.0
+Release:       1
 License:       GPL v2
 Group:         X11/Applications
-URL:           http://wpitchoune.net/psensor
 Source0:       http://wpitchoune.net/psensor/files/%{name}-%{version}.tar.gz
-# Source0-md5: ddc21cbb36c6c622f7b5c1c7eb277374
-Patch0:                x32.patch
-Patch1:                json-c.patch
-Patch2:                ac.patch
-BuildRequires: GConf2-devel
-BuildRequires: cairo-devel
+# Source0-md5: 0d8ac0a1312e96f2101ecc7c684e2863
+Patch0:                %{name}-json.patch
+Patch1:                %{name}-sh.patch
+URL:           http://wpitchoune.net/psensor/
+#%{?with_ati:BuildRequires:    libatiadlxx, adl_defines.h}
+BuildRequires: asciidoc
+BuildRequires: autoconf >= 2.69
+BuildRequires: automake
 BuildRequires: curl-devel
-BuildRequires: gettext-tools
-BuildRequires: gtk+3-devel
-BuildRequires: json-c-devel
-BuildRequires: libXNVCtrl-devel
-BuildRequires: libgtop-devel
+BuildRequires: gettext-tools >= 0.16
+BuildRequires: glib2-devel >= 1:2.26
+BuildRequires: gtk+3-devel >= 3.4
+BuildRequires: help2man
+BuildRequires: json-c-devel >= 0.12
+%{?with_nvidia:BuildRequires:  libXNVCtrl-devel}
+%if %{with appindicator}
+BuildRequires: libappindicator-gtk3-devel
+%else
+BuildConflicts:        libappindicator-gtk3-devel
+%endif
+BuildRequires: libatasmart-devel
+BuildRequires: libgtop-devel >= 2.0
 BuildRequires: libmicrohttpd-devel
 BuildRequires: libnotify-devel
+%if %{with unity}
+BuildRequires: libunity-devel >= 3.4.2
+%else
+BuildConflicts:        libunity-devel
+%endif
 BuildRequires: lm_sensors-devel
 BuildRequires: pkgconfig
-Requires:      desktop-file-utils
-Requires:      gtk-update-icon-cache
+BuildRequires: udisks2-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
+Requires(post,postun): desktop-file-utils
+Requires(post,postun): gtk-update-icon-cache
+Requires:      glib2 >= 1:2.26
+Requires:      gtk+3 >= 3.4
+Requires:      json-c >= 0.12
 Requires:      hddtemp
 Requires:      hicolor-icon-theme
+%{?with_unity:BuildRequires:   libunity >= 3.4.2}
 Requires:      lm_sensors
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Psensor is a graphical hardware temperature monitor for Linux.
 
-It is based on:
-- lm-sensors for retrieving hardware temperatures
-- GTK for the UI
-- Cairo for the graph drawing
-- NVidia library for retrieving NVidia GPUs temperature (not included
-  - licensing problem)
+It draws realtime charts and raises alerts about:
+- the temperature of the motherboard and CPU sensors (using
+  lm-sensors).
+- the temperature of the NVidia GPUs (using XNVCtrl)
+%if %{with ati}
+- the temperature of ATI GPUs (using ATI ADL SDK)
+%endif
+- the temperature of the Hard Disk Drives (using hddtemp, libatasmart
+  or udisks2)
+- the rotation speed of the fans
+- the temperature of a remote computer
+- the CPU load
+
+Alerts are using Desktop Notification and a specific GTK+ status icon.
+
+%description -l pl.UTF-8
+Psensor to graficzny monitor temperatury sprzętu dla Linuksa.
+
+Rysuje w czasie rzeczywistym wykresy i zgłasza alarmy dotyczące:
+- temperatury płyty głównej i czujników procesora (przy użyciu
+  lm-sensors)
+- temperatury GPU firmy NVidia (przy użyciu XNVCtrl)
+%if %{with ati}
+- temperatury GPU formy ATI (przy użyciu ATI ADL SDK)
+%endif
+- temperatury dysków twardych (przy użyciu hddtemp, libatasmart lub
+  udisks2)
+- prędkości obrotowej wentylatorów
+- temperatury komputerów zdalnych
+- obciążenia procesora
 
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
 %{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+# disable cppcheck: it's developer tool
+%configure \
+       %{!?with_nvidia:ac_cv_NVCtrl_NVCtrl_h=no} \
+       ac_cv_prog_HAVE_CPPCHECK=no \
+       %{?with_ati:--with-libatiadl}
 %{__make} -j1
 
 %install
@@ -66,16 +123,18 @@ rm -rf $RPM_BUILD_ROOT
 # unsupported themes, or size. remove
 %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/ubuntu-mono-dark
 %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/ubuntu-mono-light
-%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/14x14
+%{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/14x14
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
+%glib_compile_schemas
 %update_desktop_database
 %update_icon_cache hicolor
 
 %postun
+%glib_compile_schemas
 %update_desktop_database
 %update_icon_cache hicolor
 
@@ -84,9 +143,10 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS NEWS README
 %attr(755,root,root) %{_bindir}/psensor
 %attr(755,root,root) %{_bindir}/psensor-server
-%{_mandir}/man1/psensor-server.1*
+%{_datadir}/%{name}
+%{_datadir}/glib-2.0/schemas/psensor.gschema.xml
 %{_mandir}/man1/psensor.1*
-/etc/xdg/autostart/psensor.desktop
+%{_mandir}/man1/psensor-server.1*
 %{_desktopdir}/psensor.desktop
-%{_iconsdir}/hicolor/*/apps/psensor*.*
-%{_datadir}/%{name}
+%{_iconsdir}/hicolor/*x*/apps/psensor.png
+%{_iconsdir}/hicolor/scalable/apps/psensor*.svg
diff --git a/x32.patch b/x32.patch
deleted file mode 100644 (file)
index e7b8203..0000000
--- a/x32.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- psensor-0.6.2.19/src/lib/log.c~    2012-08-11 10:47:20.000000000 +0200
-+++ psensor-0.6.2.19/src/lib/log.c     2015-12-31 12:16:32.744319007 +0100
-@@ -83,7 +83,11 @@
-       }
-       if (file && lvl <= log_level) {
-+#if defined(__ILP32__)
-+              fprintf(file, "[%lld] %s %s\n", tv.tv_sec, lvl_str, buffer);
-+#else
-               fprintf(file, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer);
-+#endif
-               fflush(file);
-       }
-@@ -93,7 +97,11 @@
-               else
-                       stdf = stdout;
-+#if defined(__ILP32__)
-+              fprintf(stdf, "[%lld] %s %s\n", tv.tv_sec, lvl_str, buffer);
-+#else
-               fprintf(stdf, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer);
-+#endif
-       }
- }
This page took 0.050053 seconds and 4 git commands to generate.