packages_10.03.2/lcd4linux: fix a typo in package Makefile (backport of r30379)
[openwrt/svn-archive/archive.git] / utils / lcd4linux / Makefile
1 #
2 # Copyright (C) 2007-2011 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:=1159
12 PKG_VERSION:=r$(PKG_REV)
13 PKG_RELEASE:=3.2
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 LCD4LINUX_DRIVERS:= \
22 BeckmannEgle \
23 BWCT \
24 CrystalFontz \
25 Curses \
26 Cwlinux \
27 D4D \
28 EA232graphic \
29 G15 \
30 GLCD2USB \
31 IRLCD \
32 $(if $(CONFIG_BROKEN),HD44780) \
33 $(if $(CONFIG_BROKEN),HD44780-I2C) \
34 LCD2USB \
35 $(if $(CONFIG_BROKEN),LCDLinux) \
36 LCDTerm \
37 LEDMatrix \
38 LPH7508 \
39 $(if $(CONFIG_BROKEN),LUIse) \
40 LW_ABP \
41 M50530 \
42 MatrixOrbital \
43 MatrixOrbitalGX \
44 MilfordInstruments \
45 Newhaven \
46 Noritake \
47 NULL \
48 Pertelian \
49 PHAnderson \
50 PICGraphic \
51 picoLCD \
52 picoLCDGraphic \
53 PNG \
54 PPM \
55 $(if $(CONFIG_TARGET_rb532),RouterBoard) \
56 serdisplib \
57 ShuttleVFD \
58 SimpleLCD \
59 st2205 \
60 T6963 \
61 Trefon \
62 USBHUB \
63 USBLCD \
64 VNC \
65 WincorNixdorf \
66 # ULA200 \
67 # X11 \
68
69 LCD4LINUX_PLUGINS:= \
70 apm \
71 asterisk \
72 button_exec \
73 cpuinfo \
74 dbus \
75 diskstats \
76 dvb \
77 event \
78 exec \
79 fifo \
80 file \
81 gps \
82 hddtemp \
83 huawei \
84 i2c_sensors \
85 iconv \
86 imon \
87 isdn \
88 kvv \
89 loadavg \
90 netdev \
91 netinfo \
92 meminfo \
93 mpd \
94 mpris_dbus \
95 mysql \
96 netdev \
97 pop3 \
98 ppp \
99 proc_stat \
100 qnaplog \
101 seti \
102 statfs \
103 uname \
104 uptime \
105 w1retap \
106 $(if $(CONFIG_BROKEN),wireless) \
107 xmms \
108 # python \
109
110 PKG_FIXUP:=libtool
111 PKG_INSTALL:=1
112
113 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
114
115 PKG_BUILD_DEPENDS:= \
116 libdbus \
117 libgd \
118 libmpdclient \
119 libmysqlclient \
120 libncurses \
121 libnmeap \
122 libsqlite3 \
123 libvncserver \
124 ppp \
125 serdisplib \
126 st2205tool \
127 # libftdi \
128 # libX11 \
129 # python \
130
131 PKG_CONFIG_DEPENDS:= \
132 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \
133 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \
134
135 include $(INCLUDE_DIR)/package.mk
136 include $(INCLUDE_DIR)/nls.mk
137
138 define Package/lcd4linux/Default
139 SECTION:=utils
140 CATEGORY:=Utilities
141 MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
142 TITLE:=LCD display utility
143 URL:=http://lcd4linux.bulix.org/
144 endef
145
146 define Package/lcd4linux/Default/description
147 LCD4Linux is a small program that grabs information from the kernel and
148 some subsystems and displays it on an external liquid crystal display.
149 endef
150
151
152 define Package/lcd4linux-custom
153 $(call Package/lcd4linux/Default)
154 DEPENDS:= \
155 +LCD4LINUX_CUSTOM_NEEDS_libdbus:libdbus \
156 +LCD4LINUX_CUSTOM_NEEDS_libgd:libgd \
157 $(if $(ICONV_FULL),+LCD4LINUX_CUSTOM_NEEDS_libiconv:libiconv-full) \
158 +LCD4LINUX_CUSTOM_NEEDS_libmpdclient:libmpdclient \
159 +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient:libmysqlclient \
160 +LCD4LINUX_CUSTOM_NEEDS_libncurses:libncurses \
161 +LCD4LINUX_CUSTOM_NEEDS_libsqlite3:libsqlite3 \
162 +LCD4LINUX_CUSTOM_NEEDS_libusb:libusb \
163 +LCD4LINUX_CUSTOM_NEEDS_libvncserver:libvncserver \
164 +LCD4LINUX_CUSTOM_NEEDS_serdisplib:serdisplib \
165 +LCD4LINUX_CUSTOM_NEEDS_st2205tool:st2205tool \
166 # +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \
167 # +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \
168 # +LCD4LINUX_CUSTOM_NEEDS_python:python
169 MENU:=1
170 PROVIDES:=lcd4linux
171 VARIANT=custom
172 endef
173
174 define Package/lcd4linux-custom/config
175 source "$(SOURCE)/Config.in"
176 endef
177
178 define Package/lcd4linux-custom/description
179 $(call Package/lcd4linux/Default/description)
180 .
181 This package contains a customized version of LCD4Linux.
182 endef
183
184
185 define Package/lcd4linux-full
186 $(call Package/lcd4linux/Default)
187 DEPENDS:= @DEVEL \
188 +libdbus \
189 +libgd \
190 $(if $(ICONV_FULL),+libiconv-full) \
191 +libmpdclient \
192 +libmysqlclient \
193 +libncurses \
194 +libsqlite3 \
195 +libusb \
196 +libvncserver \
197 +serdisplib \
198 +st2205tool \
199 # +libftdi \
200 # +libX11 \
201 # +python
202 PROVIDES:=lcd4linux
203 VARIANT=full
204 endef
205
206 define Package/lcd4linux-full/description
207 $(call Package/lcd4linux/Default/description)
208 .
209 This package contains a version of LCD4Linux built with all supported
210 drivers and plugins.
211 endef
212
213
214 CONFIGURE_ARGS+= \
215 --disable-rpath \
216
217 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
218
219 ifeq ($(BUILD_VARIANT),custom)
220
221 LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
222 $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
223 ))
224 ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
225 LCD4LINUX_CUSTOM_DRIVERS:=Sample
226 endif
227
228 LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
229 $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
230 ))
231 ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
232 LCD4LINUX_CUSTOM_PLUGINS:=sample
233 endif
234
235 CONFIGURE_ARGS+= \
236 --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
237 --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
238
239 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
240 CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
241 else
242 CONFIGURE_ARGS+= --without-libiconv-prefix
243 endif
244
245 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
246 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
247 endif
248
249 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
250 # CONFIGURE_ARGS+= --with-python
251 # else
252 CONFIGURE_ARGS+= --without-python
253 # endif
254
255 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
256 # CONFIGURE_ARGS+= --with-x
257 # else
258 CONFIGURE_ARGS+= --without-x
259 # endif
260
261 endif
262
263 ifeq ($(BUILD_VARIANT),full)
264
265 LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
266 $(c) \
267 ))
268
269 LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
270 $(c) \
271 ))
272
273 CONFIGURE_ARGS+= \
274 --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
275 --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
276 --with-libiconv-prefix="$(ICONV_PREFIX)" \
277 --without-python \
278 --without-x \
279
280 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
281
282 endif
283
284
285 define Package/lcd4linux/conffiles
286 /etc/lcd4linux.conf
287 endef
288
289 define Package/lcd4linux/install
290 $(INSTALL_DIR) $(1)/usr/bin
291 $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
292 $(INSTALL_DIR) $(1)/etc
293 $(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf
294 $(INSTALL_DIR) $(1)/etc/init.d
295 $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
296 $(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
297 -e "s|^\(Layout 'TestLayer'\)|#\1|g" \
298 -e "s|^#\(Display 'Image'\)|\1|g" \
299 -e "s|^#\(Layout 'Default'\)|\1|g" \
300 $(1)/etc/lcd4linux.conf
301 endef
302
303 Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
304 Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
305
306 Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
307 Package/lcd4linux-full/install = $(Package/lcd4linux/install)
308
309 $(eval $(call BuildPackage,lcd4linux-custom))
310 $(eval $(call BuildPackage,lcd4linux-full))