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