2 # Copyright (C) 2007 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
/
34 define Package
/lcd4linux
/config
36 depends on PACKAGE_lcd4linux
37 source
"$(SOURCE)/Config.in"
41 define Package
/lcd4linux
/description
42 LCD4Linux is a small program that grabs information from the kernel and
43 some subsystems and displays it on an external liquid crystal display.
46 define Package
/lcd4linux
/conffiles
115 LCD4LINUX_CONFIGURE_DRIVERS
:= \
116 $(foreach c
, $(LCD4LINUX_DRIVERS
), \
117 $(if
$(CONFIG_LCD4LINUX_DRV_
$(c
)),$(c
),) \
120 LCD4LINUX_CONFIGURE_PLUGINS
:= \
121 $(foreach c
, $(LCD4LINUX_PLUGINS
), \
122 $(if
$(CONFIG_LCD4LINUX_PLUGIN_
$(c
)),$(c
),) \
125 ifneq ($(CONFIG_LCD4LINUX_DRV_PNG
),)
126 PKG_BUILD_DEPENDS
+= libgd
129 ifneq ($(CONFIG_LCD4LINUX_DRV_PPM
),)
130 PKG_BUILD_DEPENDS
+= libgd
133 ifneq ($(CONFIG_LCD4LINUX_DRV_G15
),)
134 PKG_BUILD_DEPENDS
+= libgd
137 ifneq ($(CONFIG_LCD4LINUX_DRV_LPH7508
),)
138 PKG_BUILD_DEPENDS
+= libgd
141 ifneq ($(CONFIG_LCD4LINUX_DRV_LUIse
),)
142 PKG_BUILD_DEPENDS
+= libgd
145 ifneq ($(CONFIG_LCD4LINUX_DRV_Noritake
),)
146 PKG_BUILD_DEPENDS
+= libgd
149 ifneq ($(CONFIG_LCD4LINUX_DRV_serdisplib
),)
150 PKG_BUILD_DEPENDS
+= libgd
, serdisplib
153 ifneq ($(CONFIG_LCD4LINUX_DRV_st2205
),)
154 PKG_BUILD_DEPENDS
+= libgd
, st2205tool
157 ifneq ($(CONFIG_LCD4LINUX_DRV_T6963
),)
158 PKG_BUILD_DEPENDS
+= libgd
161 ifneq ($(CONFIG_LCD4LINUX_DRV_Curses
),)
162 PKG_BUILD_DEPENDS
+= libncurses
165 ifneq ($(CONFIG_LCD4LINUX_DRV_X11
),)
166 PKG_BUILD_DEPENDS
+= libgd
, libX11
169 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_gps
),)
170 PKG_BUILD_DEPENDS
+= libnmeap
173 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_iconv
),)
174 PKG_BUILD_DEPENDS
+= libiconv
177 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_mysql
),)
178 PKG_BUILD_DEPENDS
+= libmysqlclient
182 ## TODO PYTHON PLUGIN, DEPENDS on ver >= '2.1.0'
185 EXTRA_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include -I
$(STAGING_DIR
)/include -I
$(STAGING_DIR
)/usr
/lib
/libiconv
/include
186 EXTRA_LDFLAGS
+=-L
$(STAGING_DIR
)/usr
/lib
-Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
-L
$(STAGING_DIR
)/usr
/lib
/libiconv
/lib
188 TARGET_CONFIGURE_OPTS
+=\
189 CC
="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
195 --with-drivers
="$(LCD4LINUX_CONFIGURE_DRIVERS)" \
196 --with-plugins
="$(LCD4LINUX_CONFIGURE_PLUGINS)" \
200 $(MAKE
) -C
$(PKG_BUILD_DIR
) DESTDIR
="$(PKG_INSTALL_DIR)" all install
203 define Package
/lcd4linux
/install
204 $(INSTALL_DIR
) $(1)/usr
/bin
205 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/$(PKG_NAME
) $(1)/usr
/bin
/
206 $(INSTALL_DIR
) $(1)/etc
207 $(INSTALL_CONF
) .
/files
/$(PKG_NAME
).conf
$(1)/etc
/$(PKG_NAME
).conf
208 $(INSTALL_DIR
) $(1)/etc
/init.d
209 $(INSTALL_BIN
) .
/files
/$(PKG_NAME
).init
$(1)/etc
/init.d
/$(PKG_NAME
)
212 $(eval
$(call BuildPackage
,lcd4linux
))