[Package] lcd4linux: update to r1159. Fixes #8897
[openwrt/svn-archive/archive.git] / utils / lcd4linux / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=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 PKG_BUILD_DEPENDS:= \
25 libdbus \
26 libgd \
27 libmysqlclient \
28 libncurses \
29 libnmeap \
30 libsqlite3 \
31 libvncserver \
32 ppp \
33 serdisplib \
34 st2205tool \
35 # libftdi \
36 # libmpdclient \
37 # libX11 \
38 # python \
39
40 include $(INCLUDE_DIR)/package.mk
41 include $(INCLUDE_DIR)/nls.mk
42
43 define Package/lcd4linux
44 SECTION:=utils
45 CATEGORY:=Utilities
46 DEPENDS:= \
47 +LCD4LINUX_NEEDS_libdbus:libdbus \
48 +LCD4LINUX_NEEDS_libgd:libgd \
49 $(if $(ICONV_FULL),+LCD4LINUX_NEEDS_libiconv:libiconv-full) \
50 +LCD4LINUX_NEEDS_libmysqlclient:libmysqlclient \
51 +LCD4LINUX_NEEDS_libncurses:libncurses \
52 +LCD4LINUX_NEEDS_libnmeap:libnmeap \
53 +LCD4LINUX_NEEDS_libsqlite3:libsqlite3 \
54 +LCD4LINUX_NEEDS_libusb:libusb \
55 +LCD4LINUX_NEEDS_libvncserver:libvncserver \
56 +LCD4LINUX_NEEDS_serdisplib:serdisplib \
57 +LCD4LINUX_NEEDS_st2205tool:st2205tool \
58 # +LCD4LINUX_NEEDS_libftdi:libftdi \
59 # +LCD4LINUX_NEEDS_libmpdclient:libmpdclient \
60 # +LCD4LINUX_NEEDS_libX11:libX11 \
61 # +LCD4LINUX_NEEDS_python:python
62 TITLE:=LCD display utility
63 URL:=http://lcd4linux.bulix.org/
64 MENU:=1
65 MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
66 endef
67
68 define Package/lcd4linux/config
69 menu "Configuration"
70 depends on PACKAGE_lcd4linux
71 source "$(SOURCE)/Config.in"
72 endmenu
73 endef
74
75 define Package/lcd4linux/description
76 LCD4Linux is a small program that grabs information from the kernel and
77 some subsystems and displays it on an external liquid crystal display.
78 endef
79
80 define Package/lcd4linux/conffiles
81 /etc/lcd4linux.conf
82 endef
83
84 LCD4LINUX_DRIVERS:= \
85 BeckmannEgle \
86 BWCT \
87 CrystalFontz \
88 Curses \
89 Cwlinux \
90 D4D \
91 EA232graphic \
92 G15 \
93 GLCD2USB \
94 IRLCD \
95 HD44780 \
96 HD44780-I2C \
97 LCD2USB \
98 LCDLinux \
99 LCDTerm \
100 LEDMatrix \
101 LPH7508 \
102 LUIse \
103 LW_ABP \
104 M50530 \
105 MatrixOrbital \
106 MatrixOrbitalGX \
107 mdm166a \
108 MilfordInstruments \
109 Newhaven \
110 Noritake \
111 NULL \
112 Pertelian \
113 PHAnderson \
114 PICGraphic \
115 picoLCD \
116 picoLCDGraphic \
117 PNG \
118 PPM \
119 RouterBoard \
120 serdisplib \
121 ShuttleVFD \
122 SimpleLCD \
123 st2205 \
124 T6963 \
125 Trefon \
126 ULA200 \
127 USBHUB \
128 USBLCD \
129 VNC \
130 WincorNixdorf \
131 X11 \
132
133 LCD4LINUX_PLUGINS:= \
134 apm \
135 asterisk \
136 button_exec \
137 cpuinfo \
138 dbus \
139 diskstats \
140 dvb \
141 event \
142 exec \
143 fifo \
144 file \
145 gps \
146 hddtemp \
147 huawei \
148 i2c_sensors \
149 iconv \
150 imon \
151 isdn \
152 kvv \
153 loadavg \
154 netdev \
155 netinfo \
156 meminfo \
157 mpd \
158 mpris_dbus \
159 mysql \
160 netdev \
161 pop3 \
162 ppp \
163 proc_stat \
164 python \
165 qnaplog \
166 seti \
167 statfs \
168 uname \
169 uptime \
170 w1retap \
171 wireless \
172 xmms \
173
174 LCD4LINUX_CONFIGURE_DRIVERS:= \
175 $(foreach c, $(LCD4LINUX_DRIVERS), \
176 $(if $(CONFIG_LCD4LINUX_DRV_$(c)),$(c),) \
177 )
178
179 LCD4LINUX_CONFIGURE_PLUGINS:= \
180 $(foreach c, $(LCD4LINUX_PLUGINS), \
181 $(if $(CONFIG_LCD4LINUX_PLUGIN_$(c)),$(c),) \
182 )
183
184 ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER),)
185 LCD4LINUX_CONFIGURE_DRIVERS:=Sample
186 endif
187
188 ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN),)
189 LCD4LINUX_CONFIGURE_PLUGINS:=sample
190 endif
191
192 CONFIGURE_ARGS+= \
193 --disable-rpath \
194 --with-drivers="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \
195 --with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
196
197 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
198
199 ifneq ($(CONFIG_LCD4LINUX_NEEDS_libiconv),)
200 CONFIGURE_ARGS+= \
201 --with-libiconv-prefix="$(ICONV_PREFIX)"
202 else
203 CONFIGURE_ARGS+= \
204 --without-libiconv-prefix
205 endif
206
207 ifneq ($(CONFIG_LCD4LINUX_NEEDS_libmysqlclient),)
208 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
209 endif
210
211 ifneq ($(CONFIG_LCD4LINUX_NEEDS_python),)
212 CONFIGURE_ARGS+= --with-python
213 else
214 CONFIGURE_ARGS+= --without-python
215 endif
216
217 ifneq ($(CONFIG_LCD4LINUX_NEEDS_libX11),)
218 CONFIGURE_ARGS+= --with-x
219 else
220 CONFIGURE_ARGS+= --without-x
221 endif
222
223
224 define Package/lcd4linux/install
225 $(INSTALL_DIR) $(1)/usr/bin
226 $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
227 $(INSTALL_DIR) $(1)/etc
228 $(INSTALL_CONF) ./files/lcd4linux.conf $(1)/etc/
229 $(INSTALL_DIR) $(1)/etc/init.d
230 $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
231 endef
232
233 $(eval $(call BuildPackage,lcd4linux))