update lcd4linux to the latest svn version Signed-off-by: Michael Vogt <michu at...
[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/description
35         LCD4Linux is a small program that grabs information from the kernel and 
36         some subsystems and displays it on an external liquid crystal display.
37 endef
38
39 define Package/lcd4linux/conffiles
40 /etc/lcd4linux.conf
41 endef
42
43 # commas are interpreted by the $(call ...) macro, so define an intermediate variable holding our drivers and plugins spec
44 PKG_CONFIGURE_DRIVERS:=all,!PNG,!PPM,!RouterBoard,!X11,!serdisplib,!G15
45 PKG_CONFIGURE_PLUGINS:=wireless,mpd,iconv,cpuinfo,loadavg,meminfo,proc_stat,uname,uptime
46
47 EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include
48 EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
49
50 TARGET_CONFIGURE_OPTS+=\
51         CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
52
53 CONFIGURE_ARGS += \
54         --without-x \
55         --without-python \
56         --with-drivers="$(PKG_CONFIGURE_DRIVERS)" \
57         --with-plugins="$(PKG_CONFIGURE_PLUGINS)" \
58         --disable-rpath \
59
60 define Build/Compile
61         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
62 endef
63
64 define Package/lcd4linux/install
65         $(INSTALL_DIR) $(1)/usr/bin
66         $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
67         $(INSTALL_DIR) $(1)/etc
68         $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
69         $(INSTALL_DIR) $(1)/etc/init.d
70         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
71 endef
72
73 $(eval $(call BuildPackage,lcd4linux))