2 # Copyright (C) 2007-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
12 PKG_VERSION:=r$(PKG_REV)
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)
37 $(if $(CONFIG_BROKEN),HD44780) \
38 $(if $(CONFIG_BROKEN),HD44780-I2C) \
40 $(if $(CONFIG_BROKEN),LCDLinux) \
44 $(if $(CONFIG_BROKEN),LUIse) \
60 $(if $(CONFIG_TARGET_rb532),RouterBoard) \
61 $(if $(CONFIG_BROKEN),SamsungSPF) \
68 $(if $(CONFIG_TARGET_ar71xx),TEW673GRU) \
114 $(if $(CONFIG_BROKEN),wireless) \
118 PKG_FIXUP:=autoreconf
121 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
123 PKG_BUILD_DEPENDS:= \
139 PKG_CONFIG_DEPENDS:= \
140 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \
141 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \
143 include $(INCLUDE_DIR)/package.mk
144 include $(INCLUDE_DIR)/nls.mk
146 define Package/lcd4linux/Default
149 MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
150 TITLE:=LCD display utility
151 URL:=http://lcd4linux.bulix.org/
154 define Package/lcd4linux/Default/description
155 LCD4Linux is a small program that grabs information from the kernel and
156 some subsystems and displays it on an external liquid crystal display.
160 define Package/lcd4linux-custom
161 $(call Package/lcd4linux/Default)
163 +LCD4LINUX_CUSTOM_NEEDS_libdbus:libdbus \
164 +LCD4LINUX_CUSTOM_NEEDS_libdpf:libdpf \
165 +LCD4LINUX_CUSTOM_NEEDS_libgd:libgd \
166 $(if $(ICONV_FULL),+LCD4LINUX_CUSTOM_NEEDS_libiconv:libiconv-full) \
167 +LCD4LINUX_CUSTOM_NEEDS_libjpeg:libjpeg \
168 +LCD4LINUX_CUSTOM_NEEDS_libmpdclient:libmpdclient \
169 +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient:libmysqlclient \
170 +LCD4LINUX_CUSTOM_NEEDS_libncurses:libncurses \
171 +LCD4LINUX_CUSTOM_NEEDS_libsqlite3:libsqlite3 \
172 +LCD4LINUX_CUSTOM_NEEDS_libusb:libusb-compat \
173 +LCD4LINUX_CUSTOM_NEEDS_libvncserver:libvncserver \
174 +LCD4LINUX_CUSTOM_NEEDS_serdisplib:serdisplib \
175 +LCD4LINUX_CUSTOM_NEEDS_st2205tool:st2205tool \
176 # +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \
177 # +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \
178 # +LCD4LINUX_CUSTOM_NEEDS_python:python
184 define Package/lcd4linux-custom/config
185 source "$(SOURCE)/Config.in"
188 define Package/lcd4linux-custom/description
189 $(call Package/lcd4linux/Default/description)
191 This package contains a customized version of LCD4Linux.
195 define Package/lcd4linux-full
196 $(call Package/lcd4linux/Default)
201 $(if $(ICONV_FULL),+libiconv-full) \
217 define Package/lcd4linux-full/description
218 $(call Package/lcd4linux/Default/description)
220 This package contains a version of LCD4Linux built with all supported
228 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
230 ifeq ($(BUILD_VARIANT),custom)
232 LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
233 $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
235 ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
236 LCD4LINUX_CUSTOM_DRIVERS:=Sample
239 LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
240 $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
242 ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
243 LCD4LINUX_CUSTOM_PLUGINS:=sample
247 --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
248 --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
250 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
251 CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
253 CONFIGURE_ARGS+= --without-libiconv-prefix
256 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
257 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
260 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
261 # CONFIGURE_ARGS+= --with-python
263 CONFIGURE_ARGS+= --without-python
266 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
267 # CONFIGURE_ARGS+= --with-x
269 CONFIGURE_ARGS+= --without-x
274 ifeq ($(BUILD_VARIANT),full)
276 LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
280 LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
285 --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
286 --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
287 --with-libiconv-prefix="$(ICONV_PREFIX)" \
291 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
296 define Package/lcd4linux/conffiles
300 define Package/lcd4linux/install
301 $(INSTALL_DIR) $(1)/usr/bin
302 $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
303 $(INSTALL_DIR) $(1)/etc
304 $(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf
305 $(INSTALL_DIR) $(1)/etc/init.d
306 $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
307 $(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
308 -e "s|^\(Layout 'TestLayer'\)|#\1|g" \
309 -e "s|^#\(Display 'Image'\)|\1|g" \
310 -e "s|^#\(Layout 'Default'\)|\1|g" \
311 $(1)/etc/lcd4linux.conf
314 Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
315 Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
317 Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
318 Package/lcd4linux-full/install = $(Package/lcd4linux/install)
320 $(eval $(call BuildPackage,lcd4linux-custom))
321 $(eval $(call BuildPackage,lcd4linux-full))