2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
13 PKG_VERSION
:=r
$(PKG_REV
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=https
://ssl.bulix.org
/svn
/lcd4linux
/trunk
/
18 PKG_SOURCE_SUBDIR
:=lcd4linux-
$(PKG_VERSION
)
19 PKG_SOURCE_VERSION
:=$(PKG_REV
)
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/lcd4linux
30 TITLE
:=LCD display utility
31 URL
:=http
://lcd4linux.bulix.org
/
35 define Package
/lcd4linux
/config
37 depends on PACKAGE_lcd4linux
38 source
"$(SOURCE)/Config.in"
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.
47 define Package
/lcd4linux
/conffiles
116 LCD4LINUX_CONFIGURE_DRIVERS
:= \
117 $(foreach c
, $(LCD4LINUX_DRIVERS
), \
118 $(if
$(CONFIG_LCD4LINUX_DRV_
$(c
)),$(c
),) \
121 LCD4LINUX_CONFIGURE_PLUGINS
:= \
122 $(foreach c
, $(LCD4LINUX_PLUGINS
), \
123 $(if
$(CONFIG_LCD4LINUX_PLUGIN_
$(c
)),$(c
),) \
126 ifneq ($(CONFIG_LCD4LINUX_DRV_PNG
),)
127 PKG_BUILD_DEPENDS
+= libgd
130 ifneq ($(CONFIG_LCD4LINUX_DRV_PPM
),)
131 PKG_BUILD_DEPENDS
+= libgd
134 ifneq ($(CONFIG_LCD4LINUX_DRV_G15
),)
135 PKG_BUILD_DEPENDS
+= libgd
138 ifneq ($(CONFIG_LCD4LINUX_DRV_LPH7508
),)
139 PKG_BUILD_DEPENDS
+= libgd
142 ifneq ($(CONFIG_LCD4LINUX_DRV_LUIse
),)
143 PKG_BUILD_DEPENDS
+= libgd
146 ifneq ($(CONFIG_LCD4LINUX_DRV_Noritake
),)
147 PKG_BUILD_DEPENDS
+= libgd
150 ifneq ($(CONFIG_LCD4LINUX_DRV_serdisplib
),)
151 PKG_BUILD_DEPENDS
+= libgd
, serdisplib
154 ifneq ($(CONFIG_LCD4LINUX_DRV_st2205
),)
155 PKG_BUILD_DEPENDS
+= libgd
, st2205tool
158 ifneq ($(CONFIG_LCD4LINUX_DRV_T6963
),)
159 PKG_BUILD_DEPENDS
+= libgd
162 ifneq ($(CONFIG_LCD4LINUX_DRV_Curses
),)
163 PKG_BUILD_DEPENDS
+= libncurses
166 ifneq ($(CONFIG_LCD4LINUX_DRV_X11
),)
167 PKG_BUILD_DEPENDS
+= libgd
, libX11
170 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_gps
),)
171 PKG_BUILD_DEPENDS
+= libnmeap
174 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_iconv
),)
175 PKG_BUILD_DEPENDS
+= libiconv
178 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_mysql
),)
179 PKG_BUILD_DEPENDS
+= libmysqlclient
182 # XXX: lcd4linux needs at least one driver and one plugin, if none are selected, build'em all
183 ifeq ($(strip $(LCD4LINUX_CONFIGURE_DRIVERS
)),)
184 LCD4LINUX_CONFIGURE_DRIVERS
:=all
186 ifeq ($(strip $(LCD4LINUX_CONFIGURE_PLUGINS
)),)
187 LCD4LINUX_CONFIGURE_PLUGINS
:=all
190 ## TODO PYTHON PLUGIN, DEPENDS on ver >= '2.1.0'
193 EXTRA_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include -I
$(STAGING_DIR
)/include -I
$(STAGING_DIR
)/usr
/lib
/libiconv
/include
194 EXTRA_LDFLAGS
+=-L
$(STAGING_DIR
)/usr
/lib
-Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
-L
$(STAGING_DIR
)/usr
/lib
/libiconv
/lib
196 TARGET_CONFIGURE_OPTS
+=\
197 CC
="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
203 --with-drivers
="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \
204 --with-plugins
="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
208 $(MAKE
) -C
$(PKG_BUILD_DIR
) DESTDIR
="$(PKG_INSTALL_DIR)" all install
211 define Package
/lcd4linux
/install
212 $(INSTALL_DIR
) $(1)/usr
/bin
213 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/$(PKG_NAME
) $(1)/usr
/bin
/
214 $(INSTALL_DIR
) $(1)/etc
215 $(INSTALL_CONF
) .
/files
/$(PKG_NAME
).conf
$(1)/etc
/$(PKG_NAME
).conf
216 $(INSTALL_DIR
) $(1)/etc
/init.d
217 $(INSTALL_BIN
) .
/files
/$(PKG_NAME
).init
$(1)/etc
/init.d
/$(PKG_NAME
)
220 $(eval
$(call BuildPackage
,lcd4linux
))