2 # Copyright (C) 2007-2011 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
)
32 $(if
$(CONFIG_BROKEN
),HD44780
) \
33 $(if
$(CONFIG_BROKEN
),HD44780-I2C
) \
35 $(if
$(CONFIG_BROKEN
),LCDLinux
) \
39 $(if
$(CONFIG_BROKEN
),LUIse
) \
55 $(if
$(CONFIG_TARGET_rb532
),RouterBoard
) \
106 $(if
$(CONFIG_BROKEN
),wireless
) \
113 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
115 PKG_BUILD_DEPENDS
:= \
131 PKG_CONFIG_DEPENDS
:= \
132 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_
%,$(LCD4LINUX_DRIVERS
)) \
133 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_
%,$(LCD4LINUX_PLUGINS
)) \
135 include $(INCLUDE_DIR
)/package.mk
136 include $(INCLUDE_DIR
)/nls.mk
138 define Package
/lcd4linux
/Default
141 MAINTAINER
:=Jonathan McCrohan
<jmccrohan@gmail.com
>
142 TITLE
:=LCD display utility
143 URL
:=http
://lcd4linux.bulix.org
/
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.
152 define Package
/lcd4linux-custom
153 $(call Package
/lcd4linux
/Default
)
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
174 define Package
/lcd4linux-custom
/config
175 source
"$(SOURCE)/Config.in"
178 define Package
/lcd4linux-custom
/description
179 $(call Package
/lcd4linux
/Default
/description
)
181 This package contains a customized version of LCD4Linux.
185 define Package
/lcd4linux-full
186 $(call Package
/lcd4linux
/Default
)
190 $(if
$(ICONV_FULL
),+libiconv-full
) \
206 define Package
/lcd4linux-full
/description
207 $(call Package
/lcd4linux
/Default
/description
)
209 This package contains a version of LCD4Linux built with
all supported
217 EXTRA_LDFLAGS
+= -Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
219 ifeq ($(BUILD_VARIANT
),custom
)
221 LCD4LINUX_CUSTOM_DRIVERS
:= $(strip $(foreach c
, $(LCD4LINUX_DRIVERS
), \
222 $(if
$(CONFIG_LCD4LINUX_CUSTOM_DRIVER_
$(c
)),$(c
),) \
224 ifeq ($(LCD4LINUX_CUSTOM_DRIVERS
),)
225 LCD4LINUX_CUSTOM_DRIVERS
:=Sample
228 LCD4LINUX_CUSTOM_PLUGINS
:= $(strip $(foreach c
, $(LCD4LINUX_PLUGINS
), \
229 $(if
$(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_
$(c
)),$(c
)) \
231 ifeq ($(LCD4LINUX_CUSTOM_PLUGINS
),)
232 LCD4LINUX_CUSTOM_PLUGINS
:=sample
236 --with-drivers
="$(LCD4LINUX_CUSTOM_DRIVERS)" \
237 --with-plugins
="$(LCD4LINUX_CUSTOM_PLUGINS)" \
239 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv
),)
240 CONFIGURE_ARGS
+= --with-libiconv-prefix
="$(ICONV_PREFIX)"
242 CONFIGURE_ARGS
+= --without-libiconv-prefix
245 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient
),)
246 EXTRA_LDFLAGS
+= -L
$(STAGING_DIR
)/usr
/lib
/mysql
249 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
250 # CONFIGURE_ARGS+= --with-python
252 CONFIGURE_ARGS
+= --without-python
255 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
256 # CONFIGURE_ARGS+= --with-x
258 CONFIGURE_ARGS
+= --without-x
263 ifeq ($(BUILD_VARIANT
),full
)
265 LCD4LINUX_FULL_DRIVERS
:= $(strip $(foreach c
, $(LCD4LINUX_DRIVERS
), \
269 LCD4LINUX_FULL_PLUGINS
:= $(strip $(foreach c
, $(LCD4LINUX_PLUGINS
), \
274 --with-drivers
="$(LCD4LINUX_FULL_DRIVERS)" \
275 --with-plugins
="$(LCD4LINUX_FULL_PLUGINS)" \
276 --with-libiconv-prefix
="$(ICONV_PREFIX)" \
280 EXTRA_LDFLAGS
+= -L
$(STAGING_DIR
)/usr
/lib
/mysql
285 define Package
/lcd4linux
/conffiles
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
303 Package
/lcd4linux-custom
/conffiles
= $(Package
/lcd4linux
/conffiles
)
304 Package
/lcd4linux-custom
/install = $(Package
/lcd4linux
/install)
306 Package
/lcd4linux-full
/conffiles
= $(Package
/lcd4linux
/conffiles
)
307 Package
/lcd4linux-full
/install = $(Package
/lcd4linux
/install)
309 $(eval
$(call BuildPackage
,lcd4linux-custom
))
310 $(eval
$(call BuildPackage
,lcd4linux-full
))