fix numerous typos in Makefile
[openwrt/svn-archive/archive.git] / net / mini_httpd / Makefile
1 #
2 # Copyright (C) 2006 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:=mini-httpd
12 PKG_VERSION:=1.19
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=792a529dfe974355aad8ba6c80e54e7a
15
16 PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/
17 PKG_SOURCE:=mini_httpd-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/mini-httpd
25 SECTION:=net
26 CATEGORY:=Network
27 SUBMENU:=A small web server
28 DESCRIPTION:=mini_httpd is a small HTTP server. Its performance is not great, but for\\\
29 low or medium traffic sites it's quite adequate. It implements all the\\\
30 basic features of an HTTP server, including:\\\
31 \\\
32 * GET, HEAD, and POST methods.\\\
33 * CGI.\\\
34 * Basic authentication.\\\
35 * Security against ".." filename snooping.\\\
36 * The common MIME types.\\\
37 * Trailing-slash redirection.\\\
38 * index.html, index.htm, index.cgi\\\
39 * Directory listings.\\\
40 * Multihoming / virtual hosting.\\\
41 * Standard logging.\\\
42 * Custom error pages.\\\
43 \\\
44 It can also be configured to do IPv6.\\\
45 URL:=http://www.acme.com/software/mini_httpd/
46 endef
47
48 define Package/mini-httpd-htpasswd
49 $(call Package/mini-httpd)
50 TITLE:=Utility to generate HTTP access files
51 DESCRIPTION+=This package generates .htaccess/.htpasswd files to use HTTP access authentication
52 endef
53
54 define Package/mini-httpd-matrixssl
55 $(call Package/mini-httpd)
56 TITLE:=A small web server, built with SSL support using MatrixSSL
57 DESCRIPTION+=This package adds SSL/HTTPS. (MatrixSSL)
58 endef
59
60 define Package/mini-httpd-openssl
61 $(call BuildPackage,mini-httpd)
62 TITLE:=A small web server, built with SSL support using OpenSSL
63 DESCRIPTION+=This package adds SSL/HTTPS. (OpenSSL)
64 endef
65
66 define Build/Configure
67 $(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/
68 endef
69
70 define Build/Compile
71 # with MatrixSSL
72 ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 CC=$(TARGET_CC) \
75 OFLAGS="$(TARGET_CFLAGS)" \
76 SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \
77 SSL_INC="-I$(STAGING_DIR)/usr/include" \
78 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lmatrixssl" \
79 SSL_OBJS="matrixssl_helper.o" \
80 all
81 (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-matrixssl; )
82 $(MAKE) -C $(PKG_BUILD_DIR) clean
83 endif
84 # with OpenSSL
85 ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
86 $(MAKE) -C $(PKG_BUILD_DIR) \
87 CC=$(TARGET_CC) \
88 OFLAGS="$(TARGET_CFLAGS)" \
89 SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
90 SSL_INC="-I$(STAGING_DIR)/usr/include" \
91 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \
92 all
93 (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-openssl; )
94 $(MAKE) -C $(PKG_BUILD_DIR) clean
95 endif
96 # without SSL
97 ifneq ($(BR2_PACKAGE_MINI_HTTPD),)
98 $(MAKE) -C $(PKG_BUILD_DIR) \
99 CC=$(TARGET_CC) \
100 OFLAGS="$(TARGET_CFLAGS)" \
101 all
102 endif
103 touch $@
104
105 $(IPKG_MINI_HTTPD):
106 install -d -m0755 $(IDIR_MINI_HTTPD)/etc
107 install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf
108 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default
109 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd
110 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d
111 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD)/etc/init.d/mini_httpd
112 install -d -m0755 $(IDIR_MINI_HTTPD)/usr/sbin
113 install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/
114 $(RSTRIP) $(IDIR_MINI_HTTPD)
115 $(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR)
116
117 $(IPKG_MINI_HTTPD_HTPASSWD):
118 install -d -m0755 $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin
119 install -m0755 $(PKG_BUILD_DIR)/htpasswd $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin/
120 $(RSTRIP) $(IDIR_MINI_HTTPD_HTPASSWD)
121 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_HTPASSWD) $(PACKAGE_DIR)
122
123 $(IPKG_MINI_HTTPD_MATRIXSSL):
124 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
125 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
126 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
127 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
128 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
129 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
130 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
131 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
132 install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
133 $(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
134 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
135
136 $(IPKG_MINI_HTTPD_OPENSSL):
137 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
138 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
139 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
140 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
141 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
142 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
143 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
144 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
145 install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
146 $(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
147 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)
148 endef