summaryrefslogtreecommitdiff
path: root/package/mini_httpd/Makefile
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/mini_httpd/Makefile
Initial import
Diffstat (limited to 'package/mini_httpd/Makefile')
-rw-r--r--package/mini_httpd/Makefile63
1 files changed, 63 insertions, 0 deletions
diff --git a/package/mini_httpd/Makefile b/package/mini_httpd/Makefile
new file mode 100644
index 000000000..5799b39f4
--- /dev/null
+++ b/package/mini_httpd/Makefile
@@ -0,0 +1,63 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= mini-httpd
+PKG_VERSION:= 1.19
+PKG_RELEASE:= 10
+PKG_MD5SUM:= 7c68293ad265ecfe2edea917912f6f1f
+MASTER_SITES:= http://www.acme.com/software/mini_httpd/
+DISTFILES:= mini_httpd-${PKG_VERSION}.tar.gz
+WRKDIST= ${WRKDIR}/mini_httpd-${PKG_VERSION}
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+do-build:
+ # with OpenSSL
+ifneq (${ADK_PACKAGE_MINI_HTTPD_OPENSSL},)
+ ${MAKE} -C ${WRKBUILD} \
+ CC="${TARGET_CC}" \
+ SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
+ SSL_INC="-I${STAGING_DIR}/usr/include" \
+ SSL_LIBS="-L${STAGING_DIR}/usr/lib -lssl -lcrypto" \
+ all
+ (cd ${WRKBUILD}; mv mini_httpd mini_httpd-openssl; )
+ ${MAKE} -C ${WRKBUILD} clean
+endif
+ # without SSL
+ifneq (${ADK_PACKAGE_MINI_HTTPD},)
+ ${MAKE} -C ${WRKBUILD} \
+ CC="${TARGET_CC}" \
+ all
+endif
+
+do-install:
+ # without SSL
+ifneq (${ADK_PACKAGE_MINI_HTTPD},)
+ ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/etc/init.d
+ ${INSTALL_DATA} ./files/mini_httpd.conf ${IDIR_MINI_HTTPD}/etc/mini_httpd.conf
+ ${INSTALL_BIN} ./files/mini_httpd.init ${IDIR_MINI_HTTPD}/etc/init.d/mini_httpd
+ ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/usr/sbin
+ ${INSTALL_BIN} ${WRKBUILD}/mini_httpd ${IDIR_MINI_HTTPD}/usr/sbin/
+ ${INSTALL_DIR} ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin
+ install -m0755 ${WRKBUILD}/htpasswd ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin/
+endif
+ # with OpenSSL
+ifneq (${ADK_PACKAGE_MINI_HTTPD_OPENSSL},)
+ ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/etc/init.d
+ ${INSTALL_DATA} ./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_BIN} ./files/mini_httpd.init \
+ ${IDIR_MINI_HTTPD_OPENSSL}/etc/init.d/mini_httpd
+ ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin
+ ${INSTALL_BIN} ${WRKBUILD}/mini_httpd-openssl ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin/mini_httpd
+endif
+
+include ${TOPDIR}/mk/pkg-bottom.mk