diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/lirc | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core-testing/lirc')
-rw-r--r-- | abs/core-testing/lirc/PKGBUILD | 50 | ||||
-rw-r--r-- | abs/core-testing/lirc/kernel-2.6.26.patch | 122 | ||||
-rw-r--r-- | abs/core-testing/lirc/lirc.install | 50 |
3 files changed, 222 insertions, 0 deletions
diff --git a/abs/core-testing/lirc/PKGBUILD b/abs/core-testing/lirc/PKGBUILD new file mode 100644 index 0000000..d7fc488 --- /dev/null +++ b/abs/core-testing/lirc/PKGBUILD @@ -0,0 +1,50 @@ +# $Id: PKGBUILD 6055 2008-07-23 02:44:55Z eric $ +# Maintainer: Paul Mattal <paul@archlinux.org> + +pkgname=lirc +pkgver=0.8.3 +pkgrel=1 +_kernver=2.6.26-ARCH +pkgdesc="Linux Infrared Remote Control kernel modules for stock arch kernel" +arch=(i686 x86_64) +url="http://www.lirc.org/" +license=('GPL') +depends=('lirc-utils=0.8.3' 'kernel26>=2.6.26-1' 'kernel26<2.6.27') +makedepends=('help2man') +replaces=('lirc+pctv') +options=('!makeflags') +install=$pkgname.install +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 \ + kernel-2.6.26.patch) +md5sums=('8e78eeded7b31e5ad02e328970437c0f' '1753acd774f50b638e6173d364de53fd') + +build() { + # configure + cd $startdir/src/lirc-$pkgver || return 1 + patch -Np1 -i ../kernel-2.6.26.patch || return 1 + + ./configure --enable-sandboxed --prefix=/usr \ + --with-driver=all --with-kerneldir=/usr/src/linux-${_kernver}/ \ + --with-moduledir=/lib/modules/${_kernver}/kernel/drivers/misc \ + --with-transmitter \ + || return 1 + + # disable parallel and bt829 + # because of incompatibility with smp systems + sed -i -e "s:lirc_parallel::" -e "s:lirc_bt829::" \ + Makefile drivers/Makefile drivers/*/Makefile tools/Makefile \ + || return 1 + # disable lirc_gpio due to brokeness of kernel 2.6.23 + sed -i -e "s:lirc_gpio::" \ + Makefile drivers/Makefile drivers/*/Makefile tools/Makefile \ + || return 1 + + # build + cd drivers || return 1 + make || return 1 + make DESTDIR=$startdir/pkg install || return 1 + + # set the kernel we've built for inside the install script + sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \ + $startdir/lirc.install || return 1 +} diff --git a/abs/core-testing/lirc/kernel-2.6.26.patch b/abs/core-testing/lirc/kernel-2.6.26.patch new file mode 100644 index 0000000..74bb986 --- /dev/null +++ b/abs/core-testing/lirc/kernel-2.6.26.patch @@ -0,0 +1,122 @@ +--- a/drivers/kcompat.h 2008-01-13 11:26:28.000000000 +0100 ++++ b/drivers/kcompat.h 2008-05-14 18:37:49.000000000 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: kcompat.h,v 5.34 2008/01/13 10:26:28 lirc Exp $ */ ++/* $Id: kcompat.h,v 5.36 2008/05/14 16:37:49 lirc Exp $ */ + + #ifndef _KCOMPAT_H + #define _KCOMPAT_H +@@ -36,10 +36,10 @@ + class_simple_destroy(cls); + } + +-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \ +- class_simple_device_add(cs, dev, device, fmt, ## args) ++#define lirc_device_create(cs, parent, dev, fmt, args...) \ ++ class_simple_device_add(cs, dev, parent, fmt, ## args) + +-static inline void class_device_destroy(lirc_class_t *cls, dev_t devt) ++static inline void lirc_device_destroy(lirc_class_t *cls, dev_t devt) + { + class_simple_device_remove(devt); + } +@@ -48,20 +48,40 @@ + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15) + +-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \ +- class_device_create(cs, dev, device, fmt, ## args) ++#define lirc_device_create(cs, parent, dev, fmt, args...) \ ++ class_device_create(cs, dev, parent, fmt, ## args) + + #else /* >= 2.6.15 */ + +-#define lirc_class_device_create class_device_create ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) ++ ++#define lirc_device_create(cs, parent, dev, fmt, args...) \ ++ class_device_create(cs, NULL, dev, parent, fmt, ## args) ++ ++#else /* >= 2.6.26 */ ++ ++#define lirc_device_create device_create ++ ++#endif /* >= 2.6.26 */ ++ + #define LIRC_DEVFS_PREFIX + +-#endif ++#endif /* >= 2.6.15 */ + + typedef struct class lirc_class_t; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) ++ ++#define lirc_device_destroy class_device_destroy ++ ++#else ++ ++#define lirc_device_destroy device_destroy ++ + #endif + ++#endif /* >= 2.6.13 */ ++ + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) + #define LIRC_HAVE_DEVFS + #define LIRC_HAVE_DEVFS_24 +@@ -133,8 +153,8 @@ + #ifndef LIRC_HAVE_SYSFS + #define class_destroy(x) do { } while (0) + #define class_create(x, y) NULL +-#define class_device_destroy(x, y) do { } while (0) +-#define lirc_class_device_create(x, y, z, xx, yy, zz) 0 ++#define lirc_class_destroy(x, y) do { } while (0) ++#define lirc_class_create(x, y, z, xx, yy, zz) 0 + #define IS_ERR(x) 0 + typedef struct class_simple + { +--- a/drivers/lirc_dev/lirc_dev.c 2008-01-13 11:45:02.000000000 +0100 ++++ b/drivers/lirc_dev/lirc_dev.c 2008-05-14 18:37:49.000000000 +0200 +@@ -17,7 +17,7 @@ + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * +- * $Id: lirc_dev.c,v 1.56 2008/01/13 10:45:02 lirc Exp $ ++ * $Id: lirc_dev.c,v 1.58 2008/05/14 16:37:49 lirc Exp $ + * + */ + +@@ -145,7 +145,8 @@ + #ifdef LIRC_HAVE_DEVFS_26 + devfs_remove(DEV_LIRC "/%u", ir->p.minor); + #endif +- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); ++ lirc_device_destroy(lirc_class, ++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); + + if (ir->buf != ir->p.rbuf) { + lirc_buffer_free(ir->buf); +@@ -400,9 +401,9 @@ + S_IFCHR|S_IRUSR|S_IWUSR, + DEV_LIRC "/%u", ir->p.minor); + #endif +- (void) lirc_class_device_create(lirc_class, NULL, +- MKDEV(IRCTL_DEV_MAJOR, ir->p.minor), +- ir->p.dev, "lirc%u", ir->p.minor); ++ (void) lirc_device_create(lirc_class, ir->p.dev, ++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor), ++ "lirc%u", ir->p.minor); + + if (p->sample_rate || p->get_queue) { + /* try to fire up polling thread */ +@@ -441,7 +442,8 @@ + return minor; + + out_sysfs: +- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); ++ lirc_device_destroy(lirc_class, ++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); + #ifdef LIRC_HAVE_DEVFS_24 + devfs_unregister(ir->devfs_handle); + #endif diff --git a/abs/core-testing/lirc/lirc.install b/abs/core-testing/lirc/lirc.install new file mode 100644 index 0000000..704c341 --- /dev/null +++ b/abs/core-testing/lirc/lirc.install @@ -0,0 +1,50 @@ +# This is a default template for a post-install scriptlet. You can +# remove any functions you don't need (and this header). + +# arg 1: the new package version +pre_install() { + /bin/true +} + +# arg 1: the new package version +post_install() { + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + KERNEL_VERSION=2.6.26-ARCH + depmod -v $KERNEL_VERSION > /dev/null 2>&1 + /bin/true +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + /bin/true +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + KERNEL_VERSION=2.6.26-ARCH + depmod -v $KERNEL_VERSION > /dev/null 2>&1 + /bin/true +} + +# arg 1: the old package version +pre_remove() { + /bin/true +} + +# arg 1: the old package version +post_remove() { + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + KERNEL_VERSION=2.6.26-ARCH + depmod -v $KERNEL_VERSION > /dev/null 2>&1 + /bin/true +} + +op=$1 +shift +$op $* |