update lcd4linux to the latest svn version Signed-off-by: Michael Vogt <michu at...
[openwrt/svn-archive/archive.git] / utils / lcd4linux / Makefile
index 5eb9e15d8ec294a94801c394231e98b31603d695..50e39ddead895d2304438b905a78382b127ebc2e 100644 (file)
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,70 +9,65 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lcd4linux
-PKG_VERSION:=0.10.0+cvs20051015
+PKG_REV:=877
+PKG_VERSION:=r$(PKG_REV)
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/lcd4linux/ \
-               http://ftp.de.debian.org/debian/pool/main/l/lcd4linux/
-PKG_MD5SUM:=5b5ac629be4bb5c29104fb8f6b7fa444
-PKG_CAT:=zcat
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/
+PKG_SOURCE_SUBDIR:=lcd4linux-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=svn
+
+PKG_FIXUP = libtool
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/lcd4linux
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+libncurses
+  DEPENDS:=+libncurses +libusb +libiconv +libgd
   TITLE:=LCD display utility
-  DESCRIPTION:=LCD display utility.\\\
-    LCD4Linux is a small program that grabs information from the kernel and \\\
-    some subsystems and displays it on an external liquid crystal display.
   URL:=http://lcd4linux.bulix.org/
 endef
 
-define Build/Configure
-       (cd $(PKG_BUILD_DIR); rm -f config.cache; \
-               $(TARGET_CONFIGURE_OPTS) \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
-               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
-               ./configure \
-                       --target=$(GNU_TARGET_NAME) \
-                       --host=$(GNU_TARGET_NAME) \
-                       --build=$(GNU_HOST_NAME) \
-                       --program-prefix="" \
-                       --program-suffix="" \
-                       --prefix=/usr \
-                       --exec-prefix=/usr \
-                       --bindir=/usr/bin \
-                       --datadir=/usr/share \
-                       --includedir=/usr/include \
-                       --infodir=/usr/share/info \
-                       --libdir=/usr/lib \
-                       --libexecdir=/usr/lib \
-                       --localstatedir=/var \
-                       --mandir=/usr/share/man \
-                       --sbindir=/usr/sbin \
-                       --sysconfdir=/etc \
-                       $(DISABLE_LARGEFILE) \
-                       $(DISABLE_NLS) \
-                       --without-x \
-                       --with-drivers='all,!PNG,!RouterBoard,!X11' \
-                       --with-plugins=wireless \
-       );
+define Package/lcd4linux/description
+       LCD4Linux is a small program that grabs information from the kernel and 
+       some subsystems and displays it on an external liquid crystal display.
+endef
+
+define Package/lcd4linux/conffiles
+/etc/lcd4linux.conf
 endef
 
+# commas are interpreted by the $(call ...) macro, so define an intermediate variable holding our drivers and plugins spec
+PKG_CONFIGURE_DRIVERS:=all,!PNG,!PPM,!RouterBoard,!X11,!serdisplib,!G15
+PKG_CONFIGURE_PLUGINS:=wireless,mpd,iconv,cpuinfo,loadavg,meminfo,proc_stat,uname,uptime
+
+EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include
+EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
+
+TARGET_CONFIGURE_OPTS+=\
+        CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
+
+CONFIGURE_ARGS += \
+       --without-x \
+       --without-python \
+       --with-drivers="$(PKG_CONFIGURE_DRIVERS)" \
+       --with-plugins="$(PKG_CONFIGURE_PLUGINS)" \
+       --disable-rpath \
+
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CC="$(TARGET_CC)" LD="$(TARGET_CROSS)ld" \
-               CFLAGS="$(TARGET_CFLAGS) -Wall"
+       $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
 endef
 
 define Package/lcd4linux/install
-       install -d -m0755 $(1)/usr/bin
-       install -m0755 $(PKG_BUILD_DIR)/lcd4linux $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
 endef
 
 $(eval $(call BuildPackage,lcd4linux))