From: Nicolas Thill Date: Fri, 18 Aug 2006 01:07:20 +0000 (+0000) Subject: fix mini_httpd, standardize X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3a500c00b74da44aa870e5de3ea86d25dfcd744d;p=openwrt%2Fsvn-archive%2Farchive.git fix mini_httpd, standardize SVN-Revision: 4587 --- diff --git a/net/mini_httpd/Makefile b/net/mini_httpd/Makefile index c405abacd8..8c0c8a749b 100644 --- a/net/mini_httpd/Makefile +++ b/net/mini_httpd/Makefile @@ -11,40 +11,44 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mini-httpd PKG_VERSION:=1.19 PKG_RELEASE:=1 -PKG_MD5SUM:=792a529dfe974355aad8ba6c80e54e7a -PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/ +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 -PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION) - include $(INCLUDE_DIR)/package.mk define Package/mini-httpd SECTION:=net CATEGORY:=Network - SUBMENU:=A small web server - 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\\\ -basic features of an HTTP server, including:\\\ -\\\ -* GET, HEAD, and POST methods.\\\ -* CGI.\\\ -* Basic authentication.\\\ -* Security against ".." filename snooping.\\\ -* The common MIME types.\\\ -* Trailing-slash redirection.\\\ -* index.html, index.htm, index.cgi\\\ -* Directory listings.\\\ -* Multihoming / virtual hosting.\\\ -* Standard logging.\\\ -* Custom error pages.\\\ -\\\ -It can also be configured to do IPv6.\\\ + TITLE:=A small web server + 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 \\\ + basic features of an HTTP server, including: \\\ + \\\ + * GET, HEAD, and POST methods.\\\ + * CGI.\\\ + * Basic authentication.\\\ + * Security against ".." filename snooping.\\\ + * The common MIME types.\\\ + * Trailing-slash redirection.\\\ + * index.html, index.htm, index.cgi\\\ + * Directory listings.\\\ + * Multihoming / virtual hosting.\\\ + * Standard logging.\\\ + * Custom error pages.\\\ + \\\ + It can also be configured to do IPv6. URL:=http://www.acme.com/software/mini_httpd/ endef +define Package/mini-httpd/conffiles +/etc/mini_httpd.conf +/etc/default/mini_httpd +endef + define Package/mini-httpd-htpasswd $(call Package/mini-httpd) TITLE:=Utility to generate HTTP access files @@ -57,19 +61,37 @@ define Package/mini-httpd-matrixssl DESCRIPTION+=This package adds SSL/HTTPS. (MatrixSSL) 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 - $(call BuildPackage,mini-httpd) + $(call Package/mini-httpd) TITLE:=A small web server, built with SSL support using OpenSSL DESCRIPTION+=This package adds SSL/HTTPS. (OpenSSL) 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 $(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/ endef define Build/Compile # with MatrixSSL - ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),) + ifneq ($(CONFIG_PACKAGE_mini-httpd-matrixssl),) $(MAKE) -C $(PKG_BUILD_DIR) \ CC=$(TARGET_CC) \ OFLAGS="$(TARGET_CFLAGS)" \ @@ -82,7 +104,7 @@ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) clean endif # with OpenSSL - ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),) + ifneq ($(CONFIG_PACKAGE_mini-httpd-openssl),) $(MAKE) -C $(PKG_BUILD_DIR) \ CC=$(TARGET_CC) \ OFLAGS="$(TARGET_CFLAGS)" \ @@ -94,55 +116,55 @@ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) clean endif # without SSL - ifneq ($(BR2_PACKAGE_MINI_HTTPD),) + ifneq ($(CONFIG_PACKAGE_mini-httpd),) $(MAKE) -C $(PKG_BUILD_DIR) \ CC=$(TARGET_CC) \ OFLAGS="$(TARGET_CFLAGS)" \ all 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 + +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))