[package] update lcd4linux to r1116, added huawei module (#7097)
[packages.git] / utils / lcd4linux / Makefile
1 #
2 # Copyright (C) 2007-2009 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
10 PKG_NAME:=lcd4linux
11 PKG_REV:=1116
12 PKG_VERSION:=r$(PKG_REV)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/
17 PKG_SOURCE_SUBDIR:=lcd4linux-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=svn
20
21 PKG_FIXUP:=libtool
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/lcd4linux
27   SECTION:=utils
28   CATEGORY:=Utilities
29   DEPENDS:=+libusb
30   TITLE:=LCD display utility
31   URL:=http://lcd4linux.bulix.org/
32   MENU:=1
33 endef
34
35 define Package/lcd4linux/config
36         menu "Configuration"
37         depends on PACKAGE_lcd4linux
38         source "$(SOURCE)/Config.in"
39         endmenu
40 endef
41
42 define Package/lcd4linux/description
43         LCD4Linux is a small program that grabs information from the kernel and 
44         some subsystems and displays it on an external liquid crystal display.
45 endef
46
47 define Package/lcd4linux/conffiles
48 /etc/lcd4linux.conf
49 endef
50
51 LCD4LINUX_DRIVERS:= \
52         BeckmannEgle \
53         BWCT \
54         CrystalFontz \
55         Curses \
56         Cwlinux \
57         D4D \
58         G15 \
59         GLCD2USB \
60         IRLCD \
61         HD44780 \
62         LCD2USB \
63         LCDLinux \
64         LCDTerm \
65         LPH7508 \
66         LUIse \
67         M50530 \
68         MatrixOrbital \
69         MatrixOrbitalGX \
70         MilfordInstruments \
71         Noritake \
72         NULL \
73         PNG \
74         PPM \
75         Pertelian \
76         PHAnderson \
77         picoLCD \
78         picoLCDGraphic \
79         RouterBoard \
80         serdisplib \
81         ShuttleVFD \
82         SimpleLCD \
83         st2205 \
84         T6963 \
85         Trefon \
86         USBLCD \
87         USBHUB \
88         ULA200 \
89         VNC \
90         WincorNixdorf \
91         X11 \
92
93 LCD4LINUX_PLUGINS:= \
94         apm \
95         asterisk \
96         button_exec \
97         cpuinfo \
98         diskstats \
99         dvb \
100         exec \
101         fifo \
102         file \
103         gps \
104         hddtemp \
105         huawei \
106         i2c_sensors \
107         iconv \
108         imon \
109         isdn \
110         kvv \
111         loadavg \
112         netdev \
113         netinfo \
114         meminfo \
115         mpd \
116         mpris_dbus \
117         mysql \
118         netdev \
119         pop3 \
120         ppp \
121         proc_stat \
122         python \
123         qnaplog \
124         seti \
125         statfs \
126         uname \
127         uptime \
128         w1retap \
129         wireless \
130         xmms \
131
132 LCD4LINUX_CONFIGURE_DRIVERS:= \
133         $(foreach c, $(LCD4LINUX_DRIVERS), \
134             $(if $(CONFIG_LCD4LINUX_DRV_$(c)),$(c),) \
135         )
136
137 LCD4LINUX_CONFIGURE_PLUGINS:= \
138         $(foreach c, $(LCD4LINUX_PLUGINS), \
139             $(if $(CONFIG_LCD4LINUX_PLUGIN_$(c)),$(c),) \
140         )
141
142 ifneq ($(CONFIG_LCD4LINUX_DRV_PNG),)
143 PKG_BUILD_DEPENDS += libgd
144 endif
145
146 ifneq ($(CONFIG_LCD4LINUX_DRV_PPM),)
147 PKG_BUILD_DEPENDS += libgd
148 endif
149
150 ifneq ($(CONFIG_LCD4LINUX_DRV_G15),)
151 PKG_BUILD_DEPENDS += libgd
152 endif
153
154 ifneq ($(CONFIG_LCD4LINUX_DRV_LPH7508),)
155 PKG_BUILD_DEPENDS += libgd
156 endif
157
158 ifneq ($(CONFIG_LCD4LINUX_DRV_LUIse),)
159 PKG_BUILD_DEPENDS += libgd
160 endif
161
162 ifneq ($(CONFIG_LCD4LINUX_DRV_Noritake),)
163 PKG_BUILD_DEPENDS += libgd
164 endif
165
166 ifneq ($(CONFIG_LCD4LINUX_DRV_serdisplib),)
167 PKG_BUILD_DEPENDS += libgd, serdisplib
168 endif
169
170 ifneq ($(CONFIG_LCD4LINUX_DRV_st2205),)
171 PKG_BUILD_DEPENDS += libgd, st2205tool
172 endif
173
174 ifneq ($(CONFIG_LCD4LINUX_DRV_T6963),)
175 PKG_BUILD_DEPENDS += libgd
176 endif
177
178 ifneq ($(CONFIG_LCD4LINUX_DRV_Curses),)
179 PKG_BUILD_DEPENDS += libncurses
180 endif
181
182 ifneq ($(CONFIG_LCD4LINUX_DRV_VNC),)
183 PKG_BUILD_DEPENDS += libvncserver
184 endif
185
186 ifneq ($(CONFIG_LCD4LINUX_DRV_X11),)
187 PKG_BUILD_DEPENDS += libgd, libX11
188 endif
189
190 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_gps),)
191 PKG_BUILD_DEPENDS += libnmeap
192 endif
193
194 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_iconv),)
195 PKG_BUILD_DEPENDS += libiconv
196 endif
197
198 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_mysql),)
199 PKG_BUILD_DEPENDS += libmysqlclient
200 endif
201
202 # XXX: lcd4linux needs at least one driver and one plugin, if none are selected, build'em all
203 ifeq ($(strip $(LCD4LINUX_CONFIGURE_DRIVERS)),)
204   LCD4LINUX_CONFIGURE_DRIVERS:=all
205 endif  
206 ifeq ($(strip $(LCD4LINUX_CONFIGURE_PLUGINS)),)
207   LCD4LINUX_CONFIGURE_PLUGINS:=all
208 endif  
209   
210 ## TODO PYTHON PLUGIN, DEPENDS on ver >= '2.1.0'
211
212
213 EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include
214 EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
215
216 TARGET_CONFIGURE_OPTS+=\
217         CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
218
219 CONFIGURE_ARGS += \
220         --without-x \
221         --without-python \
222         --disable-rpath \
223         --with-drivers="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \
224         --with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
225
226
227 define Package/lcd4linux/install
228         $(INSTALL_DIR) $(1)/usr/bin
229         $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
230         $(INSTALL_DIR) $(1)/etc
231         $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
232         $(INSTALL_DIR) $(1)/etc/init.d
233         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
234 endef
235
236 $(eval $(call BuildPackage,lcd4linux))