fix mini_httpd, standardize
git-svn-id: svn://svn.openwrt.org/openwrt/packages@4587 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
ca59adf573
commit
63d528cdd8
@ -11,40 +11,44 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=mini-httpd
|
PKG_NAME:=mini-httpd
|
||||||
PKG_VERSION:=1.19
|
PKG_VERSION:=1.19
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MD5SUM:=792a529dfe974355aad8ba6c80e54e7a
|
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/
|
|
||||||
PKG_SOURCE:=mini_httpd-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_CAT:=zcat
|
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE:=mini_httpd-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/
|
||||||
|
PKG_MD5SUM:=792a529dfe974355aad8ba6c80e54e7a
|
||||||
|
PKG_CAT:=zcat
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/mini-httpd
|
define Package/mini-httpd
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
SUBMENU:=A small web server
|
TITLE:=A small web server
|
||||||
DESCRIPTION:=mini_httpd is a small HTTP server. Its performance is not great, but for\\\
|
DESCRIPTION:=mini_httpd is a small HTTP server. Its performance is not great, but for \\\
|
||||||
low or medium traffic sites it's quite adequate. It implements all the\\\
|
low or medium traffic sites it's quite adequate. It implements all the \\\
|
||||||
basic features of an HTTP server, including:\\\
|
basic features of an HTTP server, including: \\\
|
||||||
\\\
|
\\\
|
||||||
* GET, HEAD, and POST methods.\\\
|
* GET, HEAD, and POST methods.\\\
|
||||||
* CGI.\\\
|
* CGI.\\\
|
||||||
* Basic authentication.\\\
|
* Basic authentication.\\\
|
||||||
* Security against ".." filename snooping.\\\
|
* Security against ".." filename snooping.\\\
|
||||||
* The common MIME types.\\\
|
* The common MIME types.\\\
|
||||||
* Trailing-slash redirection.\\\
|
* Trailing-slash redirection.\\\
|
||||||
* index.html, index.htm, index.cgi\\\
|
* index.html, index.htm, index.cgi\\\
|
||||||
* Directory listings.\\\
|
* Directory listings.\\\
|
||||||
* Multihoming / virtual hosting.\\\
|
* Multihoming / virtual hosting.\\\
|
||||||
* Standard logging.\\\
|
* Standard logging.\\\
|
||||||
* Custom error pages.\\\
|
* Custom error pages.\\\
|
||||||
\\\
|
\\\
|
||||||
It can also be configured to do IPv6.\\\
|
It can also be configured to do IPv6.
|
||||||
URL:=http://www.acme.com/software/mini_httpd/
|
URL:=http://www.acme.com/software/mini_httpd/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/mini-httpd/conffiles
|
||||||
|
/etc/mini_httpd.conf
|
||||||
|
/etc/default/mini_httpd
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/mini-httpd-htpasswd
|
define Package/mini-httpd-htpasswd
|
||||||
$(call Package/mini-httpd)
|
$(call Package/mini-httpd)
|
||||||
TITLE:=Utility to generate HTTP access files
|
TITLE:=Utility to generate HTTP access files
|
||||||
@ -57,19 +61,37 @@ define Package/mini-httpd-matrixssl
|
|||||||
DESCRIPTION+=This package adds SSL/HTTPS. (MatrixSSL)
|
DESCRIPTION+=This package adds SSL/HTTPS. (MatrixSSL)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/mini-httpd-matrixssl/conffiles
|
||||||
|
/etc/mini_httpd.conf
|
||||||
|
/etc/mini_httpd.pem
|
||||||
|
/etc/default/mini_httpd
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/mini-httpd-openssl
|
define Package/mini-httpd-openssl
|
||||||
$(call BuildPackage,mini-httpd)
|
$(call Package/mini-httpd)
|
||||||
TITLE:=A small web server, built with SSL support using OpenSSL
|
TITLE:=A small web server, built with SSL support using OpenSSL
|
||||||
DESCRIPTION+=This package adds SSL/HTTPS. (OpenSSL)
|
DESCRIPTION+=This package adds SSL/HTTPS. (OpenSSL)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/mini-httpd-openssl/conffiles
|
||||||
|
/etc/mini_httpd.conf
|
||||||
|
/etc/mini_httpd.pem
|
||||||
|
/etc/default/mini_httpd
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifneq ($(SDK),)
|
||||||
|
CONFIG_PACKAGE_mini-httpd:=m
|
||||||
|
CONFIG_PACKAGE_mini-httpd-matrixssl:=m
|
||||||
|
CONFIG_PACKAGE_mini-httpd-openssl:=m
|
||||||
|
endif
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
$(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/
|
$(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
# with MatrixSSL
|
# with MatrixSSL
|
||||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
|
ifneq ($(CONFIG_PACKAGE_mini-httpd-matrixssl),)
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
CC=$(TARGET_CC) \
|
CC=$(TARGET_CC) \
|
||||||
OFLAGS="$(TARGET_CFLAGS)" \
|
OFLAGS="$(TARGET_CFLAGS)" \
|
||||||
@ -82,7 +104,7 @@ define Build/Compile
|
|||||||
$(MAKE) -C $(PKG_BUILD_DIR) clean
|
$(MAKE) -C $(PKG_BUILD_DIR) clean
|
||||||
endif
|
endif
|
||||||
# with OpenSSL
|
# with OpenSSL
|
||||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
|
ifneq ($(CONFIG_PACKAGE_mini-httpd-openssl),)
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
CC=$(TARGET_CC) \
|
CC=$(TARGET_CC) \
|
||||||
OFLAGS="$(TARGET_CFLAGS)" \
|
OFLAGS="$(TARGET_CFLAGS)" \
|
||||||
@ -94,55 +116,55 @@ define Build/Compile
|
|||||||
$(MAKE) -C $(PKG_BUILD_DIR) clean
|
$(MAKE) -C $(PKG_BUILD_DIR) clean
|
||||||
endif
|
endif
|
||||||
# without SSL
|
# without SSL
|
||||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD),)
|
ifneq ($(CONFIG_PACKAGE_mini-httpd),)
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
CC=$(TARGET_CC) \
|
CC=$(TARGET_CC) \
|
||||||
OFLAGS="$(TARGET_CFLAGS)" \
|
OFLAGS="$(TARGET_CFLAGS)" \
|
||||||
all
|
all
|
||||||
endif
|
endif
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(IPKG_MINI_HTTPD):
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD)/etc
|
|
||||||
install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default
|
|
||||||
install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d
|
|
||||||
install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD)/etc/init.d/mini_httpd
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD)/usr/sbin
|
|
||||||
install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/
|
|
||||||
$(RSTRIP) $(IDIR_MINI_HTTPD)
|
|
||||||
$(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR)
|
|
||||||
|
|
||||||
$(IPKG_MINI_HTTPD_HTPASSWD):
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin
|
|
||||||
install -m0755 $(PKG_BUILD_DIR)/htpasswd $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin/
|
|
||||||
$(RSTRIP) $(IDIR_MINI_HTTPD_HTPASSWD)
|
|
||||||
$(IPKG_BUILD) $(IDIR_MINI_HTTPD_HTPASSWD) $(PACKAGE_DIR)
|
|
||||||
|
|
||||||
$(IPKG_MINI_HTTPD_MATRIXSSL):
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
|
|
||||||
install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
|
|
||||||
install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
|
|
||||||
install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
|
|
||||||
install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
|
|
||||||
install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
|
|
||||||
$(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
|
|
||||||
$(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
|
|
||||||
|
|
||||||
$(IPKG_MINI_HTTPD_OPENSSL):
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
|
|
||||||
install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
|
|
||||||
install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
|
|
||||||
install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
|
|
||||||
install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
|
|
||||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
|
|
||||||
install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
|
|
||||||
$(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
|
|
||||||
$(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/mini-httpd/install
|
||||||
|
install -d -m0755 $(1)/etc
|
||||||
|
install -m0644 ./files/mini_httpd.conf $(1)/etc/mini_httpd.conf
|
||||||
|
install -d -m0755 $(1)/etc/default
|
||||||
|
install -m0644 ./files/mini_httpd.default $(1)/etc/default/mini_httpd
|
||||||
|
install -d -m0755 $(1)/etc/init.d
|
||||||
|
install -m0755 ./files/mini_httpd.init $(1)/etc/init.d/mini_httpd
|
||||||
|
install -d -m0755 $(1)/usr/sbin
|
||||||
|
install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(1)/usr/sbin/mini_httpd
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/mini-httpd-htpasswd/install
|
||||||
|
install -d -m0755 $(1)/usr/sbin
|
||||||
|
install -m0755 $(PKG_BUILD_DIR)/htpasswd $(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/mini-httpd-matrixssl/install
|
||||||
|
install -d -m0755 $(1)/etc
|
||||||
|
install -m0644 ./files/mini_httpd-ssl.conf $(1)/etc/mini_httpd.conf
|
||||||
|
install -m0600 ./files/mini_httpd.pem $(1)/etc/mini_httpd.pem
|
||||||
|
install -d -m0755 $(1)/etc/default
|
||||||
|
install -m0644 ./files/mini_httpd.default $(1)/etc/default/mini_httpd
|
||||||
|
install -d -m0755 $(1)/etc/init.d
|
||||||
|
install -m0755 ./files/mini_httpd.init $(1)/etc/init.d/mini_httpd
|
||||||
|
install -d -m0755 $(1)/usr/sbin
|
||||||
|
install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(1)/usr/sbin/mini_httpd
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/mini-httpd-openssl/install
|
||||||
|
install -d -m0755 $(1)/etc
|
||||||
|
install -m0644 ./files/mini_httpd-ssl.conf $(1)/etc/mini_httpd.conf
|
||||||
|
install -m0600 ./files/mini_httpd.pem $(1)/etc/mini_httpd.pem
|
||||||
|
install -d -m0755 $(1)/etc/default
|
||||||
|
install -m0644 ./files/mini_httpd.default $(1)/etc/default/mini_httpd
|
||||||
|
install -d -m0755 $(1)/etc/init.d
|
||||||
|
install -m0755 ./files/mini_httpd.init $(1)/etc/init.d/mini_httpd
|
||||||
|
install -d -m0755 $(1)/usr/sbin
|
||||||
|
install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(1)/usr/sbin/mini_httpd
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,mini-httpd))
|
||||||
|
$(eval $(call BuildPackage,mini-httpd-htpasswd))
|
||||||
|
$(eval $(call BuildPackage,mini-httpd-matrixssl))
|
||||||
|
$(eval $(call BuildPackage,mini-httpd-openssl))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user