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