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