6498cb7e0bca3695d2f0e4a801f0750a36f1a84b
[packages.git] / utils / lirc / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 5624 2007-09-04 00:29:07Z Dottout $
8
9 include $(TOPDIR)/rules.mk
10 # we use the $LINUX_DIR variable, which is defined in kernel.mk
11 include $(INCLUDE_DIR)/kernel.mk
12
13 PKG_NAME:=lirc
14 PKG_VERSION:=0.8.3
15 PKG_RELEASE:=1
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_SOURCE_URL:=@SF/${PKG_NAME}
19 PKG_MD5SUM:=8e78eeded7b31e5ad02e328970437c0f
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define  Package/lirc/Default
24     SECTION:=utils
25     CATEGORY:=Utilities
26     URL:=http://lirc.org/
27 endef
28
29 define  Package/lirc
30     $(call Package/lirc/Default)
31     TITLE:=LIRC - Linux Infrared Remote Control
32     DEPENDS:=@!LINUX_2_4
33     MENU:=1
34 endef
35
36 define Package/lirc/description
37   LIRC is a package that allows you to decode and send 
38   infra-red signals of many (but not all) commonly used 
39   remote controls.
40   
41   This package contains only lircd and lircd.conf!
42
43 tested drivers
44 --------------
45 ok:
46 userspace,accent,act200l,act220l,adaptec,alsa_usb,animax,asusdh,
47 atilibusb,atiusb,audio_alsa,breakoutbox,bte,bw6130,cmdir,creative,
48 creative_infracd,devinput,digimatrix,dsp,dvico,ea65,exaudiohauppauge,
49 hauppauge_dvb,hercules_smarttv_stereo,i2cuser,igorplugusb,imon,
50 imon_24g,imon_knob,imon_pad,imon_rsc,irdeo,irdeo_remote,it87,knc_one,
51 leadtek_pvr2000,livedrive_midi,livedrive_seq,logitech,macmini,mceusb,
52 mceusb2,mediafocusI,mouseremote,mouseremote_ps2,mp3anywhere,
53 packard_bell,parallel,pcmak,pcmak_usb,pctv,pixelview_bt878,provideo,
54 realmagic,remotemaster,sasem,sb0540,serial,silitek,sir,streamzap,tekram,
55 tekram_bt829,tira,ttusbir,tuxbox,tvbox,udp,uirt2,uirt2_raw,usb_uirt_raw,
56 usbx,serial
57
58 nok:
59 avermedia,avermedia_vdomate,avermedia98,bestbuy,bestbuy2,chronos,comX,
60 cph06x,flyvideo,gvbctv5pci,irreal,kworld,leadtek_0007,leadtek_0010,lptX,
61 nslu2,pixelview_pak,pixelview_pro,sa1100,
62
63 unknown: 
64 audio (no portaudio), caraca (no caraca package), iguanaIR (missing headers), 
65 irman (no libirman)
66   
67 endef
68
69
70 define  Package/lircdaemonadd
71     $(call Package/lirc/Default)
72     DEPENDS:=lirc
73     TITLE:=Daemon Additional Files
74 endef
75
76 define Package/lircdaemonadd/description
77   Contains those additional daemon-tools:
78    -irrecord
79    -lircmd
80 endef
81
82 define  Package/lirctools
83     $(call Package/lirc/Default)
84     DEPENDS:=lirc
85     TITLE:=LIRC tools
86 endef
87
88 define Package/lirctools/description
89   This package contains those lirc-tools:
90    -ircat:   prints config strings to standard output, can be used to provide remote control input to scripts
91    -irexec:  execute programs according to the pressed remote control buttons
92    -irpty:   pseudo tty driver. Connects to lircd via socket to receive infra-red codes and converts them to key strokes
93    -irsend:  application for sending IR-codes via lirc
94    -irw:     watch the codes as lircd recognize them
95    -lircrcd: daemon that manages current mode for all applications
96    -mode2:   shows the pulse/space length of a remote button
97 endef
98
99 CONFIGURE_ARGS += \
100         --disable-nls \
101         --disable-static \
102         --with-kerneldir="$(LINUX_DIR)" \
103         --with-driver="mceusb2" \
104         --without-x \
105         --with-pic \
106         --with-gnu-ld \
107         --enable-sandboxed \
108
109 define Package/lirc/conffiles
110 /etc/lircd.conf
111 endef
112
113 MAKE_FLAGS += \
114         DESTDIR="$(PKG_INSTALL_DIR)" \
115         ARCH="$(LINUX_KARCH)" \
116         all
117
118 define  Package/lirc/install
119         $(INSTALL_DIR) $(1)/usr/sbin/
120         $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/lircd $(1)/usr/sbin/
121         $(INSTALL_DIR) $(1)/etc
122         $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/lircd.conf $(1)/etc/
123 endef
124 #todo:
125 #       $(CP) $(PKG_BUILD_DIR)/drivers/lirc_dev/lirc_dev.ko
126 #       $(CP) $(PKG_BUILD_DIR)/drivers/lirc_mceusb2/lirc_mceusb2.ko
127 #depends on the selected module
128
129 define  Package/lircdaemonadd/install
130         $(INSTALL_DIR) $(1)/usr/sbin/
131         $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/{irrecord,lircmd} $(1)/usr/sbin/
132 endef
133
134 define  Package/lirctools/install
135         $(INSTALL_DIR) $(1)/usr/sbin/
136         $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irsend $(1)/usr/sbin/
137         $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irw $(1)/usr/sbin/
138         $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mode2 $(1)/usr/sbin/
139 endef
140
141 $(eval $(call BuildPackage,lirc))
142 $(eval $(call BuildPackage,lircdaemonadd))
143 $(eval $(call BuildPackage,lirctools))