From ba3359722cbf8aa7b0ed39e1f81d1d74ec88fecd Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 30 May 2009 20:39:07 +0200 Subject: optimize ipkg package management - generate ipkg control file from PKG_* variables - automatically install init scripts from ./files/*.init set #PKG pkgname to set the binary package - rename FWINIT -> INIT - move postinst and conffiles meta data to ./files - update the packages to the latest upstream version - remove some unready or unused package (strongswan,..) more cleanups needed after allmodconfig --- package/mini_httpd/Makefile | 25 +++++++++++++--------- .../files/mini-httpd-matrixssl.conffiles | 2 ++ .../mini_httpd/files/mini-httpd-matrixssl.postinst | 3 +++ .../mini_httpd/files/mini-httpd-openssl.conffiles | 2 ++ .../mini_httpd/files/mini-httpd-openssl.postinst | 3 +++ package/mini_httpd/files/mini-httpd.conffiles | 1 + package/mini_httpd/files/mini-httpd.postinst | 3 +++ package/mini_httpd/files/mini_httpd.init | 4 +++- .../mini_httpd/ipkg/mini-httpd-htpasswd.control | 4 ---- .../mini_httpd/ipkg/mini-httpd-matrixssl.conffiles | 2 -- .../mini_httpd/ipkg/mini-httpd-matrixssl.control | 5 ----- .../mini_httpd/ipkg/mini-httpd-matrixssl.postinst | 3 --- .../mini_httpd/ipkg/mini-httpd-openssl.conffiles | 2 -- package/mini_httpd/ipkg/mini-httpd-openssl.control | 5 ----- .../mini_httpd/ipkg/mini-httpd-openssl.postinst | 3 --- package/mini_httpd/ipkg/mini-httpd.conffiles | 1 - package/mini_httpd/ipkg/mini-httpd.control | 5 ----- package/mini_httpd/ipkg/mini-httpd.postinst | 3 --- 18 files changed, 32 insertions(+), 44 deletions(-) create mode 100644 package/mini_httpd/files/mini-httpd-matrixssl.conffiles create mode 100644 package/mini_httpd/files/mini-httpd-matrixssl.postinst create mode 100644 package/mini_httpd/files/mini-httpd-openssl.conffiles create mode 100644 package/mini_httpd/files/mini-httpd-openssl.postinst create mode 100644 package/mini_httpd/files/mini-httpd.conffiles create mode 100644 package/mini_httpd/files/mini-httpd.postinst delete mode 100644 package/mini_httpd/ipkg/mini-httpd-htpasswd.control delete mode 100644 package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles delete mode 100644 package/mini_httpd/ipkg/mini-httpd-matrixssl.control delete mode 100644 package/mini_httpd/ipkg/mini-httpd-matrixssl.postinst delete mode 100644 package/mini_httpd/ipkg/mini-httpd-openssl.conffiles delete mode 100644 package/mini_httpd/ipkg/mini-httpd-openssl.control delete mode 100644 package/mini_httpd/ipkg/mini-httpd-openssl.postinst delete mode 100644 package/mini_httpd/ipkg/mini-httpd.conffiles delete mode 100644 package/mini_httpd/ipkg/mini-httpd.control delete mode 100644 package/mini_httpd/ipkg/mini-httpd.postinst (limited to 'package/mini_httpd') diff --git a/package/mini_httpd/Makefile b/package/mini_httpd/Makefile index b85a15589..17f8caced 100644 --- a/package/mini_httpd/Makefile +++ b/package/mini_httpd/Makefile @@ -9,15 +9,23 @@ PKG_NAME:= mini-httpd PKG_VERSION:= 1.19 PKG_RELEASE:= 10 PKG_MD5SUM:= 7c68293ad265ecfe2edea917912f6f1f -MASTER_SITES:= http://www.acme.com/software/mini_httpd/ +PKG_DESCR:= A small HTTP server +PKG_SECTION:= net +PKG_URL:= http://www.acme.com/software/mini_httpd +PKG_SITES:= http://www.acme.com/software/mini_httpd/ + +PKG_DESCR_1:= htpasswd utility +PKG_DESCR_2:= A small HTTP server with SSL support +PKG_DEPENDS_2:= libopenssl + 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})) -$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,${PKG_VERSION}-${PKG_RELEASE})) -$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION})) +$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_2},${PKG_DESCR_2},${PKG_SECTION})) do-build: # with OpenSSL @@ -41,21 +49,18 @@ endif do-install: # without SSL ifneq (${ADK_PACKAGE_MINI_HTTPD},) - ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/etc/init.d + ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/etc ${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/ + ${INSTALL_BIN} ${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_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/etc ${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 diff --git a/package/mini_httpd/files/mini-httpd-matrixssl.conffiles b/package/mini_httpd/files/mini-httpd-matrixssl.conffiles new file mode 100644 index 000000000..38239e4e3 --- /dev/null +++ b/package/mini_httpd/files/mini-httpd-matrixssl.conffiles @@ -0,0 +1,2 @@ +/etc/mini_httpd.conf +/etc/mini_httpd.pem diff --git a/package/mini_httpd/files/mini-httpd-matrixssl.postinst b/package/mini_httpd/files/mini-httpd-matrixssl.postinst new file mode 100644 index 000000000..dfcafaa9e --- /dev/null +++ b/package/mini_httpd/files/mini-httpd-matrixssl.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf '"NO" to disable, "-C /etc/mini_httpd.conf" otherwise' mini_httpd_flags diff --git a/package/mini_httpd/files/mini-httpd-openssl.conffiles b/package/mini_httpd/files/mini-httpd-openssl.conffiles new file mode 100644 index 000000000..38239e4e3 --- /dev/null +++ b/package/mini_httpd/files/mini-httpd-openssl.conffiles @@ -0,0 +1,2 @@ +/etc/mini_httpd.conf +/etc/mini_httpd.pem diff --git a/package/mini_httpd/files/mini-httpd-openssl.postinst b/package/mini_httpd/files/mini-httpd-openssl.postinst new file mode 100644 index 000000000..dfcafaa9e --- /dev/null +++ b/package/mini_httpd/files/mini-httpd-openssl.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf '"NO" to disable, "-C /etc/mini_httpd.conf" otherwise' mini_httpd_flags diff --git a/package/mini_httpd/files/mini-httpd.conffiles b/package/mini_httpd/files/mini-httpd.conffiles new file mode 100644 index 000000000..1bf5a5e26 --- /dev/null +++ b/package/mini_httpd/files/mini-httpd.conffiles @@ -0,0 +1 @@ +/etc/mini_httpd.conf diff --git a/package/mini_httpd/files/mini-httpd.postinst b/package/mini_httpd/files/mini-httpd.postinst new file mode 100644 index 000000000..dfcafaa9e --- /dev/null +++ b/package/mini_httpd/files/mini-httpd.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf '"NO" to disable, "-C /etc/mini_httpd.conf" otherwise' mini_httpd_flags diff --git a/package/mini_httpd/files/mini_httpd.init b/package/mini_httpd/files/mini_httpd.init index 10479a22d..9cf60b3ee 100644 --- a/package/mini_httpd/files/mini_httpd.init +++ b/package/mini_httpd/files/mini_httpd.init @@ -1,5 +1,7 @@ #!/bin/sh -#FWINIT 60 +#PKG mini-httpd +#INIT 60 + . /etc/rc.conf case $1 in diff --git a/package/mini_httpd/ipkg/mini-httpd-htpasswd.control b/package/mini_httpd/ipkg/mini-httpd-htpasswd.control deleted file mode 100644 index 6b80aa6d9..000000000 --- a/package/mini_httpd/ipkg/mini-httpd-htpasswd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: mini-httpd-htpasswd -Priority: optional -Section: net -Description: utility to generate HTTP access authentication files diff --git a/package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles b/package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles deleted file mode 100644 index 38239e4e3..000000000 --- a/package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/mini_httpd.conf -/etc/mini_httpd.pem diff --git a/package/mini_httpd/ipkg/mini-httpd-matrixssl.control b/package/mini_httpd/ipkg/mini-httpd-matrixssl.control deleted file mode 100644 index 5967ac7fb..000000000 --- a/package/mini_httpd/ipkg/mini-httpd-matrixssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mini-httpd-matrixssl -Priority: optional -Section: net -Description: A small HTTP server, built with SSL support using MatrixSSL. -Depends: libmatrixssl diff --git a/package/mini_httpd/ipkg/mini-httpd-matrixssl.postinst b/package/mini_httpd/ipkg/mini-httpd-matrixssl.postinst deleted file mode 100644 index dfcafaa9e..000000000 --- a/package/mini_httpd/ipkg/mini-httpd-matrixssl.postinst +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_rcconf '"NO" to disable, "-C /etc/mini_httpd.conf" otherwise' mini_httpd_flags diff --git a/package/mini_httpd/ipkg/mini-httpd-openssl.conffiles b/package/mini_httpd/ipkg/mini-httpd-openssl.conffiles deleted file mode 100644 index 38239e4e3..000000000 --- a/package/mini_httpd/ipkg/mini-httpd-openssl.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/mini_httpd.conf -/etc/mini_httpd.pem diff --git a/package/mini_httpd/ipkg/mini-httpd-openssl.control b/package/mini_httpd/ipkg/mini-httpd-openssl.control deleted file mode 100644 index 09bfb6682..000000000 --- a/package/mini_httpd/ipkg/mini-httpd-openssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mini-httpd-openssl -Priority: optional -Section: net -Description: A small HTTP server, built with SSL support using OpenSSL. -Depends: libopenssl diff --git a/package/mini_httpd/ipkg/mini-httpd-openssl.postinst b/package/mini_httpd/ipkg/mini-httpd-openssl.postinst deleted file mode 100644 index dfcafaa9e..000000000 --- a/package/mini_httpd/ipkg/mini-httpd-openssl.postinst +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_rcconf '"NO" to disable, "-C /etc/mini_httpd.conf" otherwise' mini_httpd_flags diff --git a/package/mini_httpd/ipkg/mini-httpd.conffiles b/package/mini_httpd/ipkg/mini-httpd.conffiles deleted file mode 100644 index 1bf5a5e26..000000000 --- a/package/mini_httpd/ipkg/mini-httpd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/mini_httpd.conf diff --git a/package/mini_httpd/ipkg/mini-httpd.control b/package/mini_httpd/ipkg/mini-httpd.control deleted file mode 100644 index 6466feed2..000000000 --- a/package/mini_httpd/ipkg/mini-httpd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mini-httpd -Priority: optional -Section: net -Description: A small HTTP server, built with SSL support using MatrixSSL. -Depends: libmatrixssl diff --git a/package/mini_httpd/ipkg/mini-httpd.postinst b/package/mini_httpd/ipkg/mini-httpd.postinst deleted file mode 100644 index dfcafaa9e..000000000 --- a/package/mini_httpd/ipkg/mini-httpd.postinst +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_rcconf '"NO" to disable, "-C /etc/mini_httpd.conf" otherwise' mini_httpd_flags -- cgit v1.2.3