cf2b3fdcdf42fb0662633627d0565afac8b0a425
[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:=1
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:=+libncurses +libusb +libiconv +libgd
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_st2205),)
134 PKG_BUILD_DEPENDS += st2205tool
135 endif
136
137 ifneq ($(CONFIG_LCD4LINUX_PLUGIN_gps),)
138 PKG_BUILD_DEPENDS += libnmeap
139 endif
140
141 EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include
142 EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
143
144 TARGET_CONFIGURE_OPTS+=\
145 CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
146
147
148 CONFIGURE_ARGS += \
149 --without-x \
150 --without-python \
151 --with-drivers="$(LCD4LINUX_CONFIGURE_DRIVERS)" \
152 --with-plugins="$(LCD4LINUX_CONFIGURE_PLUGINS)" \
153 --disable-rpath \
154
155 define Build/Compile
156 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
157 endef
158
159 define Package/lcd4linux/install
160 $(INSTALL_DIR) $(1)/usr/bin
161 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
162 $(INSTALL_DIR) $(1)/etc
163 $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
164 $(INSTALL_DIR) $(1)/etc/init.d
165 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
166 endef
167
168 $(eval $(call BuildPackage,lcd4linux))