haserl: uptate to 0.9.32, add optional lua support
[packages.git] / utils / haserl / Makefile
index 35eff9f..607db28 100644 (file)
@@ -1,20 +1,19 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haserl
-PKG_VERSION:=0.8.0
-PKG_RELEASE:=2
+PKG_VERSION:=0.9.32
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/haserl
-PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea
+PKG_MD5SUM:=18e2208aea6d772d1670c1a648bb6b77
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -23,8 +22,25 @@ define Package/haserl
   CATEGORY:=Utilities
   TITLE:=A CGI wrapper to embed shell scripts in HTML documents
   URL:=http://haserl.sourceforge.net/
+  MENU:=1
+  DEPENDS:= +HASERL_with_lua:liblua
+endef
+
+define Package/haserl/config
+       source "$(SOURCE)/Config.in"
 endef
 
+ifeq ($(CONFIG_HASERL_with_lua),y)
+       CONFIGURE_ARGS+=--with-lua
+       TARGET_LDFLAGS += -ldl
+endif
+ifneq ($(CONFIG_HASERL_shell_lua),y)
+       CONFIGURE_ARGS+=--disable-luashell
+endif
+ifneq ($(CONFIG_HASERL_shell_luac),y)
+       CONFIGURE_ARGS+=--disable-luacshell
+endif
+
 define Package/haserl/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/