rpms/lcdproc/F-9 import.log, NONE, 1.1 lcdproc-0.5.2-imonlcd.patch, NONE, 1.1 lcdproc-0.5.2-initscripts.patch, NONE, 1.1 lcdproc-0.5.2-novalidate.patch, NONE, 1.1 lcdproc.spec, 1.5, 1.6 lcdproc-0.5.2-scripts.patch, 1.1, NONE

Nicolas Chauvet kwizart at fedoraproject.org
Sun Apr 26 09:12:18 UTC 2009


Author: kwizart

Update of /cvs/pkgs/rpms/lcdproc/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7476/F-9

Modified Files:
	lcdproc.spec 
Added Files:
	import.log lcdproc-0.5.2-imonlcd.patch 
	lcdproc-0.5.2-initscripts.patch lcdproc-0.5.2-novalidate.patch 
Removed Files:
	lcdproc-0.5.2-scripts.patch 
Log Message:
Backport some fixes



--- NEW FILE import.log ---
lcdproc-0_5_2-11_fc12:F-9:lcdproc-0.5.2-11.fc12.src.rpm:1240737065

lcdproc-0.5.2-imonlcd.patch:

--- NEW FILE lcdproc-0.5.2-imonlcd.patch ---
diff -Naurp lcdproc-0.5.2/acinclude.m4 lcdproc-0.5.2.imonlcd/acinclude.m4
--- lcdproc-0.5.2/acinclude.m4	2007-04-14 10:39:28.000000000 -0400
+++ lcdproc-0.5.2.imonlcd/acinclude.m4	2008-11-07 10:31:38.374066457 -0500
@@ -6,7 +6,7 @@ AC_ARG_ENABLE(drivers,
 	[                  which is a comma-separated list of drivers.]
 	[                  Possible drivers are:]
 	[                    bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,ea65,]
-	[                    EyeboxOne,g15,glcdlib,glk,hd44780,icp_a106,imon,IOWarrior,]
+	[                    EyeboxOne,g15,glcdlib,glk,hd44780,icp_a106,imon,imonlcd,imonlcd2,IOWarrior,]
 	[                    irman,joy,lb216,lcdm001,lcterm,lirc,MD8800,ms6931,]
 	[                    mtc_s16209x,MtxOrb,NoritakeVFD,picolcd,pyramid,sed1330]
 	[                    sed1520,serialPOS,serialVFD,sli,stv5730,svga,t6963,text,]
@@ -16,7 +16,7 @@ AC_ARG_ENABLE(drivers,
 	drivers="$enableval",
 	drivers=[bayrad,CFontz,CFontz633,curses,CwLnx,glk,lb216,lcdm001,MtxOrb,pyramid,text])
 
-allDrivers=[bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,ea65,EyeboxOne,g15,glcdlib,glk,hd44780,icp_a106,imon,IOWarrior,irman,joy,lb216,lcdm001,lcterm,lirc,MD8800,ms6931,mtc_s16209x,MtxOrb,NoritakeVFD,picolcd,pyramid,sed1330,sed1520,serialPOS,serialVFD,sli,stv5730,svga,t6963,text,tyan,ula200,xosd]
+allDrivers=[bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,ea65,EyeboxOne,g15,glcdlib,glk,hd44780,icp_a106,imon,imonlcd,imonlcd2,IOWarrior,irman,joy,lb216,lcdm001,lcterm,lirc,MD8800,ms6931,mtc_s16209x,MtxOrb,NoritakeVFD,picolcd,pyramid,sed1330,sed1520,serialPOS,serialVFD,sli,stv5730,svga,t6963,text,tyan,ula200,xosd]
 
 drivers=`echo $drivers | sed -e 's/,/ /g'`
 
@@ -207,6 +207,14 @@ dnl			else
 			DRIVERS="$DRIVERS imon${SO}"
 			actdrivers=["$actdrivers imon"]
 			;;
+		imonlcd)
+			DRIVERS="$DRIVERS imonlcd${SO}"
+			actdrivers=["$actdrivers imonlcd"]
+			;;
+		imonlcd2)
+			DRIVERS="$DRIVERS imonlcd2${SO}"
+			actdrivers=["$actdrivers imonlcd2"]
+			;;
 		IOWarrior)
 			if test "$enable_libusb" = yes ; then
 				DRIVERS="$DRIVERS IOWarrior${SO}"
diff -Naurp lcdproc-0.5.2/server/drivers/imonlcd2.c lcdproc-0.5.2.imonlcd/server/drivers/imonlcd2.c
--- lcdproc-0.5.2/server/drivers/imonlcd2.c	1969-12-31 19:00:00.000000000 -0500
+++ lcdproc-0.5.2.imonlcd/server/drivers/imonlcd2.c	2008-11-07 10:39:57.741816312 -0500
@@ -0,0 +1,1347 @@
+/**
+ * Driver for SoundGraph iMON OEM (and others) LCD Module, newer version
+ *
+ * In order to be able to use it, you have to install the lirc_imon
+ * kernel module for LIRC (http://www.lirc.org)
+ *
+ * Copyright (c) 2007, Dean Harding <dean at codeka.com>, but (heavily :p)
+ * on the work of Venky Raju.
+ * Vastly (hopefully) improved by Christian Leuschen <christian.leuschenATgmx.de>.
+ *
+ * This source code is being released under the GPL.
+ * Please see the file COPYING in this package for details.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <termios.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "lcd.h"
+#include "lcd_lib.h"
+#include "shared/debug.h"
+//#define DEBUG
+#include "report.h"
+
+
+#include "imonlcd.h"
+
+#define DEFAULT_DEVICE    "/dev/lcd0"
+#define DEFAULT_SIZE      "96x16"        // This is the size in "pixels"...
+#define DEFAULT_CONTRAST  "625"
+#define DEFAULT_BACKLIGHT "1"            // default: turn backlight on
+#define DEFAULT_DISCMODE  "0"            // default: spin the "slim" disc
+
+#define LCD_DEFAULT_CELL_WIDTH    6
+#define LCD_DEFAULT_CELL_HEIGHT   8
+
+#define ON_EXIT_SHOWMSG      0    // Do nothing -- just leave the "shutdown" message there
+#define ON_EXIT_SHOWCLOCK    1    // Show the big clock
+#define ON_EXIT_BLANKSCREEN  2    // Blank the device completely
+
+#define DEFAULT_ON_EXIT        "1"
+
+// Vars for the server core
+MODULE_EXPORT char *api_version = API_VERSION;
+MODULE_EXPORT int stay_in_foreground = 0;
+MODULE_EXPORT int supports_multiple = 0;
+MODULE_EXPORT char *symbol_prefix = "imonlcd_";
+
+// Our private data
+typedef struct {
+    char info[255];
+    int imon_fd;
+    unsigned char *framebuf;
+    int height;
+    int width;
+    int cellwidth;
+    int cellheight;
+    int on_exit;
+    int contrast;      // 0 = lowest contrast, 1000 = highest
+    int backlightOn;   // stores the backlight state
+    int discMode;      // 0 = two disc-segments spinning as default,
+                       // 1 = their complement spinning
+
+    /*
+     * Here we record the last "state" of the CD icon so that we can "animate" it.
+     */
+    int last_cd_state;
+    time_t last_cd_state_change;
+    uint64_t last_icon_state;
+    int lastPrivateIconState; // remind the last state for setting the icons
+} PrivateData;
+
+/**
+ * Just for convenience and to have the commands at one place.
+ */
+#define COMMANDS_SET_ICONS      (uint64_t) 0x0100000000000000
+#define COMMANDS_SET_CONTRAST   (uint64_t) 0x0300000000000000
+#define COMMANDS_DISPLAY        (uint64_t) 0x8800000000000000
+#define COMMANDS_SHUTDOWN       (uint64_t) 0x8800000000000008
+#define COMMANDS_DISPLAY_ON     (uint64_t) 0x8800000000000040
+#define COMMANDS_CLEAR_ALARM    (uint64_t) 0x8a00000000000000
+#define COMMANDS_SET_LINES0     (uint64_t) 0x1000000000000000
+#define COMMANDS_SET_LINES1     (uint64_t) 0x1100000000000000
+#define COMMANDS_SET_LINES2     (uint64_t) 0x1200000000000000
+
+/*
+ * These are used with the imon_output function to determine which icons to turn on/off. Because we
+ * only get a 32-bit integer to play, some of the icons are grouped into "sets" from which you can
+ * only select to turn one on at a time.
+ */
+#define IMON_OUTPUT_CD_MASK         0x00000001
+#define IMON_OUTPUT_TOPROW_MASK     0x0000000E
+#define IMON_OUTPUT_SPEAKER_MASK    0x00000030
+#define IMON_OUTPUT_SPDIF_MASK      0x00000040
+#define IMON_OUTPUT_SRC_MASK        0x00000080
+#define IMON_OUTPUT_FIT_MASK        0x00000100
+#define IMON_OUTPUT_TV_MASK         0x00000200
+#define IMON_OUTPUT_HDTV_MASK       0x00000400
+#define IMON_OUTPUT_SCR1_MASK       0x00000800
+#define IMON_OUTPUT_SCR2_MASK       0x00001000
+#define IMON_OUTPUT_BRICONS_MASK    0x0000E000
+#define IMON_OUTPUT_BMICONS_MASK    0x00070000
+#define IMON_OUTPUT_BLICONS_MASK    0x00380000
+#define IMON_OUTPUT_VOL_MASK        0x00400000
+#define IMON_OUTPUT_TIME_MASK       0x00800000
+#define IMON_OUTPUT_ALARM_MASK      0x01000000
+#define IMON_OUTPUT_REC_MASK        0x02000000
+#define IMON_OUTPUT_REP_MASK        0x04000000
+#define IMON_OUTPUT_SFL_MASK        0x08000000
+
+#define IMON_OUTPUT_PBARS_MASK      0x10000000
+#define IMON_OUTPUT_DISK_IN_MASK    0x20000000
+
+
+#define IMON_ICON_ALL      (uint64_t) 0x00FFFFFFFFFFFFFF
+//Byte 6
+#define IMON_ICON_DISK_OFF (uint64_t) 0x7F7000FFFFFFFFFF
+#define IMON_ICON_DISK_ON  (uint64_t) 0x0080FF0000000000
+
+#define IMON_ICON_DISK_IN  (uint64_t) 0x0080000000000000
+#define IMON_ICON_CD_IN    (uint64_t) 0x00806B0000000000
+#define IMON_ICON_DVD_IN   (uint64_t) 0x0080550000000000
+
+// Byte 5
+#define IMON_ICON_WMA2    ((uint64_t) 0x1 << 39)
+#define IMON_ICON_WAV     ((uint64_t) 0x1 << 38)
+#define IMON_ICON_REP     ((uint64_t) 0x1 << 37)
+#define IMON_ICON_SFL     ((uint64_t) 0x1 << 36)
+#define IMON_ICON_ALARM   ((uint64_t) 0x1 << 35)
+#define IMON_ICON_REC     ((uint64_t) 0x1 << 34)
+#define IMON_ICON_VOL     ((uint64_t) 0x1 << 33)
+#define IMON_ICON_TIME    ((uint64_t) 0x1 << 32)
+// Byte 4
+#define IMON_ICON_XVID    ((uint64_t) 0x1 << 31)
+#define IMON_ICON_WMV     ((uint64_t) 0x1 << 30)
+#define IMON_ICON_MPG2    ((uint64_t) 0x1 << 29)
+#define IMON_ICON_AC3     ((uint64_t) 0x1 << 28)
+#define IMON_ICON_DTS     ((uint64_t) 0x1 << 27)
+#define IMON_ICON_WMA     ((uint64_t) 0x1 << 26)
+#define IMON_ICON_MP3     ((uint64_t) 0x1 << 25)
+#define IMON_ICON_OGG     ((uint64_t) 0x1 << 24)
+
+//Byte 3
+#define IMON_ICON_SRC     ((uint64_t) 0x1 << 23)
+#define IMON_ICON_FIT     ((uint64_t) 0x1 << 22)
+#define IMON_ICON_TV_2    ((uint64_t) 0x1 << 21)
+#define IMON_ICON_HDTV    ((uint64_t) 0x1 << 20)
[...2460 lines suppressed...]
+ */
+static void setLineLength( int topLine, int botLine, int topProgress, int botProgress, int fd )
+{
+    setBuiltinProgressBars( lengthToPixels( topLine ),
+            lengthToPixels( botLine ),
+            lengthToPixels( topProgress ),
+            lengthToPixels( botProgress ),
+            fd
+    );
+}
+
+/**
+ * Sets the length of the built-in progress-bars and lines.
+ * Values from -32 to 32 are allowed. Positive values indicate that bars extend
+ * from left to right, negative values indicate that the run from right to left.
+ *   
+ * \param topLine
+ * \param botLine
+ * \param topProgress
+ * \param botProgress
+ * \param fd A file descriptor pointing to the /dev/lcd* file that we write to.
+ */
+static void setBuiltinProgressBars( int topLine, int botLine,
+        int topProgress, int botProgress, int fd )
+{
+    // Least sig. bit is on the right
+    uint64_t data;
+
+    data = ( (uint64_t) topProgress ) << 8 * 4;
+    data |= (uint64_t) topLine & 0x00000000FFFFFFFF;
+    data &= 0x00FFFFFFFFFFFFFF;
+    send_command_data( COMMANDS_SET_LINES0 | data, fd );
+
+    data = ( ( (uint64_t) topProgress ) >> 8 * 3 ) & 0x00000000000000FF;
+    data |= ( ( (uint64_t) botProgress ) << 8 )    & 0x000000FFFFFFFF00;
+    data |= ( ( (uint64_t) botLine ) << 8 * 5 )    & 0x00FFFF0000000000;
+    send_command_data( COMMANDS_SET_LINES1 | data, fd );
+
+    data = ( (uint64_t) botLine ) >> 8 * 2;
+    send_command_data( COMMANDS_SET_LINES2 | data, fd );
+}
+
+/**
+ * Maps values to corresponding pixmaps for the built-in progress bars.
+ * Values from -32 to 32 are allowed. Positive values indicate that bars extend
+ * from left to right, negative values indicate that they run from right to left.
+ * 
+ * \param length The length of the bar.
+ * \return The pixmap that represents the given length. 
+ * 
+ */ 
+static int lengthToPixels( int length )
+{           
+    int pixLen[] =
+    {           
+            0x00, 0x00000080, 0x000000c0, 0x000000e0, 0x000000f0,
+            0x000000f8, 0x000000fc, 0x000000fe, 0x000000ff,
+            0x000080ff, 0x0000c0ff, 0x0000e0ff, 0x0000f0ff,
+            0x0000f8ff, 0x0000fcff, 0x0000feff, 0x0000ffff,
+            0x0080ffff, 0x00c0ffff, 0x00e0ffff, 0x00f0ffff,
+            0x00f8ffff, 0x00fcffff, 0x00feffff, 0x00ffffff,
+            0x80ffffff, 0xc0ffffff, 0xe0ffffff, 0xf0ffffff,
+            0xf8ffffff, 0xfcffffff, 0xfeffffff, 0xffffffff
+    };
+
+    if ( abs( length ) > 32 )
+    {
+        return (0);
+    }
+    if ( length >= 0 )
+    {
+        return pixLen[ length ];
+    }
+    else
+    {
+        return ( pixLen[ 32 + length ] ^ 0xffffffff );
+    }
+}
+
+// EOF
+
diff -Naurp lcdproc-0.5.2/server/drivers/imonlcd.h lcdproc-0.5.2.imonlcd/server/drivers/imonlcd.h
--- lcdproc-0.5.2/server/drivers/imonlcd.h	1969-12-31 19:00:00.000000000 -0500
+++ lcdproc-0.5.2.imonlcd/server/drivers/imonlcd.h	2008-11-07 10:30:16.286851426 -0500
@@ -0,0 +1,49 @@
+/**
+ * Driver for SoundGraph iMON OEM (and others) LCD Module
+ *
+ * In order to be able to use it, you have to install the lirc_imonlcd
+ * kernel module for LIRC (http://www.lirc.org) -- until that module is
+ * available in the main LIRC branch, you can get a patch for it from
+ * the same place you got this patch.
+ *
+ * Copyright (c) 2007, Dean Harding <dean at codeka.com>, but (heavily :p)
+ * on the work of Venky Raju.
+ *
+ * This source code is being released under the GPL.
+ * Please see the file COPYING in this package for details.
+ *
+ */
+
+#ifndef IMONLCD_H
+#define IMONLCD_H
+
+#include "lcd.h"
+
+MODULE_EXPORT int  imonlcd_init (Driver *drvthis);
+MODULE_EXPORT void imonlcd_close (Driver *drvthis);
+MODULE_EXPORT int  imonlcd_width (Driver *drvthis);
+MODULE_EXPORT int  imonlcd_height (Driver *drvthis);
+MODULE_EXPORT int  imonlcd_cellwidth (Driver *drvthis);
+MODULE_EXPORT int  imonlcd_cellheight (Driver *drvthis);
+MODULE_EXPORT void imonlcd_clear (Driver *drvthis);
+MODULE_EXPORT void imonlcd_flush (Driver *drvthis);
+MODULE_EXPORT void imonlcd_string (Driver *drvthis, int x, int y, const char string[]);
+MODULE_EXPORT void imonlcd_chr (Driver *drvthis, int x, int y, char c);
+MODULE_EXPORT const char *imonlcd_get_info (Driver *drvthis);
+MODULE_EXPORT void imonlcd_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+MODULE_EXPORT void imonlcd_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+MODULE_EXPORT void imonlcd_num (Driver *drvthis, int x, int num);
+MODULE_EXPORT void imonlcd_output (Driver *drvthis, int state);
+MODULE_EXPORT int  imonlcd_set_contrast (Driver *drvthis, int promille);
+MODULE_EXPORT int  imonlcd_get_contrast (Driver *drvthis);
+MODULE_EXPORT void imonlcd_backlight(Driver *drvthis, int on);
+
+/**
+ * These are not supported by the iMON LCD module
+ */
+//MODULE_EXPORT int  imonlcd_get_free_chars (Driver *drvthis);
+//MODULE_EXPORT void imonlcd_set_char (Driver *drvthis, int n, char *dat);
+//MODULE_EXPORT int  imonlcd_icon (Driver *drvthis, int x, int y, int icon);
+
+#endif
+
diff -Naurp lcdproc-0.5.2/server/drivers/Makefile.am lcdproc-0.5.2.imonlcd/server/drivers/Makefile.am
--- lcdproc-0.5.2/server/drivers/Makefile.am	2007-04-14 10:39:53.000000000 -0400
+++ lcdproc-0.5.2.imonlcd/server/drivers/Makefile.am	2008-11-07 10:32:58.927066724 -0500
@@ -19,7 +19,7 @@ AM_LDFLAGS = @LDSHARED@
 #LIBS =
 
 pkglib_PROGRAMS = @DRIVERS@
-EXTRA_PROGRAMS = bayrad CFontz CFontz633 CFontzPacket curses CwLnx ea65 EyeboxOne g15 glcdlib glk hd44780 icp_a106 imon IOWarrior irman joy lb216 lcdm001 lcterm lirc MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD picolcd pyramid sed1330 sed1520 serialPOS serialVFD stv5730 svga t6963 text tyan sli ula200 xosd
+EXTRA_PROGRAMS = bayrad CFontz CFontz633 CFontzPacket curses CwLnx ea65 EyeboxOne g15 glcdlib glk hd44780 icp_a106 imon imonlcd imonlcd2 IOWarrior irman joy lb216 lcdm001 lcterm lirc MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD picolcd pyramid sed1330 sed1520 serialPOS serialVFD stv5730 svga t6963 text tyan sli ula200 xosd
 noinst_LIBRARIES = libLCD.a libbignum.a
 
 IOWarrior_CFLAGS =   @libusb_cflags@ $(AM_CFLAGS)
@@ -37,6 +37,8 @@ hd44780_LDADD =      libLCD.a @HD44780_D
 hd44780_DEPENDENCIES = @HD44780_DRIVERS@
 icp_a106_LDADD =     libLCD.a
 imon_LDADD =         libLCD.a
+imonlcd_LDADD =      libLCD.a
+imonlcd2_LDADD =      libLCD.a
 IOWarrior_LDADD =    @libusb_libs@ libLCD.a libbignum.a
 irman_LDADD =        @LIBIRMAN@
 lcterm_LDADD =       libLCD.a
@@ -75,6 +77,8 @@ EXTRA_hd44780_SOURCES = hd44780-4bit.c h
 
 icp_a106_SOURCES =   lcd.h lcd_lib.h icp_a106.c icp_a106.h report.h
 imon_SOURCES =       lcd.h lcd_lib.h imon.h imon.c report.h
+imonlcd_SOURCES =    lcd.h lcd_lib.h imonlcd.h imonlcd.c report.h
+imonlcd2_SOURCES =    lcd.h lcd_lib.h imonlcd.h imonlcd2.c report.h
 IOWarrior_SOURCES =  lcd.h lcd_lib.h hd44780-charmap.h IOWarrior.c IOWarrior.h report.h adv_bignum.h
 irman_SOURCES =      lcd.h irmanin.c irmanin.h report.h
 joy_SOURCES =        lcd.h joy.c joy.h port.h report.h
--- lcdproc-0.5.2/LCDd.conf	2007-04-14 10:41:51.000000000 -0400
+++ lcdproc-0.5.2.imonlcd/LCDd.conf	2008-11-07 12:01:18.193816869 -0500
@@ -37,7 +37,7 @@
 #
 # The following drivers are supported:
 #   bayrad, CFontz, CFontz633, CFontzPacket, curses, CwLnx, ea65, 
-#   EyeboxOne, g15, glcdlib, glk, hd44780, icp_a106, imon, IOWarrior,
+#   EyeboxOne, g15, glcdlib, glk, hd44780, icp_a106, imon, imonlcd, imonlcd2, IOWarrior,
 #   irman, joy, lb216, lcdm001, lcterm, lirc, MD8800, ms6931, mtc_s16209x,
 #   MtxOrb, NoritakeVFD, picolcd, pyramid, sed1330, sed1520, serialPOS,
 #   serialVFD, sli, stv5730, svga, t6963, text, tyan, ula200, xosd
@@ -508,7 +508,7 @@ Size=20x4
 
 
 
-## Soundgraph/Ahanix/Silverstone/Uneed/Accent iMON driver ##
+## Soundgraph/Ahanix/Silverstone/Uneed/Accent iMON VFD driver ##
 [imon]
 
 # select the device to use
@@ -517,6 +517,15 @@ Device=/dev/lcd0
 # display dimensions
 Size=16x2
 
+## Soundgraph first-gen lcd device ##
+[imonlcd]
+Device=/dev/lcd0
+Contrast=200
+
+## Soundgraph second-gen lcd device ##
+[imonlcd2]
+Device=/dev/lcd0
+Contrast=200
 
 
 ## IrMan driver ##

lcdproc-0.5.2-initscripts.patch:

--- NEW FILE lcdproc-0.5.2-initscripts.patch ---
diff -up lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts lcdproc-0.5.2/scripts/init-LCDd.LSB.in
--- lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts	2007-04-14 16:41:20.000000000 +0200
+++ lcdproc-0.5.2/scripts/init-LCDd.LSB.in	2009-04-14 16:15:46.000000000 +0200
@@ -1,10 +1,18 @@
 #! /bin/sh
+#
+# chkconfig: - 70 21
+# description: LCDd(8) is the LCDproc server used for displaying text and other data to LCDs. \
+#	Apart from the main client lcdproc(1) there are various clients. \
+#	See http://lcdproc.omnipotent.net for details.
+# processname: LCDd
+#
+# config: /etc/sysconfig/lcdproc/LCDd.conf
 
-#### BEGIN INIT INFO
+### BEGIN INIT INFO
 # Provides:          LCDd
 # Required-Start:    $syslog $local_fs $network $remote_fs
 # Required-Stop:     $syslog $local_fs $network $remote_fs
-# Default-Start:     2 3 4 5
+# Default-Start:     
 # Default-Stop:      S 0 1 6
 # Short-Description: LCDproc Server Daemon
 # Description:       LSB init script for LCDd, the display
@@ -12,57 +20,62 @@
 ### END INIT INFO
 
 
-# local variables
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-sbindir=@sbindir@
-etc=@sysconfdir@
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-NAME=LCDd
-DAEMON=${sbindir}/$NAME
-DESC="LCDproc display server daemon"
-DEFAULTS=/etc/default/$NAME
-START=yes
-
-# Source defaults file; edit that file to configure this script.
-if [ -e "${DEFAULTS}" ]; then
-  . "${DEFAULTS}"
-fi
+prog=LCDd
+lockfile=/var/lock/subsys/$prog
+configfile=@sysconfdir@/$prog.conf
+RETVAL=0
+
 
-# If we're not to start the daemon, simply exit
-if [ "${START}" != "yes" ]; then
-    exit 0
+# load LSB 3.x init functions
+if [ -e /lib/lsb/init-functions ]; then
+  . /lib/lsb/init-functions
 fi
 
-# installation check
-test -x $DAEMON || exit 5
+# Source function library.
+if [ -e /etc/rc.d/init.d/functions ]; then
+  . /etc/rc.d/init.d/functions
+fi
 
-# load LSB 3.x init functions
-. /lib/lsb/init-functions
+# check that non-default config file exists.
+ [ -f $configfile ] || exit 6
 
 
 case "$1" in
   start)
-	log_daemon_msg "Starting $DESC" "$NAME"
-	start_daemon $DAEMON $OPTIONS
-	log_end_msg $?
+	echo -n $"Starting $prog: "
+	daemon $prog -c $configfile
+	RETVAL=$?
+        echo
+	[ $RETVAL -eq 0 ] && touch $lockfile
+	return $RETVAL
 	;;
   stop)
-	log_daemon_msg "Stopping $DESC" "$NAME"
-	killproc $DAEMON
-	log_end_msg $?
-	;;
-  restart|reload|force-reload)
-	$0 stop
-	sleep 1
-	$0 start
+	echo -n $"Shutting down $prog: "
+	killproc $prog
+	RETVAL=$?
+        echo
+	[ $RETVAL -eq 0 ] && rm -f $lockfile
+	return $RETVAL
+	;;
+  status)
+	status $prog
+	;;
+  restart|force-reload)
+	stop
+	start
+	;;
+  try-restart|condrestart)
+	if [ -f $lockfile ]; then
+	    stop
+	    start
+	fi
+	;;
+  reload)
+	exit 3
 	;;
   *)
-	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
 	exit 2
-	;;
 esac
 
-exit 0
+exit $RETVAL
diff -up lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts lcdproc-0.5.2/scripts/init-lcdproc.LSB.in
--- lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts	2007-04-14 16:41:20.000000000 +0200
+++ lcdproc-0.5.2/scripts/init-lcdproc.LSB.in	2009-04-14 16:16:19.000000000 +0200
@@ -1,10 +1,19 @@
 #! /bin/sh
+#
+# chkconfig: - 71 20
+# description: LCDd(8) is the LCDproc server used for displaying text and other data to LCDs. \
+#	Apart from the main client lcdproc(1) there are various clients. \
+#	See http://lcdproc.omnipotent.net for details.
+# processname: lcdproc
+#
+# config: /etc/sysconfig/lcdproc/lcdproc.conf
 
-#### BEGIN INIT INFO
+### BEGIN INIT INFO
 # Provides:          lcdproc
 # Required-Start:    $syslog $local_fs $network $remote_fs
 # Required-Stop:     $syslog $local_fs $network $remote_fs
-# Default-Start:     2 3 4 5
+# Should-Start:      LCDd
+# Default-Start:     
 # Default-Stop:      S 0 1 6
 # Short-Description: LCDproc system status information viewer
 # Description:       LSB init script for lcdproc, the system
@@ -12,57 +21,60 @@
 ### END INIT INFO
 
 
-# local variables
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-sbindir=@sbindir@
-etc=@sysconfdir@
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-NAME=lcdproc
-DAEMON=${bindir}/$NAME
-DESC="LCDproc system status monitor"
-DEFAULTS=/etc/default/$NAME
-START=yes
-
-# Source defaults file; edit that file to configure this script.
-if [ -e "${DEFAULTS}" ]; then
-  . "${DEFAULTS}"
-fi
+prog=lcdproc
+lockfile=/var/lock/subsys/$prog
+configfile=@sysconfdir@/$prog.conf
+RETVAL=0
 
-# If we're not to start the daemon, simply exit
-if [ "${START}" != "yes" ]; then
-    exit 0
+# load LSB 3.x init functions
+if [ -e /lib/lsb/init-functions ]; then
+  . /lib/lsb/init-functions
 fi
 
-# installation check
-test -x $DAEMON || exit 5
-
-# load LSB 3.x init functions
-. /lib/lsb/init-functions
+# Source function library.
+if [ -e /etc/rc.d/init.d/functions ]; then
+  . /etc/rc.d/init.d/functions
+fi
 
+# check that non-default config file exists.
+ [ -f $configfile ] || exit 6
 
 case "$1" in
   start)
-	log_daemon_msg "Starting $DESC" "$NAME"
-	start_daemon $DAEMON $OPTIONS
-	log_end_msg $?
+	echo -n $"Starting $prog: "
+	daemon $prog -c $configfile
+	RETVAL=$?
+        echo
+	[ $RETVAL -eq 0 ] && touch $lockfile
+	return $RETVAL
 	;;
   stop)
-	log_daemon_msg "Stopping $DESC" "$NAME"
-	killproc $DAEMON
-	log_end_msg $?
-	;;
-  restart|reload|force-reload)
-	$0 stop
-	sleep 1
-	$0 start
+	echo -n $"Shutting down $prog: "
+	killproc $prog
+	RETVAL=$?
+        echo
+	[ $RETVAL -eq 0 ] && rm -f $lockfile
+	return $RETVAL
+	;;
+  status)
+	status $prog
+	;;
+  restart|force-reload)
+	stop
+	start
+	;;
+  try-restart|condrestart)
+	if [ -f $lockfile ]; then
+	    stop
+	    start
+	fi
+	;;
+  reload)
+	exit 3
 	;;
   *)
-	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
 	exit 2
-	;;
 esac
 
-exit 0
+exit $RETVAL

lcdproc-0.5.2-novalidate.patch:

--- NEW FILE lcdproc-0.5.2-novalidate.patch ---
diff -up lcdproc-0.5.2/docs/lcdproc-dev/Makefile.am.novalidate lcdproc-0.5.2/docs/lcdproc-dev/Makefile.am
--- lcdproc-0.5.2/docs/lcdproc-dev/Makefile.am.novalidate	2007-04-14 16:39:53.000000000 +0200
+++ lcdproc-0.5.2/docs/lcdproc-dev/Makefile.am	2009-04-14 15:28:01.000000000 +0200
@@ -18,6 +18,6 @@ developerguidedir = $(DESTDIR)$(htmldir)
 
 install-html-developerguide: $(xmlto) lcdproc-dev.docbook
 	$(mkinstalldirs) $(developerguidedir)
-	$(xmlto) html -o $(developerguidedir) lcdproc-dev.docbook
+	$(xmlto) html -o $(developerguidedir) --skip-validation lcdproc-dev.docbook
 
 ## EOF
diff -up lcdproc-0.5.2/docs/lcdproc-user/Makefile.am.novalidate lcdproc-0.5.2/docs/lcdproc-user/Makefile.am
--- lcdproc-0.5.2/docs/lcdproc-user/Makefile.am.novalidate	2009-04-14 15:32:24.000000000 +0200
+++ lcdproc-0.5.2/docs/lcdproc-user/Makefile.am	2009-04-14 15:32:44.000000000 +0200
@@ -21,6 +21,6 @@ userguidedir = $(DESTDIR)$(htmldir)/user
 
 install-html-userguide: $(xmlto) lcdproc-user.docbook
 	$(mkinstalldirs) $(userguidedir)
-	$(xmlto) html -o $(userguidedir) lcdproc-user.docbook
+	$(xmlto) html -o $(userguidedir) --skip-validation lcdproc-user.docbook
 
 ## EOF


Index: lcdproc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lcdproc/F-9/lcdproc.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- lcdproc.spec	9 Feb 2008 15:24:00 -0000	1.5
+++ lcdproc.spec	26 Apr 2009 09:11:48 -0000	1.6
@@ -1,19 +1,23 @@
 Summary:        LCDproc displays real-time system information on a 20x4 backlit LCD
-Name:           lcdproc	
+Name:           lcdproc
 Version:        0.5.2
-Release:        4%{?dist}
+Release:        11%{?dist}
 License:        GPLv2
 URL:            http://lcdproc.omnipotent.net
-Group:          System Environment/Libraries	
+Group:          System Environment/Libraries
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-Patch0:         lcdproc-0.5.2-scripts.patch
+Patch0:         lcdproc-0.5.2-initscripts.patch
 Patch1:         lcdproc-0.5.2-memset_swp.patch
+Patch2:         lcdproc-0.5.2-imonlcd.patch
+Patch3:         lcdproc-0.5.2-novalidate.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  doxygen
 BuildRequires:  graphviz
 
-BuildRequires:  glibc-headers
+# necessary for imonlcd patch
+BuildRequires:  libtool
+
 BuildRequires:  libusb-devel
 BuildRequires:  lirc-devel
 BuildRequires:  ncurses-devel
@@ -21,6 +25,9 @@
 BuildRequires:  openldap-devel
 BuildRequires:  pth-devel
 BuildRequires:  xmlto
+%if 0%{?fedora} > 9
+BuildRequires:  docbook-dtds
+%endif
 BuildRequires:  xosd-devel
 BuildRequires:  libX11-devel
 BuildRequires:  libXext-devel
@@ -37,22 +44,30 @@
 %description
 LCDproc is a client/server suite inclduding drivers for all
 kinds of nifty LCD displays. The server supports several
-serial devices: Matrix Orbital, Crystal Fontz, Bayrad, LB216, 
-LCDM001 (kernelconcepts.de), Wirz-SLI and PIC-an-LCD; and some 
-devices connected to the LPT port: HD44780, STV5730, T6963, 
-SED1520 and SED1330. Various clients are available that display 
-things like CPU load, system load, memory usage, uptime, and a lot more. 
-See also http://lcdproc.omnipotent.net. 
+serial devices: Matrix Orbital, Crystal Fontz, Bayrad, LB216,
+LCDM001 (kernelconcepts.de), Wirz-SLI and PIC-an-LCD; and some
+devices connected to the LPT port: HD44780, STV5730, T6963,
+SED1520 and SED1330. Various clients are available that display
+things like CPU load, system load, memory usage, uptime, and a lot more.
+See also http://lcdproc.omnipotent.net.
 
 
 %prep
 %setup -q
 %patch0 -p1 -b .initscripts
 %patch1 -p1 -b .memset_swp
+%patch2 -p1 -b .imonlcd
+%patch3 -p1 -b .novalidate
 chmod 644 server/drivers/timing.h
 
+sed -i -e 's|server/drivers|%{_libdir}/lcdproc|' LCDd.conf
+touch -r TODO LCDd.conf
 
 %build
+# run autoreconf to pick up the imon lcd additions
+# liboolize to refresh libtool
+autoreconf -f -i
+libtoolize --force
 %configure \
   --sysconfdir=%{_sysconfdir}/sysconfig/%{name} \
   --enable-libusb \
@@ -64,34 +79,41 @@
   --enable-stat-smbfs \
   --with-lcdport=13666
 
-sed -i -e 's|-L/usr/lib|-L%{_libdir}|g' Makefile
-  
-make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
+make %{?_smp_mflags}
 
 
 %install
 rm -rf $RPM_BUILD_ROOT __doc
-make install DESTDIR=$RPM_BUILD_ROOT
-make install-html-guides DESTDIR=$RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
+make install-html-guides DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 
 # Fix docs
 mkdir -p __doc/developer-guide
 mkdir -p __doc/user-guide
-install -m 0644 $RPM_BUILD_ROOT%{_datadir}/doc/lcdproc/user-guide/*  __doc/user-guide
-install -m 0644 $RPM_BUILD_ROOT%{_datadir}/doc/lcdproc/developer-guide/*  __doc/developer-guide
+install -pm 0644 $RPM_BUILD_ROOT%{_datadir}/doc/lcdproc/user-guide/*  __doc/user-guide
+install -pm 0644 $RPM_BUILD_ROOT%{_datadir}/doc/lcdproc/developer-guide/*  __doc/developer-guide
 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
 
 # init
 install -d $RPM_BUILD_ROOT%{_initrddir}
-install -pm 0755 scripts/init-LCDd.rpm  $RPM_BUILD_ROOT%{_initrddir}/LCDd
-install -pm 0755 scripts/init-lcdproc.rpm  $RPM_BUILD_ROOT%{_initrddir}/lcdproc
+install -pm 0755 scripts/init-LCDd.LSB  $RPM_BUILD_ROOT%{_initrddir}/LCDd
+install -pm 0755 scripts/init-lcdproc.LSB  $RPM_BUILD_ROOT%{_initrddir}/lcdproc
+
+#Disable default configuration
+#Thoses are only provided as an example since ncurses isn't a suitable default configuration.
+for f in LCDd.conf lcdproc.conf ; do
+mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}/${f} \
+  $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}/${f}.example
+touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}/${f}
+done
+
 
 
 
 %post
 if [ $1 -eq 1 ]; then
 # Add init script but don't start it
-  /sbin/chkconfig --add LCDd 
+  /sbin/chkconfig --add LCDd
   /sbin/chkconfig --add lcdproc ||:
 fi
 
@@ -119,12 +141,39 @@
 %{_sbindir}/*
 %{_mandir}/man?/*
 %dir %{_sysconfdir}/sysconfig/%{name}
-%config(noreplace) %{_sysconfdir}/sysconfig/%{name}/*.conf
+%ghost %{_sysconfdir}/sysconfig/%{name}/*.conf
+%config %{_sysconfdir}/sysconfig/%{name}/*.conf.example
 %{_initrddir}/LCDd
 %{_initrddir}/lcdproc
 
 
 %changelog
+* Tue Apr 14 2009 kwizart < kwizart at gmail.com > - 0.5.2-11
+- Disable xmlto validation (Fix FTBFS)
+- Disable default configuration (only provided as examples)
+
+* Thu Mar  5 2009 kwizart < kwizart at gmail.com > - 0.5.2-10
+- Disable LCDd lcdproc initscript by default.
+  (It needs to be configured first).
+
+* Mon Mar  2 2009 kwizart < kwizart at gmail.com > - 0.5.2-9
+- re-enable patch0
+- Prevent some timestamps changes.
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Fri Nov 07 2008 Jarod Wilson <jarod at redhat.com> - 0.5.2-7
+- Add SoundGraph iMon and Antec Veris LCD device support
+- Replace start_daemon w/daemon in initscripts (#468611)
+
+* Tue Jul  8 2008 kwizart < kwizart at gmail.com > - 0.5.2-6
+- Add BR on Fedora > 9 : docbook-dtds
+
+* Tue Jul  8 2008 kwizart < kwizart at gmail.com > - 0.5.2-5
+- Fix RETVAL for LSB compliant initscripts - #246971
+- Fix Default driver path - #454194
+
 * Sat Feb  9 2008 kwizart < kwizart at gmail.com > - 0.5.2-4
 - Rebuild for gcc43
 
@@ -134,7 +183,7 @@
 * Sun Aug 12 2007 kwizart < kwizart at gmail.com > 0.5.2-2
 - Fix memset swap from djones advice
 - License is GPLv2
-- Fix #246971 
+- Fix #246971
 
 * Sat May 19 2007 kwizart < kwizart at gmail.com > 0.5.2-1
 - Update to 0.5.2


--- lcdproc-0.5.2-scripts.patch DELETED ---




More information about the scm-commits mailing list