rpms/lirc/devel lirc.init, NONE, 1.1 lirc.makedev, NONE, 1.1 lirc.sysconfig, NONE, 1.1 .cvsignore, 1.2, 1.3 lirc.spec, 1.2, 1.3 sources, 1.2, 1.3 lircd.init, 1.1, NONE lircd.logrotate, 1.1, NONE
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Sun Dec 5 23:17:53 UTC 2004
- Previous message (by thread): rpms/bochs/devel bochs-fpu-regparm.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 bochs.spec, 1.3, 1.4 sources, 1.2, 1.3
- Next message (by thread): rpms/perl-Net-IP import.log,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Changeset from: scop
Update of /cvs/extras/rpms/lirc/devel
In directory cvs.fedora.redhat.com:/tmp/cvs-serv17843
Modified Files:
.cvsignore lirc.spec sources
Added Files:
lirc.init lirc.makedev lirc.sysconfig
Removed Files:
lircd.init lircd.logrotate
Log Message:
Update to 0.7.0; major rework of the package.
--- NEW FILE lirc.init ---
#!/bin/sh
#
# lirc Startup script for the Linux Infrared Remote Control daemons
#
# chkconfig: - 90 10
# description: Enables infrared controls through LIRC.
# processname: lircd
# processname: lircmd
# config: /etc/lircd.conf
# config: /etc/lircmd.conf
# pidfile: /var/run/lircd.pid
# Source function library.
. /etc/init.d/functions
exec="/usr/sbin/lircd"
exec2="/usr/sbin/lircmd"
prog=$(basename $exec)
prog2=$(basename $exec2)
[ -e /etc/sysconfig/lirc ] && . /etc/sysconfig/lirc
lockfile=/var/lock/subsys/lirc
start() {
echo -n $"Starting infrared remote control daemon ($prog): "
daemon $exec $LIRCD_OPTIONS
retval=$?
echo
status $prog >/dev/null 2>&1
if [ $? -eq 0 -a "$ENABLE_LIRCMD" = "yes" ] ; then
echo -n $"Starting infrared remote control mouse daemon ($prog2): "
daemon $exec2 $LIRCMD_OPTIONS
retval=$?
echo
fi
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
retval=0
if status $prog2 >/dev/null 2>&1 ; then
echo -n $"Stopping infrared remote control mouse daemon ($prog2): "
killproc $prog2
retval=$?
echo
fi
if [ $retval -eq 0 ] ; then
echo -n $"Stopping infrared remote control daemon ($prog): "
killproc $prog
retval=$?
echo
fi
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
# lircmd doesn't apparently respond to HUP, so if it's running, restart.
if status $prog2 >/dev/null 2>&1 ; then
restart
else
echo -n $"Reloading infrared remote control daemon ($prog): "
killproc $prog -HUP
retval=$?
echo
return $retval
fi
}
case "$1" in
start|stop|restart|reload)
$1
;;
force-reload)
reload || restart
;;
status)
status $prog2
status $prog
;;
try-restart|condrestart)
[ ! -f $lockfile ] || restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
esac
--- NEW FILE lirc.makedev ---
# LIRC, <http://www.lirc.org/>
c $ALLREAD 61 0 1 1 lirc
--- NEW FILE lirc.sysconfig ---
# Note: in addition to these parameters, you need to have working -*- sh -*-
# configuration file for lircd (and lircmd if enabled).
# Options to lircd(8). Typically, at least a remote controller driver
# ("-H foo") needs to be specified here. Run "/usr/sbin/lircd -H help" to get
# a listing of supported drivers.
LIRCD_OPTIONS=""
# If "yes", the init script will try to start lircmd(8) too.
ENABLE_LIRCMD="no"
# Options to lircmd(8).
LIRCMD_OPTIONS=""
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/lirc/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore 8 Nov 2004 04:49:37 -0000 1.2
+++ .cvsignore 5 Dec 2004 23:17:51 -0000 1.3
@@ -1 +1 @@
-lirc-0.6.6.tar.bz2
+lirc-0.7.0.tar.bz2
Index: lirc.spec
===================================================================
RCS file: /cvs/extras/rpms/lirc/devel/lirc.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- lirc.spec 11 Nov 2004 19:13:50 -0000 1.2
+++ lirc.spec 5 Dec 2004 23:17:51 -0000 1.3
@@ -1,119 +1,232 @@
-# $Id$
-# Authority: matthias
-
-# The driver(s) you want to compile in, e.g. "pctv", "serial", "any"
-%define driver "pctv"
-
-# Are we compiling drivers that will need a kernel module too
-# (you'll still need to recompile an entire kernel, keep the sources, then
-# recompile lirc to get the modules...)
-%define kmodule 0
-
-#%%if %{kmodule}
-#%%define kunamer %%(uname -r)
-#%%define kver %%(echo $(uname -r) | sed -e s/smp// -)
-#%%define karch %%(rpm -q --qf '%%%{arch}' kernel-%%{kversion})
-#%%define krelver %%(echo %%{kunamer} | tr -s '-' '_')
-#%%endif
-
-Summary: The Linux Infrared Remote Control package
-Name: lirc
-Version: 0.6.6
-#%%if %{kmodule}
-#Release: fr1_%{krelver}
-#%%else
-Release: 4
-#%%endif
-License: GPL
-Group: System Environment/Daemons
-URL: http://www.lirc.org/
-Source0: http://dl.sf.net/lirc/%{name}-%{version}.tar.bz2
-Source1: lircd.init
-Source2: lircd.logrotate
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-PreReq: /sbin/chkconfig, /sbin/service
-BuildRequires: perl
-#%%if %{kmodule}
-#Requires: kernel = %{kver}
-#BuildRequires: kernel-source = %{kver}
-#%%endif
+# Driver TODO, sometime maybe:
+# - audio (req: portaudio)
+# - caraca (req: caraca_client)
+# - irman: (req: libirman)
+# - drivers that need drivers/media/video/bttv*.h (not in kernel-module-devel)
+# - gpio: flyvideo avermedia avermedia98
+# - i2c: hauppauge
+# Other TODO:
+# - move to -devel (?): irw, *mode2, others?
+# - 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.
+# - kernel modules: Figure out sane permissions for /dev/lirc, use
+# console.perms/udev, general FC3 adjustments.
+
+%{!?kernel: %{expand: %%define kernel %(uname -r)}}
+%define ksrc %{_libdir}/kernel-module-devel/%{kernel}-%{_target_cpu}
+# Kernel module drivers
+%define drivers sir_com3 it87 tekram_bt829 com1 atiusb mceusb lpt1
+
+Name: lirc
+Version: 0.7.0
+Release: 1
+Summary: The Linux Infrared Remote Control package
+
+Group: System Environment/Daemons
+License: GPL
+URL: http://www.lirc.org/
+Source0: http://download.sourceforge.net/lirc/%{name}-%{version}.tar.bz2
+Source1: %{name}.init
+Source2: %{name}.sysconfig
+Source3: %{name}.makedev
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: %{__perl}
+%if 0%{!?_with_kmod:1}
+BuildRequires: alsa-lib-devel XFree86-devel libusb-devel
+BuildConflicts: svgalib-devel
+%endif
+Requires(post): /sbin/chkconfig /sbin/ldconfig
+Requires(preun): /sbin/chkconfig
+Requires(postun): /sbin/ldconfig
%description
LIRC is the Linux Infrared Remote Control package.
-This package features a clean lircd initscript and a logrotate config file.
-The default binary build of this package will only work with the Pinnacle
-PCTV serial remote, if you have a different device, you will probably need
-to recompile the source RPM changing the "--with-driver=" configure option
-to your device.
+%package devel
+Summary: Development files for LIRC
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+%{summary}.
+
+%package -n kernel-module-%{name}-%{kernel}
+Summary: Kernel modules for LIRC
+Group: System Environment/Kernel
+Provides: kernel-module
+Provides: kernel-module-%{name} = %{version}
+%if 0%{?_with_kmod:1}
+BuildRequires: %{ksrc} MAKEDEV
+%endif
+Requires: modutils %{name} = %{version}
+Requires: /boot/vmlinuz-%{kernel}
-If your remote requires special kernel modules to run, I guess you're stuck
-having to recompile a kernel and recompile lirc manually to get the modules!
+%description -n kernel-module-%{name}-%{kernel}
+LIRC kernel modules built for kernel
+%{kernel} (%{_target_cpu}).
%prep
-%setup
+%setup -q
+%{__perl} -pi -e 's|^CFLAGS="-O2 -g -Wall"|CFLAGS="\$CFLAGS -Wall"|' configure
+chmod 644 contrib/*
%build
+%if 0%{?_with_kmod:1}
+for driver in %{drivers} ; do
+ # lpt1 is not smp safe @@@ TODO: verify this?
+ test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue
+ mkdir -p buildroot/"$driver"
+ %configure \
+ --enable-sandboxed \
+ --enable-debug \
+ --disable-dependency-tracking \
+ --with-kerneldir=%{ksrc} \
+ --with-moduledir=/tmp \
+ --with-driver=$driver
+ make %{?_smp_mflags} -C drivers
+ make -C drivers install DESTDIR=$PWD/buildroot/$driver
+done
+%else
%configure \
- --with-driver=%{driver} \
- --disable-manage-devices
-%{__make} %{?_smp_mflags}
+ --with-syslog=LOG_DAEMON \
+ --enable-sandboxed \
+ --enable-debug \
+ --disable-dependency-tracking \
+ --with-driver=any
+make %{?_smp_mflags}
+%endif
%install
-%{__rm} -rf %{buildroot}
-%{__make} install DESTDIR=%{buildroot}
-%{__install} -m 755 -D %{SOURCE1} %{buildroot}/etc/init.d/lircd
-%{__install} -m 644 -D %{SOURCE2} %{buildroot}/etc/logrotate.d/lircd
-%{__perl} -pi -e 's|\@SBINDIR\@|%{_sbindir}|g' %{buildroot}/etc/init.d/lircd
-%{__rm} -f doc/Makefile*
-%{__mkdir_p} %{buildroot}/dev
-%{__ln_s} -f ttyS0 %{buildroot}/dev/lirc
-touch %{buildroot}/etc/lircd.conf
-touch %{buildroot}/etc/lircmd.conf
+rm -rf $RPM_BUILD_ROOT __docs
+
+%if 0%{?_with_kmod:1}
+for driver in %{drivers} ; do
+ # lpt1 is not SMP safe @@@ TODO: verify this?
+ test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue
+ install -dm 755 $RPM_BUILD_ROOT/lib/modules/%{kernel}/updates/lirc
+ # 0755 here to allow stripping, fixed later in %%files
+ install -pm 755 buildroot/$driver/tmp/* \
+ $RPM_BUILD_ROOT/lib/modules/%{kernel}/updates/lirc
+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
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smode2.1* # if no svgalib
+install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/lirc
+%{__perl} -pi -e \
+ 's|/etc/|%{_sysconfdir}/|g ;
+ s|/var/|%{_localstatedir}/|g ;
+ s|/usr/sbin/|%{_sbindir}/|g' \
+ $RPM_BUILD_ROOT%{_initrddir}/lirc
+install -Dpm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/lirc
+mkdir __docs
+cp -pR doc contrib __docs
+cd __docs
+rm -rf doc/Makefile* doc/.libs doc/man* contrib/lirc.* contrib/sendxevent.c
+cd ..
+touch $RPM_BUILD_ROOT%{_sysconfdir}/lirc{d,md}.conf
+install -dm 755 $RPM_BUILD_ROOT/dev
+touch $RPM_BUILD_ROOT/dev/lirc{d,m}
+%endif
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%post
/sbin/ldconfig
-/sbin/chkconfig --add lircd
+/sbin/chkconfig --add lirc
+# Backwards compatibility (init script lircd -> lirc rename):
+if [ $1 -gt 0 -a -x %{_initrddir}/lircd ] ; then
+ %{_initrddir}/lircd status >/dev/null 2>&1
+ ret=$?
+ %{_initrddir}/lircd stop >/dev/null || :
+ /sbin/chkconfig --del lircd || :
+ if [ $ret -eq 0 ] ; then
+ %{_initrddir}/lirc start >/dev/null || :
+ fi
+fi
+
+%post -n kernel-module-%{name}-%{kernel}
+depmod -ae -F /boot/System.map-%{kernel} %{kernel} >/dev/null || :
%preun
-if [ $1 = 0 ]; then
- /sbin/service lircd stop > /dev/null 2>&1 || :
- /sbin/chkconfig --del lircd
+if [ $1 -eq 0 ] ; then
+ %{_initrddir}/lirc stop >/dev/null || :
+ /sbin/chkconfig --del lirc || :
fi
%postun
/sbin/ldconfig
-if [ "$1" -ge "1" ]; then
- /sbin/service lircd condrestart >/dev/null 2>&1 || :
+if [ $1 -gt 0 ] ; then
+ %{_initrddir}/lirc try-restart >/dev/null || :
fi
-%clean
-%{__rm} -rf %{buildroot}
+%postun -n kernel-module-%{name}-%{kernel}
+depmod -ae -F /boot/System.map-%{kernel} %{kernel} >/dev/null || :
+
+%if 0%{!?_with_kmod:1}
%files
-%defattr(-, root, root, 0755)
-%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO doc remotes
-%doc contrib/*.conf contrib/irman2lirc contrib/lircrc contrib/lircs
-/etc/init.d/lircd
-/etc/logrotate.d/lircd
-%ghost %config(noreplace) /etc/lircd.conf
-%ghost %config(noreplace) /etc/lircmd.conf
-%{_bindir}/*
-%{_sbindir}/*
+%defattr(-,root,root,-)
+%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO remotes __docs/*
+%ghost %config(noreplace) %{_sysconfdir}/lirc*d.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/lirc
+%config %{_initrddir}/lirc
+%{_bindir}/ir*
+%{_bindir}/*mode2
+%{_sbindir}/lirc*d
+%{_libdir}/liblirc_client.so.*
+%{_mandir}/man1/ir*.1*
+%{_mandir}/man1/*mode2*.1*
+%{_mandir}/man8/lirc*d.8*
+%ghost /dev/lirc*
+
+%files devel
+%defattr(-,root,root,-)
%{_includedir}/lirc
-%{_libdir}/liblirc_*
-%{_mandir}/man?/*
-%if %{kmodule}
-#/lib/modules/%{kver}/misc/*
-%attr(0644, root, root) %dev(c, 61, 0) /dev/lirc
-%else
-/dev/lirc
+%{_libdir}/liblirc_client.a
+%{_libdir}/liblirc_client.so
+%exclude %{_libdir}/liblirc_client.la
+%endif
+
+%if 0%{?_with_kmod:1}
+%files -n kernel-module-%{name}-%{kernel} -f devices.list
+%defattr(644,root,root,755)
+%config %{_sysconfdir}/makedev.d
+/lib/modules/%{kernel}/updates
%endif
+
%changelog
+* Sun Dec 5 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.7.0-1
+- Update to 0.7.0; major rework of the package:
+- Change default driver to "any".
+- Add -devel subpackage.
+- Improve init script, add %%{_sysconfdir}/sysconfig/lirc for options.
+- Rename init script to "lirc" to follow upstream; the script is not only
+ for lircd, but lircmd as well.
+- Log to syslog instead of separate log file.
+- %%ghost'ify /dev/lirc*.
+- Build kernel modules when rebuilt with "--with kmod". This stuff was mostly
+ borrowed from Axel Thimm's packages, and is not really ready for FC3+ yet.
+- Enable debugging features.
+- Specfile cleanups.
+
* Mon Aug 30 2004 Matthias Saou <http://freshrpms.net/> 0.6.6-3
- Added missing /sbin/ldconfig calls.
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/lirc/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 8 Nov 2004 04:49:37 -0000 1.2
+++ sources 5 Dec 2004 23:17:51 -0000 1.3
@@ -1 +1 @@
-6e7b5ba2fd479961d067730e16df7c54 lirc-0.6.6.tar.bz2
+4fbcc8b0d69ca5ecbdda40576964573f lirc-0.7.0.tar.bz2
--- lircd.init DELETED ---
--- lircd.logrotate DELETED ---
- Previous message (by thread): rpms/bochs/devel bochs-fpu-regparm.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 bochs.spec, 1.3, 1.4 sources, 1.2, 1.3
- Next message (by thread): rpms/perl-Net-IP import.log,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list