Kernel module build improvements, disabled by default and possibly

incomplete.
epel8
Ville Skyttä 20 years ago
parent c88c456a33
commit 5580f8470a

@ -1,3 +0,0 @@
# LIRC, <http://www.lirc.org/>
c $ALLREAD 61 0 1 1 lirc

@ -2,24 +2,24 @@
# - audio (req: portaudio) # - audio (req: portaudio)
# - caraca (req: caraca_client) # - caraca (req: caraca_client)
# - irman: (req: libirman) # - irman: (req: libirman)
# - drivers that need drivers/media/video/bttv*.h (not in kernel-module-devel) # - drivers that need drivers/media/video/bttv*.h (not in kernel-devel)
# - gpio: flyvideo avermedia avermedia98 # - gpio: avermedia avermedia98 flyvideo
# - i2c: hauppauge
# Other TODO: # Other TODO:
# - move to -devel (?): irw, *mode2, others? # - move to -devel (?): irw, *mode2, others?
# - don't run as root and/or create dedicated group, reduce fifo permissions? # - don't run as root and/or create dedicated group, reduce fifo permissions?
# - Fixup /etc/lirc(m)d.conf %%ghost'ification, existence after erase etc. # - Fixup /etc/lirc(m)d.conf %%ghost'ification, existence after erase etc.
# - kernel modules: Figure out sane permissions for /dev/lirc, use # - Verify that the kernel modules work and correct /dev entries get created
# console.perms/udev, general FC3 adjustments. # automagically with proper permissions etc.
%{!?kernel: %{expand: %%define kernel %(uname -r)}} %{!?kernel: %{expand: %%define kernel %(uname -r)}}
%define ksrc %{_libdir}/kernel-module-devel/%{kernel}-%{_target_cpu} %define ksrc %{_usrsrc}/kernels/%{kernel}-%{_target_cpu}
# Kernel module drivers # Kernel module drivers
%define drivers sir_com3 it87 tekram_bt829 com1 atiusb mceusb lpt1 %define drivers atiusb com1 hauppauge igorplugusb imon it87 lpt1 mceusb sasem sir_com3 streamzap tekram_bt829
Name: lirc Name: lirc
Version: 0.7.1 Version: 0.7.1
Release: 2 Release: 3
Summary: The Linux Infrared Remote Control package Summary: The Linux Infrared Remote Control package
Group: System Environment/Daemons Group: System Environment/Daemons
@ -28,11 +28,10 @@ URL: http://www.lirc.org/
Source0: http://download.sourceforge.net/lirc/%{name}-%{version}.tar.bz2 Source0: http://download.sourceforge.net/lirc/%{name}-%{version}.tar.bz2
Source1: %{name}.init Source1: %{name}.init
Source2: %{name}.sysconfig Source2: %{name}.sysconfig
Source3: %{name}.makedev
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{__perl} BuildRequires: %{__perl}
%if 0%{!?_with_kmod:1} %if 0%{!?_with_modules:1}
BuildRequires: alsa-lib-devel XFree86-devel libusb-devel BuildRequires: alsa-lib-devel XFree86-devel libusb-devel
BuildConflicts: svgalib-devel BuildConflicts: svgalib-devel
%endif %endif
@ -56,11 +55,13 @@ Summary: Kernel modules for LIRC
Group: System Environment/Kernel Group: System Environment/Kernel
Provides: kernel-module Provides: kernel-module
Provides: kernel-module-%{name} = %{version} Provides: kernel-module-%{name} = %{version}
%if 0%{?_with_kmod:1} %if 0%{?_with_modules:1}
BuildRequires: %{ksrc} MAKEDEV BuildRequires: kernel-devel-%{_target_cpu} = %{kernel}
%endif %endif
Requires: modutils %{name} = %{version} Requires: %{name} = %{version}
Requires: /boot/vmlinuz-%{kernel} Requires: modutils
Requires: kernel-%{_target_cpu} = %{kernel}
Requires: udev
%description -n kernel-module-%{name}-%{kernel} %description -n kernel-module-%{name}-%{kernel}
LIRC kernel modules built for kernel LIRC kernel modules built for kernel
@ -74,7 +75,7 @@ chmod 644 contrib/*
%build %build
%if 0%{?_with_kmod:1} %if 0%{?_with_modules:1}
for driver in %{drivers} ; do for driver in %{drivers} ; do
# lpt1 is not smp safe @@@ TODO: verify this? # lpt1 is not smp safe @@@ TODO: verify this?
test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue
@ -89,6 +90,7 @@ for driver in %{drivers} ; do
make %{?_smp_mflags} -C drivers make %{?_smp_mflags} -C drivers
make -C drivers install DESTDIR=$PWD/buildroot/$driver make -C drivers install DESTDIR=$PWD/buildroot/$driver
done done
%else %else
%configure \ %configure \
--with-syslog=LOG_DAEMON \ --with-syslog=LOG_DAEMON \
@ -103,7 +105,7 @@ make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT __docs rm -rf $RPM_BUILD_ROOT __docs
%if 0%{?_with_kmod:1} %if 0%{?_with_modules:1}
for driver in %{drivers} ; do for driver in %{drivers} ; do
# lpt1 is not SMP safe @@@ TODO: verify this? # lpt1 is not SMP safe @@@ TODO: verify this?
test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue
@ -112,15 +114,6 @@ for driver in %{drivers} ; do
install -pm 755 buildroot/$driver/tmp/* \ install -pm 755 buildroot/$driver/tmp/* \
$RPM_BUILD_ROOT/lib/modules/%{kernel}/updates/lirc $RPM_BUILD_ROOT/lib/modules/%{kernel}/updates/lirc
done done
install -Dpm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d/lirc
cp -p %{_sysconfdir}/makedev.d/00macros $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d
/dev/MAKEDEV -M \
-c $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d \
-d $RPM_BUILD_ROOT/dev lirc \
| sed "s|$RPM_BUILD_ROOT||g" \
| grep -v ' /dev$' \
> devices.list
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d/00macros
%else %else
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
@ -150,7 +143,8 @@ rm -rf $RPM_BUILD_ROOT
%post %post
/sbin/ldconfig /sbin/ldconfig
/sbin/chkconfig --add lirc /sbin/chkconfig --add lirc
# Backwards compatibility (init script lircd -> lirc rename): # Backwards compatibility (init script lircd -> lirc rename),
# drop this in FC5:
if [ $1 -gt 0 -a -x %{_initrddir}/lircd ] ; then if [ $1 -gt 0 -a -x %{_initrddir}/lircd ] ; then
%{_initrddir}/lircd status >/dev/null 2>&1 %{_initrddir}/lircd status >/dev/null 2>&1
ret=$? ret=$?
@ -180,7 +174,7 @@ fi
depmod -ae -F /boot/System.map-%{kernel} %{kernel} >/dev/null || : depmod -ae -F /boot/System.map-%{kernel} %{kernel} >/dev/null || :
%if 0%{!?_with_kmod:1} %if 0%{!?_with_modules:1}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO remotes __docs/* %doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO remotes __docs/*
@ -204,15 +198,19 @@ depmod -ae -F /boot/System.map-%{kernel} %{kernel} >/dev/null || :
%exclude %{_libdir}/liblirc_client.la %exclude %{_libdir}/liblirc_client.la
%endif %endif
%if 0%{?_with_kmod:1} %if 0%{?_with_modules:1}
%files -n kernel-module-%{name}-%{kernel} -f devices.list %files -n kernel-module-%{name}-%{kernel}
%defattr(644,root,root,755) %defattr(644,root,root,755)
%config %{_sysconfdir}/makedev.d
/lib/modules/%{kernel}/updates /lib/modules/%{kernel}/updates
%endif %endif
%changelog %changelog
* Thu May 26 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.1-3
- Adjust kernel module build for FC4 and add hauppauge, igorplugusb, imon,
sasem, and streamzap to the list of modules to build. This stuff is still
disabled by default, rebuild with "--with modules --target $arch" to enable.
* Sun Apr 17 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.1-2 * Sun Apr 17 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.1-2
- 0.7.1. - 0.7.1.

Loading…
Cancel
Save