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