lirc/lirc-kernel.spec

85 lines
2.3 KiB
RPMSpec

#
# spec file for package lirc-kernel (Version 0.8.7)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
# icecream 0
Name: lirc-kernel
BuildRequires: kernel-source kernel-syms module-init-tools
License: GPLv2+
Group: System/Kernel
Summary: LIRC kernel modules
Version: 0.8.7
Release: 1
Source0: http://downloads.sourceforge.net/project/lirc/LIRC/%version/lirc-%version%{?snapshot:-%snapshot}.tar.bz2
Source1: Makefile.module
Source2: Makefile.modsub
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: s390 s390x
%suse_kernel_module_package -n lirc kdump um debug
%description
LIRC kernel modules
%package -n lirc-KMP
License: GPLv2+
Summary: LIRC kernel modules
Group: System/Kernel
Recommends: lirc
%description -n lirc-KMP
LIRC kernel modules are required to support certain hardware such as
receivers for the serial port.
%prep
%setup -q -n lirc-%{version}%{?snapshot:-%snapshot}
autoreconf -f -i
PYTHON=/usr/bin/python \
./configure --with-driver=all
cp -a drivers source
find source -name 'Makefile*'|xargs rm
ln -s . source/drivers
for i in source/lirc_*; do
cp %{SOURCE2} $i/Makefile
done
cp %{SOURCE1} source/Makefile
mkdir obj
%build
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -r source obj/$flavor
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
M=$PWD/obj/$flavor
done
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
M=$PWD/obj/$flavor
done
%changelog