Update lcd4linux to svn revision 877, add modular
[packages.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 EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include
126 EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
127
128 TARGET_CONFIGURE_OPTS+=\
129         CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
130
131
132 CONFIGURE_ARGS += \
133         --without-x \
134         --without-python \
135         --with-drivers="$(LCD4LINUX_CONFIGURE_DRIVERS)" \
136         --with-plugins="$(LCD4LINUX_CONFIGURE_PLUGINS)" \
137         --disable-rpath \
138
139 define Build/Compile
140         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
141 endef
142
143 define Package/lcd4linux/install
144         $(INSTALL_DIR) $(1)/usr/bin
145         $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
146         $(INSTALL_DIR) $(1)/etc
147         $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
148         $(INSTALL_DIR) $(1)/etc/init.d
149         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
150 endef
151
152 $(eval $(call BuildPackage,lcd4linux))