[MPlayer-users] lirc issue

Banu Cosmin sharpcoder at xnet.ro
Sat Nov 30 22:21:03 CET 2002


	Hi!

	The past few days i have been trying to set up a proper rpm for lirc-0.6.5.
	I have downloaded a package from the net which contained all files from the 
lirc package. I have split up the package in a lirc package and two 
subpackages: lirc-devel and lirc-libs. You can see how they are structured 
from the attached spec file. The thing is: mplayer requests for building the 
presence of lirc-devel package, my question being: what does mplayer need to 
be in that package for building and what does it need in order to run with 
lirc enabled.
	Don't get me wrong. I am not asking this in order to make a usable lirc 
package, because the one i've build behaves gracefully. The thing is that if 
i install lirc, lirc-libs and lirc-devel, when i rebuild the 
mplayer-0.90-pre10 source package, passing it the "--with lirc" option, i 
obtain the mplayer packages which installed do not "react" to the config 
strings passed by lirc (i'm 100% sure that it's working ok). Running it from 
the console i get "Setting up lirc support..." which tells me that it's all 
ok... but nothing happens. I am also providing the .lircrc file, just in 
case.
	btw: i use the serial lirc driver for homebrew receiver; i compile mplayer 
with the default settings, passing it only the "--with lirc" option (however, 
shouldn't mplayer detect it by default?).
	Please tell me if there's lack of information in my post, i will provide it.

	Thanks for the help,
		Cosmin.
-------------- next part --------------
%define		driver	"serial"

%define		ver 0.6.5
%define		rel fr1

Summary: The Linux Infrared Remote Control package.
Name: lirc
Version: %{ver}
Release: %{rel}
License: GPL
Group: System Environment/Daemons
Source0: lirc-%{version}.tar.bz2
Source1: lircd.init
Source2: lircd.logrotate
URL: http://www.lirc.org/
BuildRoot: %{_tmppath}/%{name}-root
PreReq: /sbin/chkconfig, /sbin/service
BuildRequires: perl
Requires: lirc-libs = %{ver}-%{rel}

%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 build the serial driver into
lircd, setting it on the COM1 serial port. However, if this is not your case
you will have to select the appropriate serial port. If you want to compile
it for another type of device, you will need to recompile the source RPM
changing the "--with-driver=" configure option to your device.

If your remote requires special kernel modules to run, I guess you're stuck
having to grab the source (from the source RPM, why not) and install them
from there!

%package devel
Group: Development/Libraries
Summary: Client libraries and header files for LIRC. Used by lirc clients.
Requires: lirc-libs = %{ver}-%{rel}

%description devel
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 build the serial driver into
lircd, setting it on the COM1 serial port. However, if this is not your case
you will have to select the appropriate serial port. If you want to compile
it for another type of device, you will need to recompile the source RPM
changing the "--with-driver=" configure option to your device.

If your remote requires special kernel modules to run, I guess you're stuck
having to grab the source (from the source RPM, why not) and install them
from there!

%package libs
Group: Development/Libraries
Summary: Client libraries and header files for LIRC. Used by lirc clients.

%description libs
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 build the serial driver into
lircd, setting it on the COM1 serial port. However, if this is not your case
you will have to select the appropriate serial port. If you want to compile
it for another type of device, you will need to recompile the source RPM
changing the "--with-driver=" configure option to your device.

If your remote requires special kernel modules to run, I guess you're stuck
having to grab the source (from the source RPM, why not) and install them
from there!

%prep
%setup -q

%build
%configure --with-driver=%{driver} --with-port=0x3f8 --with-irq=4
make %{?_smp_mflags}

%install
[ %{buildroot} != "/" ] && rm -rf %{buildroot}
%makeinstall devdir=%{buildroot}/dev moduledir=%{buildroot}/lib/modules/2.4.18-3/misc
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*
chmod 666 %{buildroot}/dev/lirc*
touch %{buildroot}/etc/lircd.conf
touch %{buildroot}/etc/lircmd.conf

%post
/sbin/depmod -a
/sbin/chkconfig --add lircd

%post libs
# these commands modify the /etc/ld.so.conf by adding, if necessary, "/usr/local/libs"
mv /etc/ld.so.conf /etc/ld.so.conf.old
cat /etc/ld.so.conf.old | grep -vx "/usr/local/lib" > /etc/ld.so.conf
echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig

%preun
if [ $1 = 0 ]; then
	/sbin/service lircd stop > /dev/null 2>&1 || :
	/sbin/chkconfig --del lircd
fi

%postun
if [ "$1" -ge "1" ]; then
	/sbin/service lircd condrestart >/dev/null 2>&1 || :
fi

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO doc remotes
%doc contrib/*.conf	contrib/irman2lirc
%doc contrib/lircrc	contrib/lircs
/etc/init.d/lircd
/etc/logrotate.d/lircd
%ghost %config(noreplace) /etc/lircd.conf
%ghost %config(noreplace) /etc/lircmd.conf
/dev/lirc*
/lib/modules/2.4.18-3/misc/lirc_serial.o
%{_bindir}/*
%{_sbindir}/*

%files devel
%defattr(-, root, root)
%{_includedir}/lirc

%files libs
%defattr(-, root, root)
%{_libdir}/liblirc_client.a
%{_libdir}/liblirc_client.la
%{_libdir}/liblirc_client.so
%{_libdir}/liblirc_client.so.0
%{_libdir}/liblirc_client.so.0.0.0

%changelog
* Thu May  2 2002 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Update to 0.6.5.
- Rebuilt against Red Hat Linux 7.3.
- Added the %{?_smp_mflags} expansion.

* Thu Oct  4 2001 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Initial RPM release.

-------------- next part --------------
begin
    remote = philips
    button = MUTE
    prog   = irexec
    config = amixer set PCM mute > /dev/null; amixer set CD mute > /dev/null;
    config = amixer set PCM unmute > /dev/null; amixer set CD unmute > /dev/null;
end

begin
    remote = philips
    button = VOL.TV-
    prog   = irexec
    config = aumix -v-5
end

begin
    remote = philips
    button = VOL.TV+
    prog   = irexec
    config = aumix -v+5
end

begin
    remote = philips
    button = SURR._OFF
    button = DOLBY_PROLOGIC_3
    button = HALL
    button = STEREO
    prog   = irexec
    config = kdesktop_lock --forcelock
end

begin
    remote = philips
    button = DOLBY_PROLOGIC_3
    button = STEREO
    button = HALL
    button = SURR._OFF
    prog   = irexec
    config = poweroff
end

begin
    remote = philips
    button = SURR._OFF
    button = HALL
    button = STEREO
    button = DOLBY_PROLOGIC_3
    prog   = irexec
    config = reboot
end

begin
    remote = philips
    button = TAPE
    prog   = irexec
    repeat = 0
    mode   = xmms
    flags  = once
    config = xmms > /dev/null&
end

begin
    remote = philips
    button = V-CD
    prog   = irexec
    repeat = 0
    mode   = gmplayer
    flags  = once
    config = gmplayer > /dev/null&
end

begin xmms

  begin
    remote = philips
    button = STANDBY[TAPE]
    prog   = xmms
    repeat = 0
    config = QUIT
    flags  = mode
  end

  begin
    remote = philips
    button = PLAY[TAPE]
    prog   = xmms
    repeat = 0
    config = PLAY
  end

  begin
    remote = philips
    button = PAUSE[TAPE]
    prog   = xmms
    repeat = 0
    config = PAUSE
  end

  begin
    remote = philips
    button = STOP[TAPE]
    prog   = xmms
    repeat = 0
    config = STOP
  end

  begin
    remote = philips
    button = FWD[TAPE]
    prog   = xmms
    repeat = 2
    config = FWD
  end

  begin
    remote = philips
    button = BWD[TAPE]
    prog   = xmms
    repeat = 2
    config = BWD
  end

  begin
    remote = philips
    button = NEXT[TAPE]
    prog   = xmms
    repeat = 0
    config = NEXT
  end

  begin
    remote = philips
    button = PREV[TAPE]
    prog   = xmms
    repeat = 0
    config = PREV
  end

  begin
    remote = philips
    button = VOL_UP
    prog   = xmms
    repeat = 2
    config = VOL_UP 4
  end

  begin
    remote = philips
    button = VOL_DOWN
    prog   = xmms
    repeat = 2
    config = VOL_DOWN 4
  end

  begin
    remote = philips
    button = CENTER_MODE
    prog   = xmms
    repeat = 0
    config = PLAYLIST_CLEAR
  end

  begin
    remote = philips
    button = DECK_A[TAPE]
    prog   = xmms
    repeat = 0
    config = PLAYLIST_ADD /mnt/cdrom
  end

  begin
    remote = philips
    button = DECK_B[TAPE]
    prog   = xmms
    repeat = 0
    config = PLAYLIST_ADD /mnt/g/mp3
  end

end xmms


begin gmplayer

  begin
    remote = philips
    button = STANDBY[V-CD]
    prog   = gmplayer
    repeat = 0
    config = quit
    flags  = mode
  end

  begin
    remote = philips
    button = PLAY[V-CD]
    prog   = gmplayer
    repeat = 0
    config = gui_play
  end

  begin
    remote = philips
    button = STOP[V-CD]
    prog   = gmplayer
    repeat = 0
    config = gui_stop
  end

  begin
    remote = philips
    button = PAUSE[V-CD]
    prog   = gmplayer
    repeat = 0
    config = pause
  end

#  begin
#    remote = philips
#    button = PREV[V-CD]
#    prog   = gmplayer
#    repeat = 0
#    config = 
#  end

#  begin
#    remote = philips
#    button = NEXT[V-CD]
#    prog   = gmplayer
#    repeat = 0
#    config = 
#  end

  begin
    remote = philips
    button = VOL_UP
    prog   = gmplayer
    repeat = 2
    config = volume 1
  end

  begin
    remote = philips
    button = VOL_DOWN
    prog   = gmplayer
    repeat = 2
    config = volume -1
  end

  begin
    remote = philips
    button = BWD[V-CD]
    prog   = gmplayer
    repeat = 2
    config = seek -10
  end

  begin
    remote = philips
    button = FWD[V-CD]
    prog   = gmplayer
    repeat = 2
    config = seek 10
  end

  begin
    remote = philips
    button = DISPLAY[V-CD]
    prog   = gmplayer
    repeat = 0
    config = vo_fullscreen
  end

  begin
    remote = philips
    button = 0[V-CD]
    prog   = gmplayer
    repeat = 0
    config = osd
  end

  begin
    remote = philips
    button = SURR._OFF
    prog   = irxevent
    repeat = 0
    config = Key l CurrentWindow
    config = Key Escape CurrentWindow
  end

  begin
    remote = philips
    button = DELAY
    prog   = irxevent
    repeat = 0
    config = Key Tab CurrentWindow
  end

  begin
    remote = philips
    button = TEST_TONE
    prog   = irxevent
    repeat = 0
    config = Key Return CurrentWindow
  end

  begin
    remote = philips
    button = REAR+
    prog   = irxevent
    repeat = 0
    config = Key Up CurrentWindow
  end

  begin
    remote = philips
    button = REAR-
    prog   = irxevent
    repeat = 0
    config = Key Down CurrentWindow
  end

end gmplayer
-------------- next part --------------


-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.


Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat de virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. Please be aware that there is a risk involved whenever opening e-mail attachments to your computer and that MobiFon is not responsible for any damages caused by viruses.


More information about the MPlayer-users mailing list