[package] lcd4linux: update to r1143, patch from Jonathan McCrohan
[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:=1143
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 endef
66
67 define Package/lcd4linux/config
68 menu "Configuration"
69 depends on PACKAGE_lcd4linux
70 source "$(SOURCE)/Config.in"
71 endmenu
72 endef
73
74 define Package/lcd4linux/description
75 LCD4Linux is a small program that grabs information from the kernel and
76 some subsystems and displays it on an external liquid crystal display.
77 endef
78
79 define Package/lcd4linux/conffiles
80 /etc/lcd4linux.conf
81 endef
82
83 LCD4LINUX_DRIVERS:= \
84 BeckmannEgle \
85 BWCT \
86 CrystalFontz \
87 Curses \
88 Cwlinux \
89 D4D \
90 EA232graphic \
91 G15 \
92 GLCD2USB \
93 IRLCD \
94 HD44780 \
95 HD44780-I2C \
96 LCD2USB \
97 LCDLinux \
98 LCDTerm \
99 LEDMatrix \
100 LPH7508 \
101 LUIse \
102 LW_ABP \
103 M50530 \
104 MatrixOrbital \
105 MatrixOrbitalGX \
106 MilfordInstruments \
107 Noritake \
108 NULL \
109 Pertelian \
110 PHAnderson \
111 PICGraphic \
112 picoLCD \
113 picoLCDGraphic \
114 PNG \
115 PPM \
116 RouterBoard \
117 serdisplib \
118 ShuttleVFD \
119 SimpleLCD \
120 st2205 \
121 T6963 \
122 Trefon \
123 ULA200 \
124 USBHUB \
125 USBLCD \
126 VNC \
127 WincorNixdorf \
128 X11 \
129
130 LCD4LINUX_PLUGINS:= \
131 apm \
132 asterisk \
133 button_exec \
134 cpuinfo \
135 dbus \
136 diskstats \
137 dvb \
138 event \
139 exec \
140 fifo \
141 file \
142 gps \
143 hddtemp \
144 huawei \
145 i2c_sensors \
146 iconv \
147 imon \
148 isdn \
149 kvv \
150 loadavg \
151 netdev \
152 netinfo \
153 meminfo \
154 mpd \
155 mpris_dbus \
156 mysql \
157 netdev \
158 pop3 \
159 ppp \
160 proc_stat \
161 python \
162 qnaplog \
163 seti \
164 statfs \
165 uname \
166 uptime \
167 w1retap \
168 wireless \
169 xmms \
170
171 LCD4LINUX_CONFIGURE_DRIVERS:= \
172 $(foreach c, $(LCD4LINUX_DRIVERS), \
173 $(if $(CONFIG_LCD4LINUX_DRV_$(c)),$(c),) \
174 )
175
176 LCD4LINUX_CONFIGURE_PLUGINS:= \
177 $(foreach c, $(LCD4LINUX_PLUGINS), \
178 $(if $(CONFIG_LCD4LINUX_PLUGIN_$(c)),$(c),) \
179 )
180
181 ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER),)
182 LCD4LINUX_CONFIGURE_DRIVERS:=Sample
183 endif
184
185 ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN),)
186 LCD4LINUX_CONFIGURE_PLUGINS:=sample
187 endif
188
189 CONFIGURE_ARGS+= \
190 --disable-rpath \
191 --with-drivers="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \
192 --with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
193
194 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
195
196 ifneq ($(CONFIG_LCD4LINUX_NEEDS_libiconv),)
197 CONFIGURE_ARGS+= \
198 --with-libiconv-prefix="$(ICONV_PREFIX)"
199 else
200 CONFIGURE_ARGS+= \
201 --without-libiconv-prefix
202 endif
203
204 ifneq ($(CONFIG_LCD4LINUX_NEEDS_libmysqlclient),)
205 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
206 endif
207
208 ifneq ($(CONFIG_LCD4LINUX_NEEDS_python),)
209 CONFIGURE_ARGS+= --with-python
210 else
211 CONFIGURE_ARGS+= --without-python
212 endif
213
214 ifneq ($(CONFIG_LCD4LINUX_NEEDS_libX11),)
215 CONFIGURE_ARGS+= --with-x
216 else
217 CONFIGURE_ARGS+= --without-x
218 endif
219
220
221 define Package/lcd4linux/install
222 $(INSTALL_DIR) $(1)/usr/bin
223 $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
224 $(INSTALL_DIR) $(1)/etc
225 $(INSTALL_CONF) ./files/lcd4linux.conf $(1)/etc/
226 $(INSTALL_DIR) $(1)/etc/init.d
227 $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
228 endef
229
230 $(eval $(call BuildPackage,lcd4linux))