2 # Copyright (C) 2007-2015 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
14 PKG_SOURCE_URL
:=https
://github.com
/feckert
/lcd4linux
15 PKG_SOURCE_DATE
:=2019-07-19
16 PKG_SOURCE_VERSION
:=0b83bb3a81e7e7f5c0aa1daa6f5b9abca538fd47
17 PKG_MIRROR_HASH
:=26a3469bce0648b276e2c818add7049685c7f461ea9669d23730dfc3a96d9934
19 PKG_MAINTAINER
:=Florian Eckert
<fe@dev.tdt.de
>
20 PKG_LICENSE
:=GPL-2.0
-or-later
21 PKG_LICENSE_FILES
:=COPYING
27 PKG_CONFIG_DEPENDS
:= \
28 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_
%,$(LCD4LINUX_DRIVERS
)) \
29 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_
%,$(LCD4LINUX_PLUGINS
)) \
47 $(if
$(CONFIG_BROKEN
),HD44780
) \
48 $(if
$(CONFIG_BROKEN
),HD44780-I2C
) \
50 $(if
$(CONFIG_BROKEN
),LCDLinux
) \
54 $(if
$(CONFIG_BROKEN
),LUIse
) \
70 $(if
$(CONFIG_BROKEN
),SamsungSPF
) \
121 $(if
$(CONFIG_BROKEN
),wireless
) \
125 include $(INCLUDE_DIR
)/package.mk
126 include $(INCLUDE_DIR
)/nls.mk
128 define Package
/lcd4linux
/Default
131 TITLE
:=LCD display utility
132 URL
:=http
://lcd4linux.bulix.org
/
135 define Package
/lcd4linux
/Default
/description
136 LCD4Linux is a small program that grabs information from the kernel and
137 some subsystems and displays it on an external liquid crystal display.
141 define Package
/lcd4linux-custom
142 $(call Package
/lcd4linux
/Default
)
144 +LCD4LINUX_CUSTOM_NEEDS_libdbus
:libdbus \
145 +LCD4LINUX_CUSTOM_NEEDS_libgd
:libgd \
146 $(if
$(ICONV_FULL
),+LCD4LINUX_CUSTOM_NEEDS_libiconv
:libiconv-full
) \
147 +LCD4LINUX_CUSTOM_NEEDS_libjpeg
:libjpeg \
148 +LCD4LINUX_CUSTOM_NEEDS_libmpdclient
:libmpdclient \
149 +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient
:libmysqlclient \
150 +LCD4LINUX_CUSTOM_NEEDS_libncurses
:libncurses \
151 +LCD4LINUX_CUSTOM_NEEDS_libsqlite3
:libsqlite3 \
152 +LCD4LINUX_CUSTOM_NEEDS_libusb
:libusb-compat \
153 # +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \
154 # +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \
155 # +LCD4LINUX_CUSTOM_NEEDS_python:python
161 define Package
/lcd4linux-custom
/config
162 source
"$(SOURCE)/Config.in"
165 define Package
/lcd4linux-custom
/description
166 $(call Package
/lcd4linux
/Default
/description
)
168 This package contains a customized version of LCD4Linux.
172 define Package
/lcd4linux-full
173 $(call Package
/lcd4linux
/Default
)
177 $(if
$(ICONV_FULL
),+libiconv-full
) \
190 define Package
/lcd4linux-full
/description
191 $(call Package
/lcd4linux
/Default
/description
)
193 This package contains a version of LCD4Linux built with
all supported
200 am__fastdepCXX_TRUE
=yes
205 TARGET_CFLAGS
+= -std
=gnu89
207 ifeq ($(BUILD_VARIANT
),custom
)
209 LCD4LINUX_CUSTOM_DRIVERS
:= $(strip $(foreach c
, $(LCD4LINUX_DRIVERS
), \
210 $(if
$(CONFIG_LCD4LINUX_CUSTOM_DRIVER_
$(c
)),$(c
),) \
212 ifeq ($(LCD4LINUX_CUSTOM_DRIVERS
),)
213 LCD4LINUX_CUSTOM_DRIVERS
:=Sample
216 LCD4LINUX_CUSTOM_PLUGINS
:= $(strip $(foreach c
, $(LCD4LINUX_PLUGINS
), \
217 $(if
$(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_
$(c
)),$(c
)) \
219 ifeq ($(LCD4LINUX_CUSTOM_PLUGINS
),)
220 LCD4LINUX_CUSTOM_PLUGINS
:=sample
224 --with-drivers
="$(LCD4LINUX_CUSTOM_DRIVERS)" \
225 --with-plugins
="$(LCD4LINUX_CUSTOM_PLUGINS)" \
227 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv
),)
228 CONFIGURE_ARGS
+= --with-libiconv-prefix
="$(ICONV_PREFIX)"
230 CONFIGURE_ARGS
+= --without-libiconv-prefix
233 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient
),)
234 EXTRA_LDFLAGS
+= -L
$(STAGING_DIR
)/usr
/lib
/mysql
237 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
238 # CONFIGURE_ARGS+= --with-python
240 CONFIGURE_ARGS
+= --without-python
243 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
244 # CONFIGURE_ARGS+= --with-x
246 CONFIGURE_ARGS
+= --without-x
251 ifeq ($(BUILD_VARIANT
),full
)
253 LCD4LINUX_FULL_DRIVERS
:= $(strip $(foreach c
, $(LCD4LINUX_DRIVERS
), \
257 LCD4LINUX_FULL_PLUGINS
:= $(strip $(foreach c
, $(LCD4LINUX_PLUGINS
), \
262 --with-drivers
="$(LCD4LINUX_FULL_DRIVERS)" \
263 --with-plugins
="$(LCD4LINUX_FULL_PLUGINS)" \
264 --with-libiconv-prefix
="$(ICONV_PREFIX)" \
268 EXTRA_LDFLAGS
+= -L
$(STAGING_DIR
)/usr
/lib
/mysql
273 define Package
/lcd4linux
/conffiles
277 define Package
/lcd4linux
/install
278 $(INSTALL_DIR
) $(1)/usr
/bin
279 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/lcd4linux
$(1)/usr
/bin
/
280 $(INSTALL_DIR
) $(1)/etc
281 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/lcd4linux.conf.sample
$(1)/etc
/lcd4linux.conf
282 $(INSTALL_DIR
) $(1)/etc
/init.d
283 $(INSTALL_BIN
) .
/files
/lcd4linux.init
$(1)/etc
/init.d
/lcd4linux
284 $(SED
) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
285 -e
"s|^\(Layout 'TestLayer'\)|#\1|g" \
286 -e
"s|^#\(Display 'Image'\)|\1|g" \
287 -e
"s|^#\(Layout 'Default'\)|\1|g" \
288 $(1)/etc
/lcd4linux.conf
291 Package
/lcd4linux-custom
/conffiles
= $(Package
/lcd4linux
/conffiles
)
292 Package
/lcd4linux-custom
/install = $(Package
/lcd4linux
/install)
294 Package
/lcd4linux-full
/conffiles
= $(Package
/lcd4linux
/conffiles
)
295 Package
/lcd4linux-full
/install = $(Package
/lcd4linux
/install)
297 $(eval
$(call BuildPackage
,lcd4linux-custom
))
298 $(eval
$(call BuildPackage
,lcd4linux-full
))