[arch-commits] Commit in lm_sensors/trunk (4 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Fri Aug 15 11:02:36 EDT 2008


    Date: Friday, August 15, 2008 @ 11:02:36
  Author: andyrtr
Revision: 8685

upgpkg: lm_sensors 3.0.2-2
    fix #11055 and #9516, remove static lib

Added:
  lm_sensors/trunk/sensors-detect.patch
Modified:
  lm_sensors/trunk/PKGBUILD
  lm_sensors/trunk/sensors.install
  lm_sensors/trunk/sensors.rc

----------------------+
 PKGBUILD             |   30 +++++++++++++++---------
 sensors-detect.patch |   61 +++++++++++++++++++++++++++++++++++++++++++++++++
 sensors.install      |   12 ---------
 sensors.rc           |    2 -
 4 files changed, 81 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-08-15 13:48:19 UTC (rev 8684)
+++ PKGBUILD	2008-08-15 15:02:36 UTC (rev 8685)
@@ -3,31 +3,39 @@
 # Contributor: Aurelien Foret <orelien at chez.com>
 pkgname=lm_sensors
 pkgver=3.0.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring."
 arch=('i686' 'x86_64')
 license=('GPL')
 depends=('perl' 'sysfsutils')
-makedepends=('bison' 'flex')
+makedepends=('bison' 'flex' 'rrdtool')
+optdepends=('rrdtool:  for logging with sensord')
 backup=(etc/sensors3.conf)
 install=sensors.install
 source=(http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-$pkgver.tar.bz2
 	sensors.rc
-	fancontrol.rc)
+	fancontrol.rc
+	sensors-detect.patch)
 url="http://www.lm-sensors.org/"
 md5sums=('5b210ba9cc01f00161c438fd618484e5'
-         '1dec48b55f4ce3894f4c84bc9b4083e6'
-         'f14e335a8eea27388892c36af8099782')
+         'c9f7f38964963ae3ced4dff3f1f0b7b9'
+         'f14e335a8eea27388892c36af8099782'
+         '6fd30ed1e5ac739b8a27f3913ba706f4')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
+  cd ${srcdir}/$pkgname-$pkgver
+  patch -Np0 -i ${srcdir}/sensors-detect.patch || return 1
 
-  make PREFIX=/usr user || return 1
-  make user_install PREFIX=/usr DESTDIR=$startdir/pkg
+  make PREFIX=/usr PROG_EXTRA:=sensord user || return 1
+  make user_install PREFIX=/usr DESTDIR=${pkgdir}
+  install -DT -m755 ${srcdir}/$pkgname-$pkgver/prog/sensord/sensord ${pkgdir}/usr/sbin/sensord
 
-  install -DT -m755 ../sensors.rc $startdir/pkg/etc/rc.d/sensors
-  install -DT -m755 ../fancontrol.rc $startdir/pkg/etc/rc.d/fancontrol
+  install -DT -m755 ${srcdir}/sensors.rc ${pkgdir}/etc/rc.d/sensors
+  install -DT -m755 ${srcdir}/fancontrol.rc ${pkgdir}/etc/rc.d/fancontrol
 
+  # remove the static lib
+  rm -rf ${pkgdir}/usr/lib/libsensors.a
+
   # FIXME: avoid conflicts with glibc headers
-  rm -rf $startdir/pkg/usr/include/linux
+  rm -rf ${pkgdir}/usr/include/linux
 }

Added: sensors-detect.patch
===================================================================
--- sensors-detect.patch	                        (rev 0)
+++ sensors-detect.patch	2008-08-15 15:02:36 UTC (rev 8685)
@@ -0,0 +1,61 @@
+--- prog/detect/sensors-detect.orig	2008-02-07 20:59:25.125302226 +0100
++++ prog/detect/sensors-detect	2008-02-07 21:06:53.821929489 +0100
+@@ -5879,21 +5879,21 @@
+     }
+   }
+ 
+-  my $have_sysconfig = -d '/etc/sysconfig';
+-  printf "Do you want to \%s /etc/sysconfig/lm_sensors? (\%s): ",
+-         (-e '/etc/sysconfig/lm_sensors' ? 'overwrite' : 'generate'),
++  my $have_sysconfig = -d '/etc/conf.d';
++  printf "Do you want to \%s /etc/conf.d/lm_sensors? (\%s): ",
++         (-e '/etc/conf.d/lm_sensors' ? 'overwrite' : 'generate'),
+          ($have_sysconfig ? 'YES/no' : 'yes/NO');
+   $_ = <STDIN>;
+   if (($have_sysconfig and not m/^\s*n/i) or m/^\s*y/i) {
+     unless ($have_sysconfig) {
+-      mkdir '/etc/sysconfig', 0777
+-        or die "Sorry, can't create /etc/sysconfig ($!)";
++      mkdir '/etc/conf.d', 0777
++        or die "Sorry, can't create /etc/conf.d ($!)";
+     }
+-    open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
+-      or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
++    open(local *SYSCONFIG, ">/etc/conf.d/lm_sensors")
++      or die "Sorry, can't create /etc/conf.d/lm_sensors ($!)";
+     print SYSCONFIG <<'EOT';
+-#    /etc/sysconfig/lm_sensors - Defines modules loaded by
+-#                                /etc/init.d/lm_sensors
++#    /etc/conf.d/lm_sensors - Defines modules loaded by
++#                                /etc/rc.d/sensors
+ #    Copyright (c) 1998 - 2001  Frodo Looijaard <frodol at dds.nl>
+ #
+ #    This program is free software; you can redistribute it and/or modify
+@@ -5914,8 +5914,8 @@
+ # See also the lm_sensors homepage at:
+ #     http://www.lm-sensors.org/
+ #
+-# This file is used by /etc/init.d/lm_sensors and defines the modules to
+-# be loaded/unloaded. This file is sourced into /etc/init.d/lm_sensors.
++# This file is used by /etc/rc.d/sensors and defines the modules to
++# be loaded/unloaded. This file is sourced into /etc/rc.d/sensors.
+ #
+ # The format of this file is a shell script that simply defines the modules
+ # in order as normal variables with the special names:
+@@ -5952,12 +5952,12 @@
+     print SYSCONFIG $sysconfig;
+     close(SYSCONFIG);
+ 
+-    print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n".
++    print "Copy prog/init/lm_sensors.init to /etc/rc.d/sensors\n".
+           "for initialization at boot time.\n"
+-      unless -f "/etc/init.d/lm_sensors";
++      unless -f "/etc/rc.d/sensors";
+ 
+-    if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
+-      system("/sbin/insserv", "/etc/init.d/lm_sensors");
++    if (-x "/sbin/insserv" && -f "/etc/rc.d/sensors") {
++      system("/sbin/insserv", "/etc/rc.d/sensors");
+     } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") {
+       system("/sbin/chkconfig", "lm_sensors", "on");
+       if (-x "/sbin/service") {

Modified: sensors.install
===================================================================
--- sensors.install	2008-08-15 13:48:19 UTC (rev 8684)
+++ sensors.install	2008-08-15 15:02:36 UTC (rev 8685)
@@ -1,6 +1,3 @@
-# arg 1: the new package version
-# arg 2: the old package version
-
 post_install() {
 	echo ">>> to control the lm_sensors daemon type"
 	echo ">>> \"/etc/rc.d/sensors start|stop|restart\" "
@@ -13,12 +10,3 @@
 	echo ">>> and get this perl script from"
 	echo ">>> \"http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eeprom/decode-dimms.pl\""
 }
-
-post_upgrade() {
-  post_install
-}
-
-
-op=$1
-shift
-$op $*

Modified: sensors.rc
===================================================================
--- sensors.rc	2008-08-15 13:48:19 UTC (rev 8684)
+++ sensors.rc	2008-08-15 15:02:36 UTC (rev 8685)
@@ -37,7 +37,7 @@
   WITHSYS=0
 fi
 
-CONFIG=/etc/sysconfig/lm_sensors
+CONFIG=/etc/conf.d/lm_sensors
 PSENSORS=/usr/bin/sensors
 if [ ! -x $PSENSORS ]; then
   PSENSORS=/usr/bin/sensors




More information about the arch-commits mailing list