SHA256
1
0
forked from pool/lirc

Accepting request 22577 from vdr

Copy from vdr/lirc based on submit request 22577 from user lnussel

OBS-URL: https://build.opensuse.org/request/show/22577
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lirc?expand=0&rev=28
This commit is contained in:
OBS User autobuild 2009-10-20 10:46:10 +00:00 committed by Git OBS Bridge
parent 61c95bf331
commit fe5af196d7
9 changed files with 78 additions and 241 deletions

View File

@ -1,22 +0,0 @@
The ftdi driver is only compiled if headers are present. Remove it from the static list.
Index: lirc-0.8.5/configure.ac
===================================================================
--- lirc-0.8.5.orig/configure.ac
+++ lirc-0.8.5/configure.ac
@@ -122,6 +122,8 @@ dnl this could be _much_ more sophistica
AC_MSG_CHECKING([for which drivers can be installed on this system])
AC_MSG_RESULT()
+# this list must only contain userspace drivers without external
+# (header/library) dependencies!
possible_drivers="(none) \
(userspace) \
(accent) \
@@ -129,7 +131,6 @@ possible_drivers="(none) \
(creative) \
(ea65) \
(exaudio) \
- (ftdi) \
(irlink) \
(irreal) \
(livedrive_midi) \

View File

@ -1,186 +0,0 @@
Index: default/lirc_i2c/lirc_i2c.c
===================================================================
--- drivers.orig/lirc_i2c/lirc_i2c.c
+++ drivers/lirc_i2c/lirc_i2c.c
@@ -361,12 +361,25 @@ static struct lirc_driver lirc_template
.owner = THIS_MODULE,
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
static int ir_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind);
-static int ir_detach(struct i2c_client *client);
static int ir_probe(struct i2c_adapter *adap);
+# else
+static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id);
+#endif
+static int ir_remove(struct i2c_client *client);
static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+static const struct i2c_device_id ir_receiver_id[] = {
+ /* Generic entry for any IR receiver */
+ { "ir_video", 0 },
+ /* IR device specific entries could be added here */
+ { }
+};
+#endif
+
static struct i2c_driver driver = {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
.name = "i2c ir driver",
@@ -378,34 +391,80 @@ static struct i2c_driver driver = {
},
#endif
.id = I2C_DRIVERID_EXP3, /* FIXME */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
.attach_adapter = ir_probe,
- .detach_client = ir_detach,
+ .detach_client = ir_remove,
+#else
+ .probe = ir_probe,
+ .remove = ir_remove,
+ .id_table = ir_receiver_id,
+#endif
.command = ir_command,
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
static struct i2c_client client_template = {
.name = "unset",
.driver = &driver
};
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
static int ir_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
+#else
+static void pcf_probe(struct i2c_client *client, struct IR *ir)
+{
+ int ret1, ret2, ret3, ret4;
+
+ ret1 = i2c_smbus_write_byte(client, 0xff);
+ ret2 = i2c_smbus_read_byte(client);
+ ret3 = i2c_smbus_write_byte(client, 0x00);
+ ret4 = i2c_smbus_read_byte(client);
+
+ /* in the Asus TV-Box: bit 1-0 */
+ if (((ret2 & 0x03) == 0x03) && ((ret4 & 0x03) == 0x00)) {
+ ir->bits = (unsigned char) ~0x07;
+ ir->flag = 0x04;
+ /* in the Creative/VisionTek BreakOut-Box: bit 7-6 */
+ } else if (((ret2 & 0xc0) == 0xc0) && ((ret4 & 0xc0) == 0x00)) {
+ ir->bits = (unsigned char) ~0xe0;
+ ir->flag = 0x20;
+ }
+
+ return;
+}
+
+static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
+#endif
{
struct IR *ir;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
int err, retval;
client_template.adapter = adap;
client_template.addr = addr;
+#else
+ struct i2c_adapter *adap = client->adapter;
+ unsigned short addr = client->addr;
+ int retval;
+#endif
ir = kmalloc(sizeof(struct IR), GFP_KERNEL);
if (!ir)
return -ENOMEM;
memcpy(&ir->l, &lirc_template, sizeof(struct lirc_driver));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
memcpy(&ir->c, &client_template, sizeof(struct i2c_client));
ir->c.adapter = adap;
ir->c.addr = addr;
i2c_set_clientdata(&ir->c, ir);
+#else
+ memcpy(&ir->c, client, sizeof(struct i2c_client));
+
+ i2c_set_clientdata(client, ir);
+#endif
ir->l.data = ir;
ir->l.minor = minor;
ir->l.sample_rate = 10;
@@ -470,11 +529,15 @@ static int ir_attach(struct i2c_adapter
break;
case 0x21:
case 0x23:
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
+ ir->bits = flags & 0xff;
+ ir->flag = (flags >> 8) & 0xff;
+#else
+ pcf_probe(client, ir);
+#endif
strlcpy(ir->c.name, "TV-Box IR", I2C_NAME_SIZE);
ir->l.code_length = 8;
ir->l.add_to_buf = add_to_buf_pcf8574;
- ir->bits = flags & 0xff;
- ir->flag = (flags >> 8) & 0xff;
break;
default:
/* shouldn't happen */
@@ -485,18 +548,22 @@ static int ir_attach(struct i2c_adapter
printk(KERN_INFO "lirc_i2c: chip 0x%x found @ 0x%02x (%s)\n",
adap->id, addr, ir->c.name);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
/* register device */
err = i2c_attach_client(&ir->c);
if (err) {
kfree(ir);
return err;
}
+#endif
retval = lirc_register_driver(&ir->l);
if (retval < 0) {
printk(KERN_ERR "lirc_i2c: failed to register driver!\n");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
i2c_detach_client(&ir->c);
+#endif
kfree(ir);
return retval;
}
@@ -506,19 +573,22 @@ static int ir_attach(struct i2c_adapter
return 0;
}
-static int ir_detach(struct i2c_client *client)
+static int ir_remove(struct i2c_client *client)
{
struct IR *ir = i2c_get_clientdata(client);
/* unregister device */
lirc_unregister_driver(ir->l.minor);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
i2c_detach_client(&ir->c);
+#endif
/* free memory */
kfree(ir);
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
static int ir_probe(struct i2c_adapter *adap)
{
/*
@@ -656,6 +726,7 @@ attach_fail:
return rc;
}
+#endif
static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg)
{

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b1594d9eacf278c66c8137b75f9a0a354e663b011ab373c7a207e63b45abcb6
size 716760

3
lirc-0.8.6.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a82e73b1bbf1712cff9d757739f9a2083be246d1b1d071f8808b5e6cca4d1a1
size 730341

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Wed Sep 16 08:03:55 UTC 2009 - lnussel@suse.de
- new version 0.8.6
* added support for ENE KB3926 revision B/C/D (ENE0100) CIR port
(found on some notebooks, e.g: Acer Aspire 5720G, HP Pavilion dv5)
(Maxim Levitsky)
* merged 1st-gen mceusb device support into lirc_mceusb2,
renamed lirc_mceusb2 to lirc_mceusb
* added support for putting iMON receviers into MCE/RC6 mode
* added input subsystem mouse device support to iMON driver
* improved iMON driver to handle dual-interface iMON devices
via a single lirc device, reducing configuration complexity
* added support for more iMON devices, including proper support
for touchscreen iMON devices (Rene Harder)
* improved iMON driver including touchscreen support
* Linux input support added to lircmd
* added support for IT8720 CIR port
* moved default lircd, lircmd and lircrcd config file locations to
/etc/lirc/lircd.conf, /etc/lirc/lircmd.conf and /etc/lirc/lircrc
* moved lircd socket from /dev/lircd to /var/run/lirc/lircd
* moved default pid file location from /var/run/lircd.pid to
/var/run/lirc/lircd.pid
* added support for XMP protocol
-------------------------------------------------------------------
Thu Aug 27 14:30:58 UTC 2009 - lnussel@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package lirc-kernel (Version 0.8.5MACRO)
# spec file for package lirc-kernel (Version 0.8.6MACRO)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -24,12 +24,11 @@ BuildRequires: kernel-source kernel-syms module-init-tools
License: GPL v2 or later
Group: System/Kernel
Summary: LIRC kernel modules
Version: 0.8.5%{?snapshot:_%snapshot}
Version: 0.8.6%{?snapshot:_%snapshot}
Release: 1
Source0: lirc-%{?snapshot}%{!?snapshot:%version}.tar.bz2
Source1: Makefile.module
Source2: Makefile.modsub
Patch0: lirc-0.8.5-kernel-2.6.31.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: s390 s390x
%suse_kernel_module_package -n lirc kdump um debug
@ -53,7 +52,6 @@ receivers for the serial port.
%prep
%setup -q -n lirc-%{?snapshot}%{!?snapshot:%version}
%patch0 -p0
autoreconf -f -i
PYTHON=/usr/bin/python \
./configure --with-driver=all

View File

@ -1,15 +0,0 @@
Index: lirc-0.8.3/configure.ac
===================================================================
--- lirc-0.8.3.orig/configure.ac
+++ lirc-0.8.3/configure.ac
@@ -1666,8 +1666,8 @@ AH_BOTTOM([
#define LIRC_IRTTY DEVDIR "/" "ttyS0"
-#define LIRCD DEVDIR "/" DEV_LIRCD
-#define LIRCM DEVDIR "/" DEV_LIRCM
+#define LIRCD "/var/run/lirc/" DEV_LIRCD
+#define LIRCM "/var/run/lirc/" DEV_LIRCM
#define LIRCDCFGFILE SYSCONFDIR "/" CFG_LIRCD
#define LIRCMDCFGFILE SYSCONFDIR "/" CFG_LIRCM

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Wed Sep 16 08:03:55 UTC 2009 - lnussel@suse.de
- new version 0.8.6
* added support for ENE KB3926 revision B/C/D (ENE0100) CIR port
(found on some notebooks, e.g: Acer Aspire 5720G, HP Pavilion dv5)
(Maxim Levitsky)
* merged 1st-gen mceusb device support into lirc_mceusb2,
renamed lirc_mceusb2 to lirc_mceusb
* added support for putting iMON receviers into MCE/RC6 mode
* added input subsystem mouse device support to iMON driver
* improved iMON driver to handle dual-interface iMON devices
via a single lirc device, reducing configuration complexity
* added support for more iMON devices, including proper support
for touchscreen iMON devices (Rene Harder)
* improved iMON driver including touchscreen support
* Linux input support added to lircmd
* added support for IT8720 CIR port
* moved default lircd, lircmd and lircrcd config file locations to
/etc/lirc/lircd.conf, /etc/lirc/lircmd.conf and /etc/lirc/lircrc
* moved lircd socket from /dev/lircd to /var/run/lirc/lircd
* moved default pid file location from /var/run/lircd.pid to
/var/run/lirc/lircd.pid
* added support for XMP protocol
-------------------------------------------------------------------
Wed Sep 16 07:27:55 UTC 2009 - lnussel@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package lirc (Version 0.8.5MACRO)
# spec file for package lirc (Version 0.8.6MACRO)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -48,20 +48,19 @@ AutoReqProv: on
Obsoletes: lirc-64bit
%endif
#
Version: 0.8.5%{?snapshot:_%snapshot}
Version: 0.8.6%{?snapshot:_%snapshot}
Release: 1
PreReq: %fillup_prereq %insserv_prereq
Summary: LIRC remote definitions
Source0: lirc-%{?snapshot}%{!?snapshot:%version}.tar.bz2
Source0: http://downloads.sourceforge.net/project/lirc/LIRC/%version/lirc-%{?snapshot}%{!?snapshot:%version}.tar.bz2
Source4: rc.lirc
Source5: sysconfig.lirc
Source6: fix-remote-keys.pl
Source8: README.SUSE
Source9: 51-lirc.rules
#Patch0: lirc-hw.diff
Patch1: lirc-sockets-in-var.diff
#Patch1: lirc-sockets-in-var.diff
Patch2: imon2_conf.patch
Patch3: lirc-0.8.5-ftdi.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: udev
Suggests: lirc-kmp
@ -136,9 +135,7 @@ lircd daemon from the 'lirc' package has to be configured and started.
%prep
%setup -q -n %{name}-%{?snapshot}%{!?snapshot:%version}
#%patch0 -p1 -b .hw
%patch1 -p1 -b .var
%patch2 -p1
%patch3 -p1
cp %{SOURCE8} .
#find . -type d -name CVS -print0 | xargs -0 -- rm -rf
#find . -name .cvsignore -print0 | xargs -0 -- rm -rf
@ -179,7 +176,6 @@ mkdir -p %{buildroot}/usr/share/lirc
cp -a remotes %{buildroot}/usr/share/lirc
install -d -m 755 %{buildroot}/dev
mkdir -p %{buildroot}/var/run/lirc
mkfifo %{buildroot}/var/run/lirc/lircm
chmod 600 %{buildroot}/var/run/lirc/*
# lircd init scripts
install -d -m 755 %{buildroot}/etc/init.d \
@ -201,8 +197,10 @@ rm -f %{buildroot}%{_libdir}/liblirc_client.la
# get rid of useless contrib stuff
rm contrib/lirc.*
#
# ghost file
install -D -m 644 /dev/null %{buildroot}/etc/lircd.conf
# ghost files
install -D -m 644 /dev/null %{buildroot}/etc/lirc/lircd.conf
install -D -m 644 /dev/null %{buildroot}/etc/lirc/lircmd.conf
install -D -m 644 /dev/null %{buildroot}/etc/lirc/lircrc
# hide python dependency
chmod 644 %{buildroot}%{_bindir}/pronto2lirc
#
@ -229,7 +227,10 @@ chmod 644 %{buildroot}%{_bindir}/pronto2lirc
%config /etc/udev/rules.d/51-lirc.rules
%doc %_mandir/man1/*
%doc %_mandir/man8/*
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/lircd.conf
%dir /etc/lirc
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/lirc/lircd.conf
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/lirc/lircmd.conf
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/lirc/lircrc
%files devel
%defattr (-,root,root)
@ -250,6 +251,17 @@ chmod 644 %{buildroot}%{_bindir}/pronto2lirc
%post
%{fillup_and_insserv lirc}
# config files moved to /etc/lirc in 0.8.6
for file in lircd.conf lircmd.conf lircrc; do
if [ -e /etc/$file -a ! -L /etc/$file ]; then
if [ ! -e /etc/lirc/$file ]; then
mv /etc/$file /etc/lirc/$file || true
ln -s lirc/$file /etc/$file || true
else
echo "Warning: lirc ignores /etc/$file, use /etc/lirc/$file instead" >&2
fi
fi
done
%post -n liblirc_client0 -p /sbin/ldconfig