kernel 3.4 rebuild [release 0.9.0-9mamba;Fri Jan 04 2013]

This commit is contained in:
Silvan Calarco 2024-01-06 06:24:00 +01:00
parent 85493a8cbc
commit c79764c45f
9 changed files with 753 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# lirc # lirc
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.

View File

@ -0,0 +1,84 @@
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.c lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.c
--- lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.c 1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.c 2007-12-22 16:09:37.000000000 +0100
@@ -0,0 +1,44 @@
+//Temporarily added until a resolution is reached upstream
+//For kernel 2.6.22
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22)
+#include "extra_2.6.22/bttv.h"
+#include "extra_2.6.22/bttvp.h"
+#else
+#include "../drivers/media/video/bt8xx/bttv.h"
+#include "../drivers/media/video/bt8xx/bttvp.h"
+#endif
+
+struct bttv bttvs[BTTV_MAX];
+unsigned int bttv_debug;
+unsigned int bttv_num; /* number of Bt848s in use */
+
+int bttv_get_cardinfo(unsigned int card, int *type, unsigned *cardid)
+{
+ printk("The bttv_* interface is obsolete and will go away,\n"
+ "please use the new, sysfs based interface instead.\n");
+ if (card >= bttv_num) {
+ return -1;
+ }
+ *type = bttvs[card].c.type;
+ *cardid = bttvs[card].cardid;
+ return 0;
+}
+
+wait_queue_head_t* bttv_get_gpio_queue(unsigned int card)
+{
+ struct bttv *btv;
+
+ if (card >= bttv_num) {
+ return NULL;
+ }
+
+ btv = &bttvs[card];
+ if (bttvs[card].shutdown) {
+ return NULL;
+ }
+ return &btv->gpioq;
+}
+
+
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.h lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.h
--- lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.h 1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.h 2007-12-22 16:09:37.000000000 +0100
@@ -0,0 +1,6 @@
+//Temporarily re-added for Ubuntu Kernel 2.6.22 until upstream
+//Resolution is reached.
+extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card);
+extern int bttv_get_cardinfo(unsigned int card, int *type,
+ unsigned int *cardid);
+
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/lirc_gpio.c lirc-0.8.2/drivers/lirc_gpio/lirc_gpio.c
--- lirc-0.8.2.orig/drivers/lirc_gpio/lirc_gpio.c 2007-02-13 07:45:15.000000000 +0100
+++ lirc-0.8.2/drivers/lirc_gpio/lirc_gpio.c 2007-12-22 16:10:29.000000000 +0100
@@ -54,6 +54,7 @@
#else
#include "../drivers/media/video/bt8xx/bttv.h"
#include "../drivers/media/video/bt8xx/bttvp.h"
+#include "bttv_deprecated.h"
#endif
#if BTTV_VERSION_CODE < KERNEL_VERSION(0,7,45)
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/Makefile.am lirc-0.8.2/drivers/lirc_gpio/Makefile.am
--- lirc-0.8.2.orig/drivers/lirc_gpio/Makefile.am 2004-04-25 18:29:25.000000000 +0200
+++ lirc-0.8.2/drivers/lirc_gpio/Makefile.am 2007-12-22 16:09:37.000000000 +0100
@@ -5,9 +5,9 @@
## this is so that Automake includes the C compiling definitions, and
## includes the source files in the distribution.
EXTRA_PROGRAMS = automake_dummy
-automake_dummy_SOURCES = lirc_gpio.c
+automake_dummy_SOURCES = lirc_gpio.c bttv_deprecated.o
## there is no *just* object file support in automake. This is close enough
-module_DATA = lirc_gpio.o
+module_DATA = lirc_gpio.o bttv_deprecated.o
include ../Makefile.common

11
lirc-0.8.2-macmini.patch Normal file
View File

@ -0,0 +1,11 @@
diff -Nru lirc-0.8.2.orig/daemons/hw-types.c lirc-0.8.2/daemons/hw-types.c
--- lirc-0.8.2.orig/daemons/hw-types.c 2007-05-05 14:20:03.000000000 +0200
+++ lirc-0.8.2/daemons/hw-types.c 2007-07-18 13:28:29.000000000 +0200
@@ -109,6 +109,7 @@
&hw_livedrive_midi,
&hw_livedrive_seq,
&hw_logitech,
+ &hw_macmini,
&hw_mp3anywhere,
&hw_mouseremote,
&hw_mouseremote_ps2,

View File

@ -0,0 +1,23 @@
--- lirc-0.8.3pre1/configure 2008-01-29 13:31:04.000000000 +0100
+++ lirc-0.8.3pre1.orig/configure 2008-01-29 13:27:13.000000000 +0100
@@ -24129,7 +24129,7 @@
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_portaudio_Pa_Initialize" >&5
echo "${ECHO_T}$ac_cv_lib_portaudio_Pa_Initialize" >&6; }
-if test $ac_cv_lib_portaudio_Pa_Initialize = yes; then
+if test $ac_cv_lib_portaudio_Pa_Initialize = yesDISABLED; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBPORTAUDIO 1
@@ -25063,8 +25063,9 @@
CFLAGS="$CFLAGS `${LIBUSB_CONFIG} --cflags`"
;;
audio)
- hw_module="${hw_module} hw_audio.o receive.o"
- portaudio_lib="-lportaudio ${portaudio_lib_other}"
+ # hw_audio.c is incompatible with current PortAudio snapshot
+ #hw_module="${hw_module} hw_audio.o receive.o"
+ #portaudio_lib="-lportaudio ${portaudio_lib_other}"
;;
audio_alsa)
hw_module="${hw_module} hw_audio_alsa.o receive.o"

View File

@ -0,0 +1,13 @@
diff -ru lirc-0.8.5.orig/drivers/lirc_parallel/lirc_parallel.c lirc-0.8.5/drivers/lirc_parallel/lirc_parallel.c
--- lirc-0.8.5.orig/drivers/lirc_parallel/lirc_parallel.c 2009-03-08 20:22:28.000000000 +0100
+++ lirc-0.8.5/drivers/lirc_parallel/lirc_parallel.c 2009-06-20 16:45:02.000000000 +0200
@@ -35,9 +35,6 @@
#endif
#include <linux/autoconf.h>
-#ifdef CONFIG_SMP
-#error "--- Sorry, this driver is not SMP safe. ---"
-#endif
#include <linux/module.h>
#include <linux/sched.h>

71
lirc-0.8.6-i2c.patch Normal file
View File

@ -0,0 +1,71 @@
--- drivers/lirc_i2c/lirc_i2c.c 2009/08/30 16:59:53 1.70
+++ drivers/lirc_i2c/lirc_i2c.c 2009/12/28 15:29:03 1.72
@@ -399,8 +399,8 @@
.name = "i2c ir driver",
},
#endif
- .id = I2C_DRIVERID_EXP3, /* FIXME */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
+ .id = I2C_DRIVERID_EXP3, /* FIXME */
.attach_adapter = ir_probe,
.detach_client = ir_remove,
#else
@@ -492,20 +492,23 @@
ir->l.add_to_buf = add_to_buf_pv951;
break;
case 0x71:
-#ifdef I2C_HW_B_CX2341X
- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) ||
- adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) {
-#else
- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) {
+
+
+
+#ifdef I2C_HW_B_CX2388x
+ /* Leadtek Winfast PVR2000 or Hauppauge HVR-1300 */
+ if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x))
+ strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE);
+ else
#endif
+ {
/*
* The PVR150 IR receiver uses the same protocol as
* other Hauppauge cards, but the data flow is
* different, so we need to deal with it by its own.
*/
strlcpy(ir->c.name, "Hauppauge PVR150", I2C_NAME_SIZE);
- } else /* I2C_HW_B_CX2388x */
- strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE);
+ }
ir->l.code_length = 13;
ir->l.add_to_buf = add_to_buf_haup_pvr150;
break;
@@ -516,19 +519,18 @@
break;
case 0x18:
case 0x1a:
-#ifdef I2C_HW_B_CX2341X
- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) ||
- adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) {
+#ifdef I2C_HW_B_CX2388x
+ if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) {
+ strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE);
+ ir->l.code_length = 8;
+ ir->l.add_to_buf = add_to_buf_pvr2000;
+ } else {
#else
- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) {
+ {
#endif
strlcpy(ir->c.name, "Hauppauge IR", I2C_NAME_SIZE);
ir->l.code_length = 13;
ir->l.add_to_buf = add_to_buf_haup;
- } else { /* I2C_HW_B_CX2388x */
- strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE);
- ir->l.code_length = 8;
- ir->l.add_to_buf = add_to_buf_pvr2000;
}
break;
case 0x30:

View File

@ -0,0 +1,269 @@
--- drivers/lirc_dev/lirc_dev.h 2009/03/15 09:34:00 1.37
+++ drivers/lirc_dev/lirc_dev.h 2010/01/23 16:28:07 1.39
@@ -4,7 +4,7 @@
* (L) by Artur Lipowski <alipowski@interia.pl>
* This code is licensed under GNU GPL
*
- * $Id: lirc_dev.h,v 1.37 2009/03/15 09:34:00 lirc Exp $
+ * $Id: lirc_dev.h,v 1.39 2010/01/23 16:28:07 lirc Exp $
*
*/
@@ -30,14 +30,19 @@
struct lirc_buffer {
wait_queue_head_t wait_poll;
- spinlock_t lock;
+ spinlock_t fifo_lock;
unsigned int chunk_size;
unsigned int size; /* in chunks */
/* Using chunks instead of bytes pretends to simplify boundary checking
* And should allow for some performance fine tunning later */
#ifdef LIRC_HAVE_KFIFO
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
struct kfifo *fifo;
#else
+ struct kfifo fifo;
+ u8 fifo_initialized;
+#endif
+#else
unsigned int fill; /* in chunks */
int head, tail; /* in chunks */
unsigned char *data;
@@ -47,12 +52,12 @@
static inline void lirc_buffer_lock(struct lirc_buffer *buf,
unsigned long *flags)
{
- spin_lock_irqsave(&buf->lock, *flags);
+ spin_lock_irqsave(&buf->fifo_lock, *flags);
}
static inline void lirc_buffer_unlock(struct lirc_buffer *buf,
unsigned long *flags)
{
- spin_unlock_irqrestore(&buf->lock, *flags);
+ spin_unlock_irqrestore(&buf->fifo_lock, *flags);
}
static inline void _lirc_buffer_clear(struct lirc_buffer *buf)
{
@@ -64,10 +69,21 @@
static inline void lirc_buffer_clear(struct lirc_buffer *buf)
{
#ifdef LIRC_HAVE_KFIFO
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
if (buf->fifo)
kfifo_reset(buf->fifo);
#else
unsigned long flags;
+
+ if (buf->fifo_initialized) {
+ spin_lock_irqsave(&buf->fifo_lock, flags);
+ kfifo_reset(&buf->fifo);
+ spin_unlock_irqrestore(&buf->fifo_lock, flags);
+ }
+#endif
+#else
+ unsigned long flags;
+
lirc_buffer_lock(buf, &flags);
_lirc_buffer_clear(buf);
lirc_buffer_unlock(buf, &flags);
@@ -77,31 +93,47 @@
unsigned int chunk_size,
unsigned int size)
{
+ int ret = 0;
+
init_waitqueue_head(&buf->wait_poll);
- spin_lock_init(&buf->lock);
+ spin_lock_init(&buf->fifo_lock);
#ifndef LIRC_HAVE_KFIFO
_lirc_buffer_clear(buf);
#endif
buf->chunk_size = chunk_size;
buf->size = size;
#ifdef LIRC_HAVE_KFIFO
- buf->fifo = kfifo_alloc(size*chunk_size, GFP_KERNEL, &buf->lock);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
+ buf->fifo = kfifo_alloc(size*chunk_size, GFP_KERNEL, &buf->fifo_lock);
if (!buf->fifo)
return -ENOMEM;
#else
+ ret = kfifo_alloc(&buf->fifo, size * chunk_size, GFP_KERNEL);
+ if (ret == 0)
+ buf->fifo_initialized = 1;
+#endif
+#else
buf->data = kmalloc(size*chunk_size, GFP_KERNEL);
if (buf->data == NULL)
return -ENOMEM;
memset(buf->data, 0, size*chunk_size);
#endif
- return 0;
+
+ return ret;
}
static inline void lirc_buffer_free(struct lirc_buffer *buf)
{
#ifdef LIRC_HAVE_KFIFO
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
if (buf->fifo)
kfifo_free(buf->fifo);
#else
+ if (buf->fifo_initialized) {
+ kfifo_free(&buf->fifo);
+ buf->fifo_initialized = 0;
+ }
+#endif
+#else
kfree(buf->data);
buf->data = NULL;
buf->head = 0;
@@ -111,6 +143,25 @@
buf->size = 0;
#endif
}
+
+#ifdef LIRC_HAVE_KFIFO
+static inline int lirc_buffer_len(struct lirc_buffer *buf)
+{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
+ return kfifo_len(buf->fifo);
+#else
+ int len;
+ unsigned long flags;
+
+ spin_lock_irqsave(&buf->fifo_lock, flags);
+ len = kfifo_len(&buf->fifo);
+ spin_unlock_irqrestore(&buf->fifo_lock, flags);
+
+ return len;
+#endif
+}
+#endif
+
#ifndef LIRC_HAVE_KFIFO
static inline int _lirc_buffer_full(struct lirc_buffer *buf)
{
@@ -120,7 +171,7 @@
static inline int lirc_buffer_full(struct lirc_buffer *buf)
{
#ifdef LIRC_HAVE_KFIFO
- return kfifo_len(buf->fifo) == buf->size * buf->chunk_size;
+ return lirc_buffer_len(buf) == buf->size * buf->chunk_size;
#else
unsigned long flags;
int ret;
@@ -139,7 +190,7 @@
static inline int lirc_buffer_empty(struct lirc_buffer *buf)
{
#ifdef LIRC_HAVE_KFIFO
- return !kfifo_len(buf->fifo);
+ return !lirc_buffer_len(buf);
#else
unsigned long flags;
int ret;
@@ -158,7 +209,7 @@
static inline int lirc_buffer_available(struct lirc_buffer *buf)
{
#ifdef LIRC_HAVE_KFIFO
- return buf->size - (kfifo_len(buf->fifo) / buf->chunk_size);
+ return buf->size - (lirc_buffer_len(buf) / buf->chunk_size);
#else
unsigned long flags;
int ret;
@@ -177,21 +228,30 @@
buf->fill -= 1;
}
#endif
-static inline void lirc_buffer_read(struct lirc_buffer *buf,
- unsigned char *dest)
+static inline unsigned int lirc_buffer_read(struct lirc_buffer *buf,
+ unsigned char *dest)
{
+ unsigned int ret = 0;
+
#ifdef LIRC_HAVE_KFIFO
- if (kfifo_len(buf->fifo) >= buf->chunk_size)
- kfifo_get(buf->fifo, dest, buf->chunk_size);
+ if (lirc_buffer_len(buf) >= buf->chunk_size)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
+ ret = kfifo_get(buf->fifo, dest, buf->chunk_size);
+#else
+ ret = kfifo_out_locked(&buf->fifo, dest, buf->chunk_size,
+ &buf->fifo_lock);
+#endif
#else
unsigned long flags;
lirc_buffer_lock(buf, &flags);
_lirc_buffer_read_1(buf, dest);
lirc_buffer_unlock(buf, &flags);
#endif
+
+ return ret;
}
#ifndef LIRC_HAVE_KFIFO
-static inline void _lirc_buffer_write_1(struct lirc_buffer *buf,
+static inline _lirc_buffer_write_1(struct lirc_buffer *buf,
unsigned char *orig)
{
memcpy(&buf->data[buf->tail*buf->chunk_size], orig, buf->chunk_size);
@@ -199,17 +259,26 @@
buf->fill++;
}
#endif
-static inline void lirc_buffer_write(struct lirc_buffer *buf,
- unsigned char *orig)
+static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf,
+ unsigned char *orig)
{
+ unsigned int ret = 0;
+
#ifdef LIRC_HAVE_KFIFO
- kfifo_put(buf->fifo, orig, buf->chunk_size);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
+ ret = kfifo_put(buf->fifo, orig, buf->chunk_size);
+#else
+ ret = kfifo_in_locked(&buf->fifo, orig, buf->chunk_size,
+ &buf->fifo_lock);
+#endif
#else
unsigned long flags;
lirc_buffer_lock(buf, &flags);
_lirc_buffer_write_1(buf, orig);
lirc_buffer_unlock(buf, &flags);
#endif
+
+ return ret;
}
#ifndef LIRC_HAVE_KFIFO
static inline void _lirc_buffer_write_n(struct lirc_buffer *buf,
@@ -234,17 +303,26 @@
buf->fill += count;
}
#endif
-static inline void lirc_buffer_write_n(struct lirc_buffer *buf,
- unsigned char *orig, int count)
+static inline unsigned int lirc_buffer_write_n(struct lirc_buffer *buf,
+ unsigned char *orig, int count)
{
+ unsigned int ret = 0;
+
#ifdef LIRC_HAVE_KFIFO
- kfifo_put(buf->fifo, orig, count * buf->chunk_size);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
+ ret = kfifo_put(buf->fifo, orig, count * buf->chunk_size);
+#else
+ ret = kfifo_in_locked(&buf->fifo, orig, count * buf->chunk_size,
+ &buf->fifo_lock);
+#endif
#else
unsigned long flags;
lirc_buffer_lock(buf, &flags);
_lirc_buffer_write_n(buf, orig, count);
lirc_buffer_unlock(buf, &flags);
#endif
+
+ return ret;
}
struct lirc_driver {

View File

@ -0,0 +1,54 @@
diff -ru lirc-0.9.0.orig/drivers/lirc_atiusb/lirc_atiusb.c lirc-0.9.0/drivers/lirc_atiusb/lirc_atiusb.c
--- lirc-0.9.0.orig/drivers/lirc_atiusb/lirc_atiusb.c 2011-03-25 23:28:18.000000000 +0100
+++ lirc-0.9.0/drivers/lirc_atiusb/lirc_atiusb.c 2011-08-19 16:34:57.690724827 +0200
@@ -48,7 +48,6 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kmod.h>
-#include <linux/smp_lock.h>
#include <linux/completion.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
diff -ru lirc-0.9.0.orig/drivers/lirc_i2c/lirc_i2c.c lirc-0.9.0/drivers/lirc_i2c/lirc_i2c.c
--- lirc-0.9.0.orig/drivers/lirc_i2c/lirc_i2c.c 2011-03-25 23:28:18.000000000 +0100
+++ lirc-0.9.0/drivers/lirc_i2c/lirc_i2c.c 2011-08-19 16:37:05.944381335 +0200
@@ -555,8 +555,8 @@
kfree(ir);
return -EINVAL;
}
- printk(KERN_INFO "lirc_i2c: chip 0x%x found @ 0x%02x (%s)\n",
- adap->id, addr, ir->c.name);
+ printk(KERN_INFO "lirc_i2c: chip found @ 0x%02x (%s)\n",
+ addr, ir->c.name);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
/* register device */
diff -ru lirc-0.9.0.orig/drivers/lirc_wpc8769l/lirc_wpc8769l.c lirc-0.9.0/drivers/lirc_wpc8769l/lirc_wpc8769l.c
--- lirc-0.9.0.orig/drivers/lirc_wpc8769l/lirc_wpc8769l.c 2011-03-25 23:28:18.000000000 +0100
+++ lirc-0.9.0/drivers/lirc_wpc8769l/lirc_wpc8769l.c 2011-08-19 16:39:25.627918139 +0200
@@ -361,14 +361,14 @@
size = count << 3;
ldata = (unsigned long *) data_buf;
- next_one = generic_find_next_le_bit(ldata, size, 0);
+ next_one = find_next_zero_bit_le(ldata, size, 0);
if (next_one > 0)
put_pulse_bit(next_one
* WPC8769L_USECS_PER_BIT);
while (next_one < size) {
- next_zero = generic_find_next_zero_le_bit(ldata,
+ next_zero = find_next_zero_bit_le(ldata,
size, next_one + 1);
put_space_bit(
@@ -376,7 +376,7 @@
* WPC8769L_USECS_PER_BIT);
if (next_zero < size) {
- next_one = generic_find_next_le_bit(ldata,
+ next_one = find_next_zero_bit_le(ldata,
size, next_zero + 1);
put_pulse_bit(

226
lirc.spec Normal file
View File

@ -0,0 +1,226 @@
# DISTCC disabled by default for this package
%define USE_DISTCC 0
%define kernel_majversion %(echo %KERNEL_VER | cut -d. -f1-2)
%define kernel_version %(echo %KERNEL_VER | cut -d. -f1-3)
%define BUILD_CC %{_target_platform}-gcc
%define BUILD_CXX %{_target_platform}-g++
%if %{USE_DISTCC}
%define DISTCC_CC ccache distcc %{?BUILD_CC}
%define DISTCC_CXX ccache distcc %{?BUILD_CXX}
%define BUILD_OPTS CC="%{DISTCC_CC}" CXX="%{DISTCC_CXX}" -j12
%else
%define BUILD_OPTS CC="%{BUILD_CC}" CXX="%{BUILD_CXX}" %{_smp_mflags}
%endif
%if "%{?KERNEL_TARGET}" == ""
# build a mamba kernel by default
%define KERNEL_TARGET mamba
%else
%define KERNEL_TARGET_APPEND -%{KERNEL_TARGET}
%endif
%if "%{?KERNEL_VER}" == ""
%define KERNEL_VER %(uname -r | sed "s|\\([0-9.]*\\).*|\\1|" )
%endif
Name: lirc
Version: 0.9.0
Epoch: 1
Release: 9mamba
Summary: A package that allows you to decode and send infra-red signals
Group: System/Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.lirc.org/
Source: http://download.sourceforge.net/sourceforge/lirc/lirc-%{version}.tar.bz2
Patch0: %{name}-0.8.5-parallel_forcesmp.patch
Patch1: %{name}-0.8.2-macmini.patch
Patch2: kernel-2.6.23-lirc_bttv.patch
Patch3: %{name}-0.8.3pre1-disable_portaudio.patch
Patch4: %{name}-0.8.6-kernel-2.6.33.patch
Patch5: %{name}-0.8.6-i2c.patch
Patch6: %{name}-0.9.0-kernel-2.6.39.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libICE-devel
BuildRequires: libpthread-stubs-devel
BuildRequires: libSM-devel
BuildRequires: libuuid-devel
BuildRequires: libX11-devel
BuildRequires: libXau-devel
BuildRequires: libxcb-devel
BuildRequires: libXdmcp-devel
## AUTOBUILDREQ-END
BuildRequires: help2man >= 1.36.3
#BuildRequires: kernel-%{KERNEL_TARGET}-headers >= %{kernel_version}
#BuildRequires: kernel-%{KERNEL_TARGET}-headers <= %{kernel_version}.255
#Requires: kernellirc
## FIXME: lirc has portaudio v.18 support but system has 19, patch needed
#BuildConflicts: libportaudio-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.
%package devel
Summary: Devel package for %{name}
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}
%description devel
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.
This package contains static libraries and header files need for development.
%package -n kernel-%{KERNEL_TARGET}-lirc
Summary: Lirc remote control drivers for the %{kernel_ver}%{KERNEL_TARGET} kernel
Group: System/Kernel and Hardware/Drivers
Requires(pre): kernel-%{KERNEL_TARGET} >= %{kernel_version}
Requires(pre): kernel-%{KERNEL_TARGET} <= %{kernel_version}.255
Requires: module-init-tools
Provides: kernellirc
## KERNELOBSOLETES-BEGIN 3.4
Obsoletes: kernel-%{KERNEL_TARGET}-lirc = 1:0.9.0-8mamba
## KERNELOBSOLETES-END
%description -n kernel-%{KERNEL_TARGET}-lirc
Lirc remote control drivers for the %{kernel_ver}%{KERNEL_TARGET} kernel.
%prep
%setup -q
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p0
#%patch5 -p0
%patch6 -p1
%build
%configure \
--with-driver=none
# --with-driver=all
# --with-kerneldir=/usr/src/linux-%{KERNEL_VER}%{KERNEL_TARGET} \
# --with-moduledir=/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/misc
%make
#make -C drivers %{BUILD_OPTS} -j1
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
sed -i "s|/bin/mknod|/bin/true|" drivers/Makefile drivers/*/Makefile
sed -i "s|/sbin/depmod|/bin/true|" drivers/Makefile drivers/*/Makefile
install -d %{buildroot}%{_sysconfdir}/lirc
cp -a remotes/* %{buildroot}%{_sysconfdir}/lirc
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/lirc
%{_sysconfdir}/lirc/*
%{_bindir}/*
%{_libdir}/liblirc_client.so.*
%{_sbindir}/lircd
%{_sbindir}/lircmd
%{_mandir}/man1/ircat.1.gz
%{_mandir}/man1/irexec.1.gz
%{_mandir}/man1/irpty.1.gz
%{_mandir}/man1/irrecord.1.gz
%{_mandir}/man1/irsend.1.gz
%{_mandir}/man1/irw.1.gz
%{_mandir}/man1/irxevent.1.gz
%{_mandir}/man1/lircrcd.1.gz
%{_mandir}/man1/mode2.1.gz
%{_mandir}/man1/smode2.1.gz
%{_mandir}/man1/xmode2.1.gz
%{_mandir}/man8/lircd.8.gz
%{_mandir}/man8/lircmd.8.gz
/var/run/lirc/lircd
/var/run/lirc/lircm
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%files devel
%defattr(-,root,root)
%{_libdir}/liblirc_client.a
%{_libdir}/liblirc_client.la
%{_libdir}/liblirc_client.so
%dir %{_includedir}/lirc
%{_includedir}/lirc/*.h
#%files -n kernel-%{KERNEL_TARGET}-lirc
#%defattr(-,root,root)
#/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/misc/lirc_*.ko
%changelog
* Fri Jan 04 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-9mamba
- kernel 3.4 rebuild
* Sat Oct 27 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-8mamba
- kernel 3.6 rebuild
* Sat Jun 30 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-7mamba
- automatic update by autodist
* Wed Feb 29 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-6mamba
- rebuilt without kernel modules package (mostly provided in recent kernels)
* Sun Feb 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-5mamba
- automatic update by autodist
* Wed Jan 25 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-4mamba
- automatic update by autodist
* Sun Sep 04 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-3mamba
- automatic update by autodist
* Fri Aug 19 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-2mamba
- automatic update by autodist
* Wed Apr 20 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-1mamba
- update to 0.9.0
* Mon Feb 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.7-2mamba
- automatic update by autodist
* Thu Dec 16 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.7-1mamba
- update to 0.8.7
* Thu Dec 16 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-4mamba
- automatic rebuild by autodist
* Wed Jun 30 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-3mamba
- automatic rebuild by autodist
* Sat Dec 26 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-2mamba
- rebuild for kernel 2.6.31
* Sat Dec 26 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-1mamba
- update to 0.8.6
* Sun Aug 09 2009 Automatic Build System <autodist@mambasoft.it> 0.8.5-1mamba
- automatic update by autodist
* Fri Oct 24 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.4-1mamba
- automatic update by autodist
* Wed Jul 18 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.2-2mamba
- update to 0.8.2
* Sat Mar 24 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.2-1qilnx
- update to version 0.8.2pre1 by autospec
* Fri Sep 22 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.1pre1-2qilnx
- rebuilt for 2.6.18 kernel
* Mon May 15 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.0.cvs20060516-1qilnx
- package created by autospec