- Add missing BuildRequires: gettext-devel dbus-devel libvncserver-devel
- Drop BuildRequires: libmpdclient-devel, the mpd plugin does not work with recent versions of libmpdclient
This commit is contained in:
parent
699f11e482
commit
00e85e1f98
|
@ -0,0 +1 @@
|
|||
/lcd4linux-trunk-1143.zip
|
|
@ -0,0 +1,39 @@
|
|||
The Fedora package of lcd4linux ships with a demo configuration file, shell
|
||||
script and desktop file, to use lcd4linux under your normal desktop. To use
|
||||
it with an actual external LCD display you need to configure it for your
|
||||
specific display, and likely launch it as root. See the sample config file
|
||||
included with the package, and the lcd4linux website for more info:
|
||||
http://ssl.bulix.org/projects/lcd4linux/
|
||||
|
||||
A note about the i2c_sensors plugin, as it names suggests it was written
|
||||
to get information from hardware monitoring sensors attached to the i2c bus.
|
||||
But now a days machines often have hwmon sensors attached to difference
|
||||
busses (such as those builtin to CPUs). The Fedora package contains a patch
|
||||
to the i2c_sensors plugin to also recognize these. There still is a problem
|
||||
when you have multiple sensor devices. In this case the i2c_sensors
|
||||
plugin will just pick the first one (hwmon0). You can use the i2c_sensors
|
||||
plugin with multiple sensor devices by explicitly setting the i2c_sensors-path
|
||||
variable and specifying the hwmon device in the i2c_sensors call. Example
|
||||
configuration code (note how some hwmon devices need 'hwmon#/device/...',
|
||||
and others 'hwmon#/...'):
|
||||
|
||||
i2c_sensors-path '/sys/class/hwmon/'
|
||||
Widget Temp1 {
|
||||
class 'Text'
|
||||
width 16
|
||||
align 'R'
|
||||
prefix 'ACPI: '
|
||||
postfix '°C'
|
||||
precision 1
|
||||
expression i2c_sensors('hwmon0/temp1_input') / 1000.0
|
||||
}
|
||||
|
||||
Widget Temp2 {
|
||||
class 'Text'
|
||||
width 16
|
||||
align 'R'
|
||||
prefix 'CPU1: '
|
||||
postfix '°C'
|
||||
precision 1
|
||||
expression i2c_sensors('hwmon1/device/temp1_input') / 1000.0
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Name=LCD4Linux
|
||||
Type=Application
|
||||
Categories=System;Monitor;
|
||||
Exec=lcd4X11
|
||||
Icon=lcd4linux
|
||||
Terminal=0
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -f $HOME/.lcd4X11.conf ]; then
|
||||
cp /etc/lcd4X11.conf $HOME/.lcd4X11.conf
|
||||
chmod 600 $HOME/.lcd4X11.conf
|
||||
fi
|
||||
|
||||
exec lcd4linux -F -f $HOME/.lcd4X11.conf
|
|
@ -0,0 +1,39 @@
|
|||
diff -ur trunk/plugin_i2c_sensors.c trunk.new/plugin_i2c_sensors.c
|
||||
--- trunk/plugin_i2c_sensors.c 2010-01-17 14:40:02.000000000 +0100
|
||||
+++ trunk.new/plugin_i2c_sensors.c 2011-02-20 15:52:34.868010987 +0100
|
||||
@@ -223,6 +223,8 @@
|
||||
int done;
|
||||
|
||||
if (!strcmp(method, "sysfs")) {
|
||||
+ base = "/sys/class/hwmon/";
|
||||
+ } else if (!strcmp(method, "sysfs-old")) {
|
||||
base = "/sys/bus/i2c/devices/";
|
||||
} else if (!strcmp(method, "procfs")) {
|
||||
base = "/proc/sys/dev/sensors/";
|
||||
@@ -259,6 +261,16 @@
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
+ if (!strcmp(file->d_name, "device")) {
|
||||
+ char fname[PATH_MAX];
|
||||
+ snprintf(fname, PATH_MAX, "%sdevice/temp1_input", dname);
|
||||
+ if (access(fname, R_OK) == 0) {
|
||||
+ path = realloc(path, strlen(dname) + 7);
|
||||
+ sprintf(path, "%sdevice/", dname);
|
||||
+ done = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
closedir(fd2);
|
||||
if (done)
|
||||
@@ -281,6 +293,8 @@
|
||||
/* debug("No path to i2c sensors found in the conf, calling my_i2c_sensors_path()"); */
|
||||
my_i2c_sensors_path("sysfs");
|
||||
if (!path)
|
||||
+ my_i2c_sensors_path("sysfs-old");
|
||||
+ if (!path)
|
||||
my_i2c_sensors_path("procfs");
|
||||
|
||||
if (!path) {
|
||||
Only in trunk.new: plugin_i2c_sensors.c~
|
|
@ -0,0 +1,14 @@
|
|||
diff -up trunk/drv_st2205.c~ trunk/drv_st2205.c
|
||||
--- trunk/drv_st2205.c~ 2009-01-28 21:18:52.000000000 +0100
|
||||
+++ trunk/drv_st2205.c 2011-02-20 16:34:40.145011016 +0100
|
||||
@@ -142,8 +142,8 @@ static int drv_st2205_start2(const char
|
||||
fb = malloc(h->height * h->width * 3);
|
||||
|
||||
/* set width/height from st2205 firmware specs */
|
||||
- DROWS = h->width;
|
||||
- DCOLS = h->height;
|
||||
+ DROWS = h->height;
|
||||
+ DCOLS = h->width;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
diff -up trunk/plugins.m4~ trunk/plugins.m4
|
||||
--- trunk/plugins.m4~ 2010-01-28 17:19:58.000000000 +0100
|
||||
+++ trunk/plugins.m4 2011-02-20 11:07:17.459573019 +0100
|
||||
@@ -568,7 +568,7 @@ fi
|
||||
|
||||
# WLAN
|
||||
if test "$PLUGIN_WIRELESS" = "yes"; then
|
||||
- AC_CHECK_HEADERS(linux/wireless.h, [has_wireless_header="true"], [has_wireless_header="false"])
|
||||
+ AC_CHECK_HEADERS(linux/wireless.h, [has_wireless_header="true"], [has_wireless_header="false"], [#include <sys/socket.h>])
|
||||
if test "$has_wireless_header" = "true"; then
|
||||
PLUGINS="$PLUGINS plugin_wireless.o"
|
||||
AC_DEFINE(PLUGIN_WIRELESS,1,[wireless plugin])
|
|
@ -0,0 +1,70 @@
|
|||
.TH VERSION "8" "August 2006" "http://ssl.bulix.org/projects/lcd4linux/" "System Administration Utilities"
|
||||
.SH NAME
|
||||
Version \- daemon for ''lcd'' display devices
|
||||
.SH SYNOPSIS
|
||||
.B lcd4linux [\fIOPTIONS...\fR]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
LCD4Linux is a small program that grabs information from the kernel and
|
||||
some subsystems and displays it on an external liquid crystal display.
|
||||
.PP
|
||||
If started without any options, it will try to read its configuration from
|
||||
\fB/etc/lcd4linux.conf\fR and daemonize. Please make sure your configuration file
|
||||
is owned by the user you run lcd4linux (typically \fIroot\fR) and has permissions
|
||||
\fB600\fR.
|
||||
.TP
|
||||
\fB\-f\fR
|
||||
Alternate configuration file to read. Use this switch to make lcd4linux read another
|
||||
file than \fI/etc/lcd4linux.conf\fR.
|
||||
.TP
|
||||
\fB\-F\fR
|
||||
Run in forground and don't daemonize. Useful for debugging.
|
||||
.TP
|
||||
\fB\-c\fR \fIarg\fR
|
||||
allows to overwrite entries in the config-file from the command line. arg is 'key=value'
|
||||
.TP
|
||||
\fB\-h\fR
|
||||
shows a really short usage of lcd4linux
|
||||
.TP
|
||||
\fB\-i\fR
|
||||
starts lcd4linux in interactive mode. Can be used multiple times
|
||||
.TP
|
||||
\fB\-l\fR
|
||||
Prints a list of supported displays
|
||||
.TP
|
||||
\fB\-o\fR
|
||||
Specifies an output file (see http://ssl.bulix.org/projects/lcd4linux/ for details)
|
||||
.TP
|
||||
\fB\-q\fR
|
||||
makes lcd4linux more quiet. Can be used multiple times
|
||||
.TP
|
||||
\fB\-v\fR
|
||||
increases verbose level. Can be used multiple times
|
||||
.SH FILES
|
||||
.TP
|
||||
.I "/etc/lcd4linux.conf"
|
||||
Contains the configuration of lcd4linux. Please note that distributions
|
||||
generally don't install this file, please create it yourself using the
|
||||
sample configuration as template.
|
||||
.TP
|
||||
.I "/usr/share/doc/lcd4linux/lcd4linux.conf.gz"
|
||||
Contains a detailed and extensive example configuration file
|
||||
.SH AUTHOR
|
||||
lcd4linux was written by Michael Reinelt <reinelt@eunet.at>
|
||||
.br
|
||||
Copyright (C) 2005 The LCD4Linux Team <lcd4linux\-devel@users.sourceforge.net>
|
||||
.SH ORIGIN
|
||||
Development of lcd4linux is at http://ssl.bulix.org/projects/lcd4linux/. Use that
|
||||
web service for reporting upstream bugs getting in touch with development.
|
||||
.SH COPYRIGHT
|
||||
This manual page was written by Reinhard Tartler <siretart@tauware.de>
|
||||
in August 2006 for the Debian project, but may also be used by others.
|
||||
.br
|
||||
This manual page and lcd4linux is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
.br
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License, version 2, can be found in /usr/share/common-licenses/GPL-2.
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
%global svn_rev 1143
|
||||
|
||||
Name: lcd4linux
|
||||
Version: 0.11
|
||||
# We package an svn snapshot of what will become 0.11 since upstream has
|
||||
# neglected to do a new release for ages
|
||||
Release: 0.2.svn%{svn_rev}%{?dist}
|
||||
Summary: Display system state on an external LCD display
|
||||
Group: Applications/System
|
||||
License: GPLv2+
|
||||
URL: http://ssl.bulix.org/projects/lcd4linux/
|
||||
# This is the non rpmbuild parsable url:
|
||||
# http://ssl.bulix.org/projects/lcd4linux/changeset/1143/trunk?old_path=%2F&format=zip
|
||||
# Note replace 1143 with svn_rev!
|
||||
Source0: lcd4linux-trunk-1143.zip
|
||||
# Courtesey of Debain
|
||||
Source1: lcd4linux.8
|
||||
Source2: lcd4X11.sh
|
||||
Source3: lcd4X11.desktop
|
||||
Source4: README.fedora
|
||||
Patch0: lcd4linux-wireless.patch
|
||||
Patch1: lcd4linux-hwmon.patch
|
||||
Patch2: lcd4linux-st2205-width-height-swap.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: gd-devel ncurses-devel libX11-devel libICE-devel sqlite-devel
|
||||
BuildRequires: serdisplib-devel libusb-devel libftdi-devel libst2205-devel
|
||||
BuildRequires: libvncserver-devel gettext-devel dbus-devel
|
||||
BuildRequires: libtool desktop-file-utils
|
||||
|
||||
%description
|
||||
LCD4Linux is a small program that grabs information from the kernel
|
||||
and some subsystems and displays it on an external liquid crystal display.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n trunk
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
chmod +x bootstrap configure
|
||||
./bootstrap
|
||||
cp -a %{SOURCE4} .
|
||||
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
sed -e "s@#Display 'XWindow'@Display 'XWindow'@" \
|
||||
-e "s@Display 'GLCD2USB'@#Display 'GLCD2USB'@" \
|
||||
-e "s@Layout 'TestLayer'@#Layout 'TestLayer'@" \
|
||||
-e "s@#Layout 'Default'@Layout 'Default'@" \
|
||||
lcd4linux.conf.sample > lcd4X11.conf
|
||||
touch -r lcd4linux.conf.sample lcd4X11.conf
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||
install -p -m 644 lcd4X11.conf $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
install -p -m 644 lcd4linux.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man8
|
||||
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/lcd4X11
|
||||
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE3}
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING ChangeLog README.fedora lcd4linux.conf.sample
|
||||
%config(noreplace) %{_sysconfdir}/lcd4X11.conf
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/lcd4X11
|
||||
%{_mandir}/man8/%{name}.8*
|
||||
%{_datadir}/pixmaps/%{name}.xpm
|
||||
%{_datadir}/applications/lcd4X11.desktop
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 22 2011 Hans de Goede <hdegoede@redhat.com> - 0.11-0.2.svn1143
|
||||
- Add missing BuildRequires: gettext-devel dbus-devel libvncserver-devel
|
||||
- Drop BuildRequires: libmpdclient-devel, the mpd plugin does not work
|
||||
with recent versions of libmpdclient
|
||||
|
||||
* Sat Feb 19 2011 Hans de Goede <hdegoede@redhat.com> - 0.11-0.1.svn1143
|
||||
- Initial Fedora package
|
Loading…
Reference in New Issue