- fixup Makefile

- expand upon comment about supporting dynamic loading
- no need to "mkdir ${WRKSRC}" in post-extract target
- add better enable script and rename it from gzip-enable to
mod_gzip-enable to match the module name
- replace INSTALL script with MESSAGE
This commit is contained in:
brad 2001-08-13 03:27:09 +00:00
parent d77cc0c791
commit 39340fdb0a
6 changed files with 47 additions and 76 deletions

View File

@ -1,15 +1,21 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/07/15 22:52:45 avsm Exp $
# $OpenBSD: Makefile,v 1.2 2001/08/13 03:27:09 brad Exp $
COMMENT= "transparently compress Apache output"
# This port currently only works with archs supporting dynamic loading
# and has Apache that supports DSO's.
ONLY_FOR_ARCHS= i386 m68k sparc
VERSION= 1.3.19.1a
DISTNAME= mod_gzip.c
PKGNAME= mod_gzip-${VERSION}
CATEGORIES= www
NEED_VERSION= 1.364
NEED_VERSION= 1.435
MASTER_SITES= http://www.remotecommunications.com/apache/mod_gzip/src/${VERSION}/
EXTRACT_SUFX= .gz
HOMEPAGE= http://www.remotecommunications.com/apache/mod_gzip/
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
PERMIT_PACKAGE_CDROM= Yes
@ -17,24 +23,21 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
# This port current only works with archs supporting dynamic loading.
ONLY_FOR_ARCHS= i386 m68k sparc
SUBST_VARS= PKGNAME
EXTRACT_SUFX= .gz
WRKDIST= ${WRKDIR}
post-extract:
@mkdir -p ${WRKSRC}
@cp ${FILESDIR}/Makefile.OpenBSD ${WRKSRC}/Makefile
@cp -f ${FILESDIR}/Makefile.OpenBSD ${WRKSRC}/Makefile
post-build:
@sed 's,y0y0y0,${TRUEPREFIX},' \
< ${FILESDIR}/gzip-enable > ${WRKSRC}/gzip-enable
@sed 's,!!PREFIX!!,${PREFIX},' \
< ${FILESDIR}/mod_gzip-enable > ${WRKBUILD}/mod_gzip-enable
do-install:
${INSTALL_DATA} ${WRKSRC}/mod_gzip.so ${PREFIX}/lib
${INSTALL_SCRIPT} ${WRKSRC}/gzip-enable ${PREFIX}/sbin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mod_gzip
${INSTALL_DATA} ${WRKBUILD}/mod_gzip.so ${PREFIX}/lib
${INSTALL_SCRIPT} ${WRKBUILD}/mod_gzip-enable ${PREFIX}/sbin
${INSTALL_DATA} ${FILESDIR}/mod_gzip.conf.sample ${PREFIX}/share/examples/mod_gzip
.include <bsd.port.mk>

View File

@ -1,13 +0,0 @@
#!/bin/sh
#
# $OpenBSD: gzip-enable,v 1.1.1.1 2001/07/15 22:52:45 avsm Exp $
MODULE=y0y0y0/lib/mod_gzip.so
if [ ! -f ${MODULE} ]; then
echo "can't find GZip module (${MODULE})"
exit 1
else
echo "enabling gzip module..."
/usr/sbin/apxs -i -a -n gzip ${MODULE}
fi

View File

@ -0,0 +1,18 @@
#!/bin/sh
#
# $OpenBSD: mod_gzip-enable,v 1.1 2001/08/13 03:27:09 brad Exp $
MODULE=!!PREFIX!!/lib/mod_gzip.so
if [ `id -u` -ne 0 ]; then
echo "You must be root to run this script."
exit
fi
if [ ! -f ${MODULE} ]; then
echo "Can not find mod_gzip module (${MODULE})"
exit 1
else
echo "Enabling GZip module..."
/usr/sbin/apxs -i -a -n gzip ${MODULE}
fi

View File

@ -1,50 +0,0 @@
#!/bin/sh
#
# $OpenBSD: INSTALL,v 1.1.1.1 2001/07/15 22:52:46 avsm Exp $
#
# mod_gzip installation
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
do_notice()
{
echo
echo "+---------------"
echo "| To finish the install, you need to enable the gzip"
echo "| module using the following command"
echo "|"
echo "| $PREFIX/sbin/gzip-enable"
echo "|"
echo "| Also, copy the following file into your Apache config:"
echo "| ${PREFIX}/share/examples/mod_gzip/mod_gzip.conf.sample"
echo "+---------------"
echo
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
do_notice $1
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

13
www/mod_gzip/pkg/MESSAGE Normal file
View File

@ -0,0 +1,13 @@
+---------------
| To finish the install of ${PKGNAME}, you need
| to enable the module using the following command
|
| ${PREFIX}/sbin/mod_gzip-enable
|
| Also, copy the following file into your Apache config:
| ${PREFIX}/share/examples/mod_gzip/mod_gzip.conf.sample
|
| If you already have Apache running on your machine,
| you should not use "apachectl restart" - instead,
| you fully stop and then restart the server.
+---------------

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/07/15 22:52:46 avsm Exp $
@comment $OpenBSD: PLIST,v 1.2 2001/08/13 03:27:09 brad Exp $
lib/mod_gzip.so
sbin/gzip-enable
sbin/mod_gzip-enable
share/examples/mod_gzip/mod_gzip.conf.sample
@dirrm share/examples/mod_gzip