this patch cleans up lcd4linux deps. (#3521)
[openwrt/svn-archive/archive.git] / utils / lcd4linux / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=lcd4linux
12 PKG_REV:=877
13 PKG_VERSION:=r$(PKG_REV)
14 PKG_RELEASE:=2
15
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)
20 PKG_SOURCE_PROTO:=svn
21
22 PKG_FIXUP = libtool
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/lcd4linux
27 SECTION:=utils
28 CATEGORY:=Utilities
29 DEPENDS:=+libusb
30 TITLE:=LCD display utility
31 URL:=http://lcd4linux.bulix.org/
32 endef
33
34 define Package/lcd4linux/config
35 menu "Configuration"
36 depends on PACKAGE_lcd4linux
37 source "$(SOURCE)/Config.in"
38 endmenu
39 endef
40
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.
44 endef
45
46 define Package/lcd4linux/conffiles
47 /etc/lcd4linux.conf
48 endef
49
50 LCD4LINUX_DRIVERS:= \
51 BeckmannEgle \
52 BWCT \
53 CrystalFontz \
54 Curses \
55 Cwlinux \
56 G15 \
57 HD44780 \
58 LCD2USB \
59 LCDLinux \
60 LCDTerm \
61 LPH7508 \
62 LUIse \
63 M50530 \
64 MatrixOrbital \
65 MilfordInstruments \
66 Noritake \
67 NULL \
68 PNG \
69 PPM \
70 Pertelian \
71 picoLCD \
72 RouterBoard \
73 serdisplib \
74 SimpleLCD \
75 st2205 \
76 T6963 \
77 Trefon \
78 USBLCD \
79 USBHUB \
80 WincorNixdorf \
81 X11 \
82
83 LCD4LINUX_PLUGINS:= \
84 apm \
85 asterisk \
86 button_exec \
87 cpuinfo \
88 diskstats \
89 dvb \
90 exec \
91 fifo \
92 file \
93 gps \
94 i2c_sensors \
95 iconv \
96 imon \
97 isdn \
98 kvv \
99 loadavg \
100 meminfo \
101 mpd \
102 mysql \
103 netdev \
104 pop3 \
105 ppp \
106 proc_stat \
107 python \
108 seti \
109 statfs \
110 uname \
111 uptime \
112 wireless \
113 xmms \
114
115 LCD4LINUX_CONFIGURE_DRIVERS:= \
116 $(foreach c, $(LCD4LINUX_DRIVERS), \
117 $(if $(CONFIG_LCD4LINUX_DRV_$(c)),$(c),) \
118 )
119
120 LCD4LINUX_CONFIGURE_PLUGINS:= \
121 $(foreach c, $(LCD4LINUX_PLUGINS), \
122 $(if $(CONFIG_LCD4LINUX_PLUGIN_$(c)),$(c),) \
123 )
124
125 ifneq ($(CONFIG_LCD4LINUX_DRV_PNG),)
126 PKG_BUILD_DEPENDS += libgd
127 endif
128
129 ifneq ($(CONFIG_LCD4LINUX_DRV_PPM),)
130 PKG_BUILD_DEPENDS += libgd
131 endif
132
133 ifneq ($(CONFIG_LCD4LINUX_DRV_G15),)
134 PKG_BUILD_DEPENDS += libgd
135 endif
136
137 ifneq ($(CONFIG_LCD4LINUX_DRV_LPH7508),)
138 PKG_BUILD_DEPENDS += libgd
139 endif
140
141 ifneq ($(CONFIG_LCD4LINUX_DRV_LUIse),)
142 PKG_BUILD_DEPENDS += libgd
143 endif
144
145 ifneq ($(CONFIG_LCD4LINUX_DRV_Noritake),)
146 PKG_BUILD_DEPENDS += libgd
147 endif
148
149 ifneq ($(CONFIG_LCD4LINUX_DRV_serdisplib),)
150 PKG_BUILD_DEPENDS += libgd, serdisplib
151 endif
152
153 ifneq ($(CONFIG_LCD4LINUX_DRV_st2205),)
154 PKG_BUILD_DEPENDS += libgd, st2205tool
155 endif
156
157 ifneq ($(CONFIG_LCD4LINUX_DRV_T6963),)
158 PKG_BUILD_DEPENDS += libgd
159 endif
160
161 ifneq ($(CONFIG_LCD4LINUX_DRV_Curses),)
162 PKG_BUILD_DEPENDS += libncurses
163 endif
164
165 ifneq ($(CONFIG_LCD4LINUX_DRV_X11),)
166 PKG_BUILD_DEPENDS += libgd, libX11
167 endif
168
169 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_gps),)
170 PKG_BUILD_DEPENDS += libnmeap
171 endif
172
173 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_iconv),)
174 PKG_BUILD_DEPENDS += libiconv
175 endif
176
177 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_mysql),)
178 PKG_BUILD_DEPENDS += libmysqlclient
179 endif
180
181
182 ## TODO PYTHON PLUGIN, DEPENDS on ver >= '2.1.0'
183
184
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
187
188 TARGET_CONFIGURE_OPTS+=\
189 CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
190
191
192 CONFIGURE_ARGS += \
193 --without-x \
194 --without-python \
195 --with-drivers="$(LCD4LINUX_CONFIGURE_DRIVERS)" \
196 --with-plugins="$(LCD4LINUX_CONFIGURE_PLUGINS)" \
197 --disable-rpath \
198
199 define Build/Compile
200 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
201 endef
202
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)
210 endef
211
212 $(eval $(call BuildPackage,lcd4linux))