haserl: uptate to 0.9.32, add optional lua support
[packages.git] / utils / haserl / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=haserl
11 PKG_VERSION:=0.9.32
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/haserl
16 PKG_MD5SUM:=18e2208aea6d772d1670c1a648bb6b77
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/haserl
21   SECTION:=utils
22   CATEGORY:=Utilities
23   TITLE:=A CGI wrapper to embed shell scripts in HTML documents
24   URL:=http://haserl.sourceforge.net/
25   MENU:=1
26   DEPENDS:= +HASERL_with_lua:liblua
27 endef
28
29 define Package/haserl/config
30         source "$(SOURCE)/Config.in"
31 endef
32
33 ifeq ($(CONFIG_HASERL_with_lua),y)
34         CONFIGURE_ARGS+=--with-lua
35         TARGET_LDFLAGS += -ldl
36 endif
37 ifneq ($(CONFIG_HASERL_shell_lua),y)
38         CONFIGURE_ARGS+=--disable-luashell
39 endif
40 ifneq ($(CONFIG_HASERL_shell_luac),y)
41         CONFIGURE_ARGS+=--disable-luacshell
42 endif
43
44 define Package/haserl/install
45         $(INSTALL_DIR) $(1)/usr/bin
46         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/
47 endef
48
49 $(eval $(call BuildPackage,haserl))