- apache20 has no SLAVE_PORTS so cleanup and simplify Makefile.modules
- use port framework instead pkg-install to check for www user - no REVISION bump, logic / functionality has not changed with hat apache@
This commit is contained in:
parent
2ad61fc849
commit
cd86643c54
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=301342
@ -26,6 +26,9 @@ LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2 \
|
||||
pcre:${PORTSDIR}/devel/pcre \
|
||||
apr-0:${PORTSDIR}/devel/apr0
|
||||
|
||||
USERS= www
|
||||
GROUPS= www
|
||||
|
||||
MAKE_JOBS_SAFE= yes
|
||||
|
||||
DEPRECATED= will be unsupported by ASF when 2.4.0 is release, migrate to 2.2.x+ now
|
||||
@ -216,9 +219,6 @@ post-configure:
|
||||
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," \
|
||||
${WRKSRC}/support/envvars-std
|
||||
|
||||
pre-install:
|
||||
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${PREFIX}/etc/apache2/envvars.d
|
||||
@${MKDIR} ${PREFIX}/etc/apache2/Includes
|
||||
|
@ -13,50 +13,51 @@
|
||||
#
|
||||
|
||||
# MPM section:
|
||||
# << TO BE WRITTEN >>
|
||||
.if defined (SLAVE_PORT_MPM)
|
||||
PLIST_SUB+= PREFORK="@comment " WORKER="@comment "
|
||||
PKGNAMESUFFIX= -${SLAVE_PORT_MPM}
|
||||
# WITH_MPM: prefork worker perchild threadpool itk
|
||||
|
||||
.if ${WITH_MPM:L} == "prefork"
|
||||
PLIST_SUB+= WORKER="@comment " THREADPOOL="@comment "
|
||||
|
||||
.elif ${WITH_MPM:L} == "worker"
|
||||
PLIST_SUB+= WORKER="" THREADPOOL="@comment "
|
||||
|
||||
.elif ${WITH_MPM:L} == "threadpool"
|
||||
PLIST_SUB+= WORKER="@comment " THREADPOOL=""
|
||||
|
||||
.elif ${WITH_MPM:L} == "perchild"
|
||||
PLIST_SUB+= WORKER="@comment " THREADPOOL="@comment "
|
||||
|
||||
.elif ${WITH_MPM:L} == "itk"
|
||||
PLIST_SUB+= WORKER="@comment " THREADPOOL="@comment "
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-${MPM_ITK_VERSION}
|
||||
|
||||
.else
|
||||
. if ${WITH_MPM} != "prefork"
|
||||
IGNORE= "Unknown MPM: ${WITH_MPM}"
|
||||
.endif # MPM prefork
|
||||
|
||||
.if ${WITH_MPM:L} != "prefork"
|
||||
PKGNAMESUFFIX= -${WITH_MPM:L}
|
||||
. if ${WITH_MPM:L} != "itk"
|
||||
.endif
|
||||
|
||||
.if ${WITH_MPM:L} == "worker" || ${WITH_MPM:L} == "perchild" || ${WITH_MPM:L} == "threadpool"
|
||||
WITH_THREADS= yes
|
||||
WITH_THREADS_MODULES= yes
|
||||
WITHOUT_MODULES+= cgi
|
||||
. endif
|
||||
. if ${WITH_MPM:L} == "worker"
|
||||
PLIST_SUB+= PREFORK="@comment " WORKER="" THREADPOOL="@comment "
|
||||
. elif ${WITH_MPM:L} == "perchild"
|
||||
PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment "
|
||||
. elif ${WITH_MPM:L} == "threadpool"
|
||||
PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL=""
|
||||
. elif ${WITH_MPM:L} == "itk"
|
||||
PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment "
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-${MPM_ITK_VERSION}
|
||||
. else
|
||||
IGNORE= "Unknown MPM: ${WITH_MPM}"
|
||||
. endif
|
||||
. else
|
||||
PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment "
|
||||
. endif
|
||||
.else
|
||||
PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment "
|
||||
.endif
|
||||
|
||||
# xDBM section
|
||||
#
|
||||
.if !defined(WITH_DBM)
|
||||
. if defined(WITH_BDB) || defined(WITH_BDB_BASE) || defined(WITH_BERKELEYDB)
|
||||
WITH_DBM=bdb
|
||||
WITH_DBM= bdb
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.if defined(WITH_BERKELEYDB) && !defined(WITH_BDB_VER)
|
||||
. if ${WITH_BERKELEYDB} == "FreeBSD"
|
||||
WITH_BDB_BASE=YES
|
||||
WITH_BDB_BASE=YES
|
||||
. else
|
||||
WITH_BDB_VER=${WITH_BERKELEYDB:S/db//}
|
||||
WITH_BDB_VER=${WITH_BERKELEYDB:S/db//}
|
||||
. endif
|
||||
.endif
|
||||
|
||||
@ -64,19 +65,19 @@ WITH_DBM=bdb
|
||||
. if ${WITH_DBM:L} == "sdbm"
|
||||
CONFIGURE_ARGS+= --with-dbm=sdbm
|
||||
. elif ${WITH_DBM:L} == "ndbm"
|
||||
CONFIGURE_ARGS+= --with-ndbm
|
||||
CONFIGURE_ARGS+= --with-ndbm
|
||||
. elif ${WITH_DBM:L} == "gdbm"
|
||||
LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm
|
||||
CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE}
|
||||
. elif ${WITH_DBM:L} == "db" || ${WITH_DBM:L} == "bdb"
|
||||
. if defined(WITH_BDB_BASE)
|
||||
CONFIGURE_ARGS+= --with-dbm=db185 \
|
||||
--with-berkeley-db=/usr
|
||||
CONFIGURE_ARGS+= --with-dbm=db185 \
|
||||
--with-berkeley-db=/usr
|
||||
. else
|
||||
USE_BDB= yes
|
||||
USE_BDB= yes
|
||||
INVALID_BDB_VER= 46 47
|
||||
CONFIGURE_ARGS+= --with-dbm=db${BDB_VER:S/40/4/} \
|
||||
--with-berkeley-db=${LOCALBASE}
|
||||
CONFIGURE_ARGS+= --with-dbm=db${BDB_VER:S/40/4/} \
|
||||
--with-berkeley-db=${LOCALBASE}
|
||||
. endif
|
||||
. else
|
||||
. else
|
||||
|
@ -1,35 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if [ "$2" != "PRE-INSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
WWWUSER=www
|
||||
WWWGROUP=${WWWUSER}
|
||||
WWWUID=80
|
||||
WWWGID=${WWWUID}
|
||||
|
||||
if ! pw groupshow "${WWWGROUP}" 2>/dev/null 1>&2; then
|
||||
if pw groupadd ${WWWGROUP} -g ${WWWGID}; then
|
||||
echo "Added group \"${WWWGROUP}\"."
|
||||
else
|
||||
echo "Adding group \"${WWWGROUP}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! pw usershow "${WWWUSER}" 2>/dev/null 1>&2; then
|
||||
if pw useradd ${WWWUSER} -u ${WWWUID} -g ${WWWGROUP} -h - \
|
||||
-s "/sbin/nologin" -d "/nonexistent" \
|
||||
-c "World Wide Web Owner"; \
|
||||
then
|
||||
echo "Added user \"${WWWUSER}\"."
|
||||
else
|
||||
echo "Adding user \"${WWWUSER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user