4663f619b2a3b28f44afff88bdb77d7b901315ca
[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 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 i2c_sensors \
106 iconv \
107 imon \
108 isdn \
109 kvv \
110 loadavg \
111 netdev \
112 netinfo \
113 meminfo \
114 mpd \
115 mpris_dbus \
116 mysql \
117 netdev \
118 pop3 \
119 ppp \
120 proc_stat \
121 python \
122 qnaplog \
123 seti \
124 statfs \
125 uname \
126 uptime \
127 w1retap \
128 wireless \
129 xmms \
130
131 LCD4LINUX_CONFIGURE_DRIVERS:= \
132 $(foreach c, $(LCD4LINUX_DRIVERS), \
133 $(if $(CONFIG_LCD4LINUX_DRV_$(c)),$(c),) \
134 )
135
136 LCD4LINUX_CONFIGURE_PLUGINS:= \
137 $(foreach c, $(LCD4LINUX_PLUGINS), \
138 $(if $(CONFIG_LCD4LINUX_PLUGIN_$(c)),$(c),) \
139 )
140
141 ifneq ($(CONFIG_LCD4LINUX_DRV_PNG),)
142 PKG_BUILD_DEPENDS += libgd
143 endif
144
145 ifneq ($(CONFIG_LCD4LINUX_DRV_PPM),)
146 PKG_BUILD_DEPENDS += libgd
147 endif
148
149 ifneq ($(CONFIG_LCD4LINUX_DRV_G15),)
150 PKG_BUILD_DEPENDS += libgd
151 endif
152
153 ifneq ($(CONFIG_LCD4LINUX_DRV_LPH7508),)
154 PKG_BUILD_DEPENDS += libgd
155 endif
156
157 ifneq ($(CONFIG_LCD4LINUX_DRV_LUIse),)
158 PKG_BUILD_DEPENDS += libgd
159 endif
160
161 ifneq ($(CONFIG_LCD4LINUX_DRV_Noritake),)
162 PKG_BUILD_DEPENDS += libgd
163 endif
164
165 ifneq ($(CONFIG_LCD4LINUX_DRV_serdisplib),)
166 PKG_BUILD_DEPENDS += libgd, serdisplib
167 endif
168
169 ifneq ($(CONFIG_LCD4LINUX_DRV_st2205),)
170 PKG_BUILD_DEPENDS += libgd, st2205tool
171 endif
172
173 ifneq ($(CONFIG_LCD4LINUX_DRV_T6963),)
174 PKG_BUILD_DEPENDS += libgd
175 endif
176
177 ifneq ($(CONFIG_LCD4LINUX_DRV_Curses),)
178 PKG_BUILD_DEPENDS += libncurses
179 endif
180
181 ifneq ($(CONFIG_LCD4LINUX_DRV_VNC),)
182 PKG_BUILD_DEPENDS += libvncserver
183 endif
184
185 ifneq ($(CONFIG_LCD4LINUX_DRV_X11),)
186 PKG_BUILD_DEPENDS += libgd, libX11
187 endif
188
189 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_gps),)
190 PKG_BUILD_DEPENDS += libnmeap
191 endif
192
193 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_iconv),)
194 PKG_BUILD_DEPENDS += libiconv
195 endif
196
197 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_mysql),)
198 PKG_BUILD_DEPENDS += libmysqlclient
199 endif
200
201 # XXX: lcd4linux needs at least one driver and one plugin, if none are selected, build'em all
202 ifeq ($(strip $(LCD4LINUX_CONFIGURE_DRIVERS)),)
203 LCD4LINUX_CONFIGURE_DRIVERS:=all
204 endif
205 ifeq ($(strip $(LCD4LINUX_CONFIGURE_PLUGINS)),)
206 LCD4LINUX_CONFIGURE_PLUGINS:=all
207 endif
208
209 ## TODO PYTHON PLUGIN, DEPENDS on ver >= '2.1.0'
210
211
212 EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include
213 EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
214
215 TARGET_CONFIGURE_OPTS+=\
216 CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
217
218 CONFIGURE_ARGS += \
219 --without-x \
220 --without-python \
221 --disable-rpath \
222 --with-drivers="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \
223 --with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
224
225
226 define Package/lcd4linux/install
227 $(INSTALL_DIR) $(1)/usr/bin
228 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
229 $(INSTALL_DIR) $(1)/etc
230 $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
231 $(INSTALL_DIR) $(1)/etc/init.d
232 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
233 endef
234
235 $(eval $(call BuildPackage,lcd4linux))