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