[package] appweb: rework extraction process (#7897)
[openwrt/svn-archive/archive.git] / net / appweb / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 # Copyright (C) 2009 Embedthis Software
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8 # Commercial and other licenses are available from http://www.embedthis.com/.
9 #
10
11 include $(TOPDIR)/rules.mk
12
13 PKG_NAME:=appweb
14 PKG_RELEASE:=1
15
16 #
17 # Build stable
18 #
19 PKG_VERSION:=3.2.2-1
20 PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz
21 PKG_SOURCE_URL:=http://www.appwebserver.org/software/
22 PKG_MD5SUM:=060d43c8194fa6a119cada966fc807a7
23
24 #
25 # Build the latest snapshot from the default trunk
26 #
27 #PKG_VERSION:=default
28 #PKG_SOURCE:=tip.tar.gz
29 #PKG_SOURCE_URL:= http://hg.embedthis.com/appweb/archive/
30 #PKG_MD5SUM:=
31
32 include $(INCLUDE_DIR)/package.mk
33
34 # The files in the .tar.gz are
35 # src/all/...
36 # src/build/...
37 # src/test/...
38 # and so on
39 #
40 # What we want is
41 # $(PKG_BUILD_DIR)/all/...
42 # $(PKG_BUILD_DIR)/build/...
43 # $(PKG_BUILD_DIR)/test/...
44 # and so on
45 #
46 # The following two lines make this happen
47 # 1. change tar option to strip out the top-level, src in
48 # this case
49 # 2. change the tar output to the build directory. The
50 # original tar command was
51 # $(HOST_TAR) -C/.. $(1) $(TAR_OPTIONS)
52
53 TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
54 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
55
56 define Package/appweb
57 SECTION:=net
58 CATEGORY:=Network
59 SUBMENU:=Web Servers/Proxies
60 TITLE:=Appweb Web Server
61 URL:=http://www.appwebserver.org/
62 DEPENDS:=@!avr32 +libpthread
63 endef
64
65 define Package/appweb/description
66 Appweb is a powerful, compact embedded web server designed for dynamic web
67 applications.
68 endef
69
70 CONFIGURE_ARGS += \
71 -q \
72 --defaults=release \
73 --shared \
74 --tune=size \
75 --without-php \
76 --without-ssl \
77 --disable-angel \
78 --disable-samples \
79 --disable-access-log \
80 --disable-complete-native \
81 --disable-complete-cross \
82 --webdir=/www \
83 --logdir=/var/log \
84 --port=8000 \
85 --sslPort=8443 \
86 --config=flat
87
88 define Build/Configure
89 $(call Build/Configure/Default)
90 endef
91
92 define Build/Compile
93 $(MAKE) -C $(PKG_BUILD_DIR) \
94 $(TARGET_CONFIGURE_OPTS) \
95 BLD_CC_DYN_LOAD=1
96 endef
97
98 define Package/appweb/install
99 ( cd $(PKG_BUILD_DIR) ; $(PKG_BUILD_DIR)/build/bin/makeInstall \
100 --root=$(1) --install --with-openwrt=1 binary )
101 rm -rf $(1)/var
102 endef
103
104 $(eval $(call BuildPackage,appweb))