source: packages/utils/lcd4linux/Makefile @ 28951

Last change on this file since 28951 was 28951, checked in by nico, 5 years ago

packages/lcd4linux: split into 2 -custom & -full, various fixes:

  • move all original package customization to a -custom pakage, DEVEL only
  • enable all (not broken) drivers & plugins in a -full package (closes: #7958, #9096)
  • ship upstream config file, defaulting to the "Image" driver
  • use new service functions in initscript
  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 6.6 KB
Line 
1#
2# Copyright (C) 2007-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=lcd4linux
11PKG_REV:=1159
12PKG_VERSION:=r$(PKG_REV)
13PKG_RELEASE:=3
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/
17PKG_SOURCE_SUBDIR:=lcd4linux-$(PKG_VERSION)
18PKG_SOURCE_VERSION:=$(PKG_REV)
19PKG_SOURCE_PROTO:=svn
20
21LCD4LINUX_DRIVERS:= \
22        BeckmannEgle \
23        BWCT \
24        CrystalFontz \
25        Curses \
26        Cwlinux \
27        D4D \
28        EA232graphic \
29        G15 \
30        GLCD2USB \
31        IRLCD \
32        $(if $(CONFIG_BROKEN),HD44780) \
33        $(if $(CONFIG_BROKEN),HD44780-I2C) \
34        LCD2USB \
35        $(if $(CONFIG_BROKEN),LCDLinux) \
36        LCDTerm \
37        LEDMatrix \
38        LPH7508 \
39        $(if $(CONFIG_BROKEN),LUIse) \
40        LW_ABP \
41        M50530 \
42        MatrixOrbital \
43        MatrixOrbitalGX \
44        MilfordInstruments \
45        Newhaven \
46        Noritake \
47        NULL \
48        Pertelian \
49        PHAnderson \
50        PICGraphic \
51        picoLCD \
52        picoLCDGraphic \
53        PNG \
54        PPM \
55        $(if $(CONFIG_TARGET_rb532),RouterBoard) \
56        serdisplib \
57        ShuttleVFD \
58        SimpleLCD \
59        st2205 \
60        T6963 \
61        Trefon \
62        USBHUB \
63        USBLCD \
64        VNC \
65        WincorNixdorf \
66#       ULA200 \
67#       X11 \
68
69LCD4LINUX_PLUGINS:= \
70        apm \
71        asterisk \
72        button_exec \
73        cpuinfo \
74        dbus \
75        diskstats \
76        dvb \
77        event \
78        exec \
79        fifo \
80        file \
81        gps \
82        hddtemp \
83        huawei \
84        i2c_sensors \
85        iconv \
86        imon \
87        isdn \
88        kvv \
89        loadavg \
90        netdev \
91        netinfo \
92        meminfo \
93        mpd \
94        mpris_dbus \
95        mysql \
96        netdev \
97        pop3 \
98        ppp \
99        proc_stat \
100        qnaplog \
101        seti \
102        statfs \
103        uname \
104        uptime \
105        w1retap \
106        $(if $(CONFIG_BROKEN),wireless) \
107        xmms \
108#       python \
109
110PKG_FIXUP:=libtool
111PKG_INSTALL:=1
112
113PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
114
115PKG_BUILD_DEPENDS:= \
116        libdbus \
117        libgd \
118        libmpdclient \
119        libmysqlclient \
120        libncurses \
121        libnmeap \
122        libsqlite3 \
123        libvncserver \
124        ppp \
125        serdisplib \
126        st2205tool \
127#       libftdi \
128#       libX11 \
129#       python \
130
131PKG_CONFIG_DEPENDS:= \
132        $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \
133        $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \
134
135include $(INCLUDE_DIR)/package.mk
136include $(INCLUDE_DIR)/nls.mk
137
138define Package/lcd4linux/Default
139  SECTION:=utils
140  CATEGORY:=Utilities
141  MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
142  TITLE:=LCD display utility
143  URL:=http://lcd4linux.bulix.org/
144endef
145
146define 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.
149endef
150
151
152define Package/lcd4linux-custom
153$(call Package/lcd4linux/Default)
154  DEPENDS:= \
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
169  MENU:=1
170  PROVIDES:=lcd4linux
171  VARIANT=custom
172endef
173
174define Package/lcd4linux-custom/config
175        source "$(SOURCE)/Config.in"
176endef
177
178define Package/lcd4linux-custom/description
179$(call Package/lcd4linux/Default/description)
180 .
181 This package contains a customized version of LCD4Linux.
182endef
183
184
185define Package/lcd4linux-full
186$(call Package/lcd4linux/Default)
187  DEPENDS:= @DEVEL \
188        +libdbus \
189        +libgd \
190        $(if $(ICONV_FULL),+libiconv-full) \
191        +libmpdclient \
192        +libmysqlclient \
193        +libncurses \
194        +libsqlite3 \
195        +libusb \
196        +libvncserver \
197        +serdisplib \
198        +st2205tool \
199#       +libftdi \
200#       +libX11 \
201#       +python
202  PROVIDES:=lcd4linux
203  VARIANT=full
204endef
205
206define Package/lcd4linux-full/description
207$(call Package/lcd4linux/Default/description)
208 .
209 This package contains a version of LCD4Linux built with all supported
210 drivers and plugins.
211endef
212
213
214CONFIGURE_ARGS+= \
215        --disable-rpath \
216
217EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
218
219ifeq ($(BUILD_VARIANT),custom)
220
221  LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
222    $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
223 ))
224  ifeq ($(LCD4LINUX_CUSTOM_DRIVER),)
225    LCD4LINUX_CUSTOM_DRIVERS:=Sample
226  endif
227
228  LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
229    $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
230  ))
231  ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
232    LCD4LINUX_CUSTOM_PLUGINS:=sample
233  endif
234
235  CONFIGURE_ARGS+= \
236        --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
237        --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
238
239  ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
240    CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
241  else
242    CONFIGURE_ARGS+= --without-libiconv-prefix
243  endif
244
245  ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
246    EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
247  endif
248
249#  ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
250#    CONFIGURE_ARGS+= --with-python
251#  else
252    CONFIGURE_ARGS+= --without-python
253#  endif
254
255#  ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
256#    CONFIGURE_ARGS+= --with-x
257#  else
258    CONFIGURE_ARGS+= --without-x
259#  endif
260
261endif
262
263ifeq ($(BUILD_VARIANT),full)
264
265  LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
266    $(c) \
267  ))
268
269  LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
270    $(c) \
271  ))
272
273  CONFIGURE_ARGS+= \
274        --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
275        --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
276        --with-libiconv-prefix="$(ICONV_PREFIX)" \
277        --without-python \
278        --without-x \
279
280  EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
281
282endif
283
284
285define Package/lcd4linux/conffiles
286/etc/lcd4linux.conf
287endef
288
289define 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
301endef
302
303Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
304Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
305
306Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
307Package/lcd4linux-full/install = $(Package/lcd4linux/install)
308
309$(eval $(call BuildPackage,lcd4linux-custom))
310$(eval $(call BuildPackage,lcd4linux-full))
Note: See TracBrowser for help on using the repository browser.