mariadb: update to 10.9.8
[feed/packages.git] / utils / lcd4linux / Makefile
1 #
2 # Copyright (C) 2007-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lcd4linux
11 PKG_RELEASE:=10
12
13 PKG_SOURCE_PROTO:=git
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
18
19 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
20 PKG_LICENSE:=GPL-2.0-or-later
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=1
26
27 PKG_CONFIG_DEPENDS:= \
28 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \
29 $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \
30
31 LCD4LINUX_DRIVERS:= \
32 ASTUSB \
33 BeckmannEgle \
34 BWCT \
35 CrystalFontz \
36 Curses \
37 Cwlinux \
38 D4D \
39 DPF \
40 EA232graphic \
41 EFN \
42 FutabaVFD \
43 FW8888 \
44 G15 \
45 GLCD2USB \
46 IRLCD \
47 $(if $(CONFIG_BROKEN),HD44780) \
48 $(if $(CONFIG_BROKEN),HD44780-I2C) \
49 LCD2USB \
50 $(if $(CONFIG_BROKEN),LCDLinux) \
51 LCDTerm \
52 LEDMatrix \
53 LPH7508 \
54 $(if $(CONFIG_BROKEN),LUIse) \
55 LW_ABP \
56 M50530 \
57 MatrixOrbital \
58 MatrixOrbitalGX \
59 MilfordInstruments \
60 Newhaven \
61 Noritake \
62 NULL \
63 Pertelian \
64 PHAnderson \
65 PICGraphic \
66 picoLCD \
67 picoLCDGraphic \
68 PNG \
69 PPM \
70 $(if $(CONFIG_BROKEN),SamsungSPF) \
71 ShuttleVFD \
72 SimpleLCD \
73 st2205 \
74 T6963 \
75 TeakLCM \
76 Trefon \
77 USBHUB \
78 USBLCD \
79 VNC \
80 WincorNixdorf \
81 # ULA200 \
82 # X11 \
83
84 LCD4LINUX_PLUGINS:= \
85 apm \
86 asterisk \
87 button_exec \
88 cpuinfo \
89 dbus \
90 diskstats \
91 dvb \
92 event \
93 exec \
94 fifo \
95 file \
96 gps \
97 hddtemp \
98 huawei \
99 i2c_sensors \
100 iconv \
101 imon \
102 isdn \
103 kvv \
104 loadavg \
105 netdev \
106 netinfo \
107 meminfo \
108 mpd \
109 mpris_dbus \
110 mysql \
111 netdev \
112 pop3 \
113 ppp \
114 proc_stat \
115 qnaplog \
116 seti \
117 statfs \
118 uname \
119 uptime \
120 w1retap \
121 $(if $(CONFIG_BROKEN),wireless) \
122 xmms \
123 # python
124
125 include $(INCLUDE_DIR)/package.mk
126 include $(INCLUDE_DIR)/nls.mk
127
128 define Package/lcd4linux/Default
129 SECTION:=utils
130 CATEGORY:=Utilities
131 TITLE:=LCD display utility
132 URL:=http://lcd4linux.bulix.org/
133 endef
134
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.
138 endef
139
140
141 define Package/lcd4linux-custom
142 $(call Package/lcd4linux/Default)
143 DEPENDS:= \
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
156 MENU:=1
157 PROVIDES:=lcd4linux
158 VARIANT=custom
159 endef
160
161 define Package/lcd4linux-custom/config
162 source "$(SOURCE)/Config.in"
163 endef
164
165 define Package/lcd4linux-custom/description
166 $(call Package/lcd4linux/Default/description)
167 .
168 This package contains a customized version of LCD4Linux.
169 endef
170
171
172 define Package/lcd4linux-full
173 $(call Package/lcd4linux/Default)
174 DEPENDS:= @DEVEL \
175 +libdbus \
176 +libgd \
177 $(if $(ICONV_FULL),+libiconv-full) \
178 +libmpdclient \
179 +libmysqlclient \
180 +libncurses \
181 +libsqlite3 \
182 +libusb-compat \
183 # +libftdi \
184 # +libX11 \
185 # +python
186 PROVIDES:=lcd4linux
187 VARIANT=full
188 endef
189
190 define Package/lcd4linux-full/description
191 $(call Package/lcd4linux/Default/description)
192 .
193 This package contains a version of LCD4Linux built with all supported
194 drivers and plugins.
195 endef
196
197
198 CONFIGURE_VARS+= \
199 ANSICXX_TRUE=yes \
200 am__fastdepCXX_TRUE=yes
201
202 CONFIGURE_ARGS+= \
203 --disable-rpath
204
205 TARGET_CFLAGS += -std=gnu89
206
207 ifeq ($(BUILD_VARIANT),custom)
208
209 LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
210 $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
211 ))
212 ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
213 LCD4LINUX_CUSTOM_DRIVERS:=Sample
214 endif
215
216 LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
217 $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
218 ))
219 ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
220 LCD4LINUX_CUSTOM_PLUGINS:=sample
221 endif
222
223 CONFIGURE_ARGS+= \
224 --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
225 --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
226
227 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
228 CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
229 else
230 CONFIGURE_ARGS+= --without-libiconv-prefix
231 endif
232
233 ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
234 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
235 endif
236
237 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
238 # CONFIGURE_ARGS+= --with-python
239 # else
240 CONFIGURE_ARGS+= --without-python
241 # endif
242
243 # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
244 # CONFIGURE_ARGS+= --with-x
245 # else
246 CONFIGURE_ARGS+= --without-x
247 # endif
248
249 endif
250
251 ifeq ($(BUILD_VARIANT),full)
252
253 LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
254 $(c) \
255 ))
256
257 LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
258 $(c) \
259 ))
260
261 CONFIGURE_ARGS+= \
262 --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
263 --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
264 --with-libiconv-prefix="$(ICONV_PREFIX)" \
265 --without-python \
266 --without-x
267
268 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
269
270 endif
271
272
273 define Package/lcd4linux/conffiles
274 /etc/lcd4linux.conf
275 endef
276
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
289 endef
290
291 Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
292 Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
293
294 Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
295 Package/lcd4linux-full/install = $(Package/lcd4linux/install)
296
297 $(eval $(call BuildPackage,lcd4linux-custom))
298 $(eval $(call BuildPackage,lcd4linux-full))