rpms/lirc-kmod/devel kmodtool, NONE, 1.1 lirc-kmod-0.8.0-2616.patch, NONE, 1.1 lirc-kmod-0.8.0pre2-gpio-no-bttvp.patch, NONE, 1.1 lirc-kmod.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ville Skytta (scop) fedora-extras-commits at redhat.com
Thu Jan 26 22:35:23 UTC 2006


Author: scop

Update of /cvs/extras/rpms/lirc-kmod/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19529/devel

Modified Files:
	.cvsignore sources 
Added Files:
	kmodtool lirc-kmod-0.8.0-2616.patch 
	lirc-kmod-0.8.0pre2-gpio-no-bttvp.patch lirc-kmod.spec 
Log Message:
auto-import lirc-kmod-0.8.0-1.2.6.15_1.1864_FC5 on branch devel from lirc-kmod-0.8.0-1.2.6.15_1.1864_FC5.src.rpm
Initial import.


--- NEW FILE kmodtool ---
#!/bin/bash

# kmodtool - Helper script for building kernel module RPMs
# Copyright (c) 2003-2006 Ville Skyttä <ville.skytta at iki.fi>,
#                         Thorsten Leemhuis <fedora at leemhuis.info>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

myprog="kmodtool"
myver="0.10.3"
knownvariants='\(BOOT\|\(big\|huge\)mem\|debug\|enterprise\|kdump\|smp\|uml\|xen\(0\|U\|-\(guest\|hypervisor\)\)\)'
kmod_name=
kver=
verrel=
variant=

get_verrel ()
{
  verrel="$(echo "${1-$(uname -r)}" | sed 's/'${knownvariants}'$//')"
}

print_verrel ()
{
  get_verrel $@ || return $?
  echo "${verrel}"
}

get_variant ()
{
  variant="$(echo "${1-$(uname -r)}" | sed 's/^.*'${knownvariants}'$/\1/')"
  [ "${variant}" != "${1-$(uname -r)}" ] || variant='""'
}

print_variant ()
{
  get_variant $@ || return $?
  echo "${variant}"
}


get_rpmtemplate ()
{
    local variant="${1}"
    local dashvariant="${variant:+-${variant}}"
    cat <<EOF
%package       -n kmod-${kmod_name}${dashvariant}
Summary:          ${kmod_name} kernel module(s)
Group:            System Environment/Kernel
Provides:         kernel-module = ${verrel}${variant}
Provides:         kmod-${kmod_name} = %{version}-%{release}
Requires:         kernel${dashvariant}-%{_target_cpu} = ${verrel}
Requires:         ${kmod_name}-kmod-common = %{version}
Requires(post):   /sbin/depmod
Requires(postun): /sbin/depmod
BuildRequires:    kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}
%description   -n kmod-${kmod_name}${dashvariant}
This package provides the ${kmod_name} kernel modules built for the Linux
kernel ${verrel}${variant} for the %{_target_cpu} family of processors.
%post          -n kmod-${kmod_name}${dashvariant}
/sbin/depmod -aeF /boot/System.map-${verrel}${variant} ${verrel}${variant} > /dev/null || :
%postun        -n kmod-${kmod_name}${dashvariant}
/sbin/depmod -aF /boot/System.map-${verrel}${variant} ${verrel}${variant} &> /dev/null || :
%files         -n kmod-${kmod_name}${dashvariant}
%defattr(644,root,root,755)
/lib/modules/${verrel}${variant}/extra/${kmod_name}/

EOF
}

print_rpmtemplate ()
{
  kmod_name="${1}"
  shift
  kver="${1}"
  get_verrel "${1}"
  shift
  if [ -z "${kmod_name}" ] ; then
    echo "Please provide the kmodule-name as first parameter." >&2
    exit 2
  elif [ -z "${kver}" ] ; then
    echo "Please provide the kver as second parameter." >&2
    exit 2
  elif [ -z "${verrel}" ] ; then
    echo "Couldn't find out the verrel." >&2
    exit 2
  fi

  for variant in "$@" ; do
    get_rpmtemplate "${variant}"
  done
}

usage ()
{
  cat <<EOF
You called: ${invocation}

Usage: ${myprog} <command> <option>+
 Commands:
  verrel <uname>                               
    - Get "base" version-release.
  variant <uname>                               
    - Get variant from uname.
  rpmtemplate <mainpgkname> <uname> <variants> 
    - Return a template for
  version  
    - Output version number and exit.
EOF
}

invocation="$(basename ${0}) $@"
while [ "${1}" ] ; do
  case "${1}" in
    verrel)
      shift
      print_verrel $@
      exit $?
      ;;
    variant)
      shift
      print_variant $@
      exit $?
      ;;
    rpmtemplate)
      shift
      print_rpmtemplate "$@"
      exit $?
      ;;
    version)
      echo "${myprog} ${myver}"
      exit 0
      ;;
    *)
      echo "Error: Unknown option '${1}'." >&2
      usage >&2
      exit 2
      ;;
  esac
done

# Local variables:
# mode: sh
# sh-indentation: 2
# indent-tabs-mode: nil
# End:
# ex: ts=2 sw=2 et

lirc-kmod-0.8.0-2616.patch:

--- NEW FILE lirc-kmod-0.8.0-2616.patch ---
Index: drivers/lirc_atiusb/lirc_atiusb.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_atiusb/lirc_atiusb.c,v
retrieving revision 1.51
diff -u -r1.51 lirc_atiusb.c
--- drivers/lirc_atiusb/lirc_atiusb.c	29 Oct 2005 14:18:53 -0000	1.51
+++ drivers/lirc_atiusb/lirc_atiusb.c	21 Jan 2006 21:27:35 -0000
@@ -1180,7 +1180,9 @@
 }
 
 static struct usb_driver usb_remote_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 	.owner =	THIS_MODULE,
+#endif
 	.name =		DRIVER_NAME,
 	.probe =	usb_remote_probe,
 	.disconnect =	usb_remote_disconnect,
Index: drivers/lirc_i2c/lirc_i2c.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_i2c/lirc_i2c.c,v
retrieving revision 1.35
diff -u -r1.35 lirc_i2c.c
--- drivers/lirc_i2c/lirc_i2c.c	20 Oct 2005 18:25:58 -0000	1.35
+++ drivers/lirc_i2c/lirc_i2c.c	21 Jan 2006 21:27:36 -0000
@@ -360,9 +360,18 @@
 static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg);
 
 static struct i2c_driver driver = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+        driver: {
+                 name:  "lirc_i2c",
+        },
+        id:             I2C_DRIVERID_INFRARED,
+#else
         name:           "i2c ir driver",
-        id:             I2C_DRIVERID_EXP3, /* FIXME */
+        id:             I2C_DRIVERID_EXP3,
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
         flags:          I2C_DF_NOTIFY,
+#endif
         attach_adapter: ir_probe,
         detach_client:  ir_detach,
         command:        ir_command,
Index: drivers/lirc_igorplugusb/lirc_igorplugusb.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_igorplugusb/lirc_igorplugusb.c,v
retrieving revision 1.7
diff -u -r1.7 lirc_igorplugusb.c
--- drivers/lirc_igorplugusb/lirc_igorplugusb.c	21 Mar 2005 14:39:38 -0000	1.7
+++ drivers/lirc_igorplugusb/lirc_igorplugusb.c	21 Jan 2006 21:27:36 -0000
@@ -615,7 +615,9 @@
 };
 
 static struct usb_driver usb_remote_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 	.owner =	THIS_MODULE,
+#endif
 	.name =		DRIVER_NAME,
 	.probe =	usb_remote_probe,
 	.disconnect =	usb_remote_disconnect,
Index: drivers/lirc_imon/lirc_imon.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_imon/lirc_imon.c,v
retrieving revision 1.9
diff -u -r1.9 lirc_imon.c
--- drivers/lirc_imon/lirc_imon.c	3 Dec 2005 15:18:07 -0000	1.9
+++ drivers/lirc_imon/lirc_imon.c	21 Jan 2006 21:27:37 -0000
@@ -201,7 +201,9 @@
 
 /* USB Device data */
 static struct usb_driver imon_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 	.owner 		= THIS_MODULE,
+#endif
 	.name 		= MOD_NAME,
 	.probe 		= imon_probe,
 	.disconnect 	= imon_disconnect,
Index: drivers/lirc_mceusb/lirc_mceusb.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_mceusb/lirc_mceusb.c,v
retrieving revision 1.10
diff -u -r1.10 lirc_mceusb.c
--- drivers/lirc_mceusb/lirc_mceusb.c	29 Oct 2005 14:18:53 -0000	1.10
+++ drivers/lirc_mceusb/lirc_mceusb.c	21 Jan 2006 21:27:37 -0000
@@ -222,7 +222,9 @@
 
 /* usb specific object needed to register this driver with the usb subsystem */
 static struct usb_driver mceusb_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 	.owner =	THIS_MODULE,
+#endif
 	.name =		DRIVER_NAME,
 	.probe =	mceusb_probe,
 	.disconnect =	mceusb_disconnect,
Index: drivers/lirc_mceusb2/lirc_mceusb2.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_mceusb2/lirc_mceusb2.c,v
retrieving revision 1.2
diff -u -r1.2 lirc_mceusb2.c
--- drivers/lirc_mceusb2/lirc_mceusb2.c	29 Oct 2005 14:18:53 -0000	1.2
+++ drivers/lirc_mceusb2/lirc_mceusb2.c	21 Jan 2006 21:27:38 -0000
@@ -585,7 +585,9 @@
 }
 
 static struct usb_driver usb_remote_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 	.owner =	THIS_MODULE,
+#endif
 	.name =		DRIVER_NAME,
 	.probe =	usb_remote_probe,
 	.disconnect =	usb_remote_disconnect,
Index: drivers/lirc_sasem/lirc_sasem.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_sasem/lirc_sasem.c,v
retrieving revision 1.12
diff -u -r1.12 lirc_sasem.c
--- drivers/lirc_sasem/lirc_sasem.c	3 Dec 2005 15:18:07 -0000	1.12
+++ drivers/lirc_sasem/lirc_sasem.c	21 Jan 2006 21:27:38 -0000
@@ -189,7 +189,9 @@
 
 /* USB Device data */
 static struct usb_driver sasem_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 	.owner 		= THIS_MODULE,
+#endif
 	.name 		= MOD_NAME,
 	.probe 		= sasem_probe,
 	.disconnect 	= sasem_disconnect,
Index: drivers/lirc_streamzap/lirc_streamzap.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_streamzap/lirc_streamzap.c,v
retrieving revision 1.15
diff -u -r1.15 lirc_streamzap.c
--- drivers/lirc_streamzap/lirc_streamzap.c	6 Jan 2006 07:18:03 -0000	1.15
+++ drivers/lirc_streamzap/lirc_streamzap.c	21 Jan 2006 21:27:39 -0000
@@ -177,7 +177,9 @@
 /* usb specific object needed to register this driver with the usb subsystem */
 
 static struct usb_driver streamzap_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 	.owner =	THIS_MODULE,
+#endif
 	.name =		DRIVER_NAME,
 	.probe =	streamzap_probe,
 	.disconnect =	streamzap_disconnect,

lirc-kmod-0.8.0pre2-gpio-no-bttvp.patch:

--- NEW FILE lirc-kmod-0.8.0pre2-gpio-no-bttvp.patch ---
--- drivers/lirc_gpio/lirc_gpio.c~	2005-04-14 15:04:44.000000000 +0300
+++ drivers/lirc_gpio/lirc_gpio.c	2005-12-28 01:55:23.000000000 +0200
@@ -50,10 +50,9 @@
 #include "../drivers/char/bttvp.h"
 #else
 #include "../drivers/media/video/bttv.h"
-#include "../drivers/media/video/bttvp.h"
 #endif
 
-#if BTTV_VERSION_CODE < KERNEL_VERSION(0,7,45)
+#if defined(BTTV_VERSION_CODE) && BTTV_VERSION_CODE < KERNEL_VERSION(0,7,45)
 #error "*******************************************************"
 #error " Sorry, this driver needs bttv version 0.7.45 or       "
 #error " higher. If you are using the bttv package, copy it to "


--- NEW FILE lirc-kmod.spec ---
# TODO: cmdir: (req: extra hw driver, http://www.innovationone.ca/)

# stuff to be implemented externally:
Source10: kmodtool
%define   kmodtool sh %{SOURCE10}
# end stuff to be ...

                %define kmod_name lirc
                %define kverrel   %(%{kmodtool} verrel  %{?kver} 2>/dev/null)
%{!?kvariants:  %global kvariants %(%{kmodtool} variant %{?kver} 2>/dev/null)}

Name:           %{kmod_name}-kmod
Version:        0.8.0
Release:        1.%(echo %{kverrel} | tr - _)
Summary:        LIRC kernel modules

Group:          System Environment/Kernel
License:        GPL
URL:            http://www.lirc.org/
Source0:        http://download.sf.net/lirc/%{kmod_name}-%{version}.tar.bz2
Patch0:         %{name}-0.8.0pre2-gpio-no-bttvp.patch
Patch1:         %{name}-0.8.0-2616.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
LIRC is a package that allows you to decode and send infra-red and
other signals of many (but not all) commonly used remote controls.
Included applications include daemons which decode the received
signals as well as user space applications which allow controlling a
computer with a remote control.  This package contains additional
kernel modules to support additional remote control units.

# magic hidden here:
%{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}

%prep
# to understand the magic better or to debug it, uncomment this:
#%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null
#sleep 5

%setup -q -c -T -a 0
cd lirc-%{version}*
%patch0 -p0
%patch1 -p0
# *cough*
echo %{kverrel} | grep -q _FC5 && sed -i s/2,6,16/2,6,15/ \
    drivers/lirc_{i2c,imon,sasem,streamzap,*usb*}/lirc_*.c
# http://sf.net/tracker/?func=detail&aid=1406110&group_id=5444&atid=105444
sed -i -e 's/<asm\/segment\.h>/<asm\/uaccess.h>/' drivers/lirc_*/lirc_*.c
cd ..
for kvariant in %{kvariants} ; do
    cp -a lirc-%{version}* _kmod_build_$kvariant
done


%build
for kvariant in %{kvariants}
do
    ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}

    cd _kmod_build_$kvariant

    # cmdir: unknown symbols (cmdir_{read,write}, set_tx_channels), needs
    # additional hw driver from http://www.innovationone.ca/
    nobuild="cmdir"
    # gpio: missing drivers/media/video/bttv.h in kernel-devel
    [ -e $ksrc/drivers/media/video/bttv.h ] || nobuild="$nobuild gpio"
    # parallel: not smp safe
    grep -q ^CONFIG_SMP=y $ksrc/.config && nobuild="$nobuild parallel"
    for drv in $nobuild ; do
        sed -i -e "s/^\\s*(lirc_dev lirc_$drv)//" -e "s/^\\s*lirc_$drv//" \
            configure*
    done
    touch -r aclocal.m4 configure.in # avoid autofoo re-run

    %configure \
        --enable-sandboxed \
        --with-kerneldir=$ksrc \
        --with-moduledir=/lib/modules/%{kverrel}$kvariant/extra/%{kmod_name} \
        --with-driver=all
    make %{?_smp_mflags} -C drivers

    cd ..
done


%install
rm -rf $RPM_BUILD_ROOT
for dir in _kmod_build_* ; do
    make -C $dir/drivers install DESTDIR=$RPM_BUILD_ROOT
done
chmod u+x $RPM_BUILD_ROOT/lib/modules/*/extra/%{kmod_name}/*


%clean
rm -rf $RPM_BUILD_ROOT


%changelog
* Sat Jan 21 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-1
- 0.8.0.
- Hopefully fix lirc_{it87,serial,sir} on PPC, thanks to upstream.
- Hopefully fix i2c and usb drivers with kernel >= 2.6.15.
- Remove "up" == "" support, related cleanups.

* Tue Jan 17 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.9.pre4
- Add RHEL4 compatibility.

* Sat Jan 14 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.8.pre4
- 0.8.0pre4.
- Build all variants in separate dirs again for proper -debuginfo reasons.

* Sun Jan  8 2006 Thorsten Leemhuis <fedora at leemhuis.info> - 0.8.0-0.7.pre3
- Experiment with a new fedora-kmodhelper
- use a different approach for extracting/build/install

* Wed Jan  4 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.6.pre3
- Drop 2.6.15pre support hack.
- Clean up unneeded kernel-devel build dependency.

* Sun Jan  1 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.5.pre3
- 0.8.0pre3.

* Wed Dec 28 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.5.pre2
- Build non-UP modules against the correct source tree, D'oh!
- Patch gpio driver to not require bttvp.h (private), build and ship it
  if bttv.h is in kernel-devel.
- Disable parallel driver with SMP.

* Wed Dec 28 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.4.pre2
- s/kmod-config(lirc)/lirc-kmod-common/

* Tue Dec 27 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.3.pre2
- Split from the main lirc package, adapt to new kmod standard.
- Disable debugging features.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/lirc-kmod/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	26 Jan 2006 22:33:54 -0000	1.1
+++ .cvsignore	26 Jan 2006 22:35:23 -0000	1.2
@@ -0,0 +1 @@
+lirc-0.8.0.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/lirc-kmod/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	26 Jan 2006 22:33:54 -0000	1.1
+++ sources	26 Jan 2006 22:35:23 -0000	1.2
@@ -0,0 +1 @@
+0bf28bf82c7766a462f90927b6bf3af1  lirc-0.8.0.tar.bz2




More information about the scm-commits mailing list