summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
Diffstat (limited to 'redhat')
-rw-r--r--redhat/extras/ksensors/ksensors-0.7.3-18-lmsensors_2x_fix.patch14
-rw-r--r--redhat/extras/ksensors/ksensors_0.7.3-18.diff.gzbin0 -> 16897 bytes
-rw-r--r--redhat/extras/ksensors/ksensors_0.7.3_naming.diff61
-rw-r--r--redhat/extras/ksensors/trinity-ksensors.spec45
4 files changed, 101 insertions, 19 deletions
diff --git a/redhat/extras/ksensors/ksensors-0.7.3-18-lmsensors_2x_fix.patch b/redhat/extras/ksensors/ksensors-0.7.3-18-lmsensors_2x_fix.patch
new file mode 100644
index 000000000..99a681ffc
--- /dev/null
+++ b/redhat/extras/ksensors/ksensors-0.7.3-18-lmsensors_2x_fix.patch
@@ -0,0 +1,14 @@
+--- ksensors-0.7.3/src/lmsensor.cpp.ORI 2011-12-22 06:57:39.285341486 -0500
++++ ksensors-0.7.3/src/lmsensor.cpp 2011-12-22 06:58:33.596092430 -0500
+@@ -43,7 +43,11 @@
+ char *label = NULL;
+ QString uniqueSensorName;
+
++#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
++ uniqueSensorName.sprintf("%s_%d_%d.%s", chip_name->prefix, chip_name->bus, chip_name->addr, main_name);
++#else
+ uniqueSensorName.sprintf("%s_%d_%d.%s", chip_name->prefix, chip_name->bus.nr, chip_name->addr, main_name);
++#endif
+ setName(uniqueSensorName.latin1());
+
+ #if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
diff --git a/redhat/extras/ksensors/ksensors_0.7.3-18.diff.gz b/redhat/extras/ksensors/ksensors_0.7.3-18.diff.gz
new file mode 100644
index 000000000..1ea0e2152
--- /dev/null
+++ b/redhat/extras/ksensors/ksensors_0.7.3-18.diff.gz
Binary files differ
diff --git a/redhat/extras/ksensors/ksensors_0.7.3_naming.diff b/redhat/extras/ksensors/ksensors_0.7.3_naming.diff
new file mode 100644
index 000000000..7e503d1b8
--- /dev/null
+++ b/redhat/extras/ksensors/ksensors_0.7.3_naming.diff
@@ -0,0 +1,61 @@
+--- ksensors-0.7.3.orig/src/lmsensor.cpp 2008-11-16 20:38:33.000000000 +0100
++++ ksensors-0.7.3/src/lmsensor.cpp 2008-11-16 20:27:16.000000000 +0100
+@@ -40,9 +40,12 @@ bool LMSensor::init(const sensors_featur
+ const sensors_chip_name *chip_name= getChipName();
+ const char* main_name = (*data)->name;
+ feature= (*data)->number;
+- char *label;
+- QString str;
++ char *label = NULL;
++ QString uniqueSensorName;
+
++ uniqueSensorName.sprintf("%s_%d_%d.%s", chip_name->prefix, chip_name->bus.nr, chip_name->addr, main_name);
++ setName(uniqueSensorName.latin1());
++
+ #if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
+ bool min_found=false;
+ bool max_found=false;
+@@ -98,12 +101,18 @@ bool LMSensor::init(const sensors_featur
+ min= -16;
+ }
+
+- str.sprintf("%s.%s", chip_name->prefix, main_name);
+- setName( str.latin1() );
+-
+ sensors_get_label(*chip_name,feature,&label);
+- setDescription(QString(label));
+-
++ if (label)
++ {
++ setDescription(QString(label));
++ delete label;
++ label = NULL;
++ }
++ else
++ {
++ setDescription(uniqueSensorName.latin1());
++ }
++
+ if(min_found)
+ min = valMin;
+
+@@ -189,14 +198,15 @@ bool LMSensor::init(const sensors_featur
+ return false;
+ }
+
+- str.sprintf("%s.%s", chip_name->prefix, main_name);
+- setName( str.latin1() );
+-
+ label = sensors_get_label(chip_name, feature_data);
+ if (label)
+- setDescription(QString(label));
++ {
++ setDescription(QString(label));
++ delete label;
++ label = NULL;
++ }
+ else
+- setDescription( str.latin1() );
++ setDescription( uniqueSensorName.latin1() );
+
+ #endif /* libsensors3 / libsensors4 code */
diff --git a/redhat/extras/ksensors/trinity-ksensors.spec b/redhat/extras/ksensors/trinity-ksensors.spec
index 7b0f5c20d..529d2623e 100644
--- a/redhat/extras/ksensors/trinity-ksensors.spec
+++ b/redhat/extras/ksensors/trinity-ksensors.spec
@@ -6,22 +6,29 @@
Name: trinity-ksensors
Version: 0.7.3
-Release: 19p1%{?dist}
+Release: 19p2%{?dist}
+
Summary: KDE frontend to lm_sensors
Group: Applications/System
License: GPLv2+
URL: http://ksensors.sourceforge.net/
+
Source0: http://downloads.sourceforge.net/ksensors/ksensors-%{version}.tar.gz
-Patch1: ksensors-desktop.patch
-Patch2: http://ftp.debian.org/debian/pool/main/k/ksensors/ksensors_0.7.3-15.diff.gz
-Patch3: ksensors-0.7.3-po.patch
-Patch4: ksensors-0.7.3-fix-min-max.patch
-Patch5: ksensors-0.7.3-lm_sensors-3.x.patch
+
+# Debian (upstream) patch
+Patch2: http://ftp.debian.org/debian/pool/main/k/ksensors/ksensors_0.7.3-18.diff.gz
+
+# Fix building on TDE
Patch6: ksensors-0.7.3-trinity.patch
+
+# Fix 'lmsensor.cpp' for older lm_sensors API (< 3.x)
+Patch7: ksensors-0.7.3-18-lmsensors_2x_fix.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: trinity-kdelibs-devel
BuildRequires: lm_sensors-devel gettext desktop-file-utils
Requires: hicolor-icon-theme
+
# Keep archs in sync with lm_sensors
ExcludeArch: s390 s390x
@@ -33,42 +40,39 @@ temperatures with KSensors.
%prep
%setup -q -n ksensors-%{version}
-%patch1 -p1 -z .desktop
%patch2 -p1
-%patch3 -p1 -z .po
-%patch4 -p1 -z .minmax
-%patch5 -p1 -z .lm_sensors3x
%patch6 -p1
-sed -i -e 's|$(kde_datadir)/sounds|$(kde_sounddir)|' src/sounds/Makefile.*
+%patch7 -p1
+%__sed -i -e 's|$(kde_datadir)/sounds|$(kde_sounddir)|' src/sounds/Makefile.*
for f in ChangeLog LIESMICH LISEZMOI ; do
iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
done
%build
-unset QTDIR ; . %{_sysconfdir}/profile.d/qt.sh
+unset QTDIR ; . /etc/profile.d/qt.sh
%configure \
--disable-dependency-tracking \
--disable-rpath \
--with-extra-includes=%{_includedir}/tqt
-make %{?_smp_mflags}
+%__make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+%__rm -rf $RPM_BUILD_ROOT
+%__make install DESTDIR=$RPM_BUILD_ROOT
desktop-file-install --vendor fedora --mode 644 --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applnk/Utilities/ksensors.desktop
-install -dm 755 $RPM_BUILD_ROOT%{_datadir}/autostart
-ln -s ../applications/fedora-ksensors.desktop \
+%__install -dm 755 $RPM_BUILD_ROOT%{_datadir}/autostart
+%__ln_s ../applications/fedora-ksensors.desktop \
$RPM_BUILD_ROOT%{_datadir}/autostart
-rm -rf $RPM_BUILD_ROOT%{_docdir}/HTML
+%__rm -rf $RPM_BUILD_ROOT%{_docdir}/HTML
%find_lang ksensors
%clean
-rm -rf $RPM_BUILD_ROOT
+%__rm -rf $RPM_BUILD_ROOT
%post
@@ -100,6 +104,9 @@ done
%changelog
+* Thu Dec 22 2011 Francois Andriot <francois.andriot@free.fr> - 0.7.3-19p2
+- Update Debian patch to -18 release
+
* Mon Nov 07 2011 Francois Andriot <francois.andriot@free.fr> - 0.7.3-19p1
- Rebuilt for RHEL 6, RHEL 5, Fedora 15 with TDE 3.5.13