blob: 44424decd4376241a5f50d81ab41adebd5680246 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# New ports collection makefile for: apache
# http://www.apache.org
# Version required: 1.3b5
# Date created: 18 Mar 1998
# Whom: cjs@netbsd.org
#
# $NetBSD: Makefile,v 1.5 1998/03/24 20:34:57 cjs Exp $
# FreeBSD Id: Makefile,v 1.45 1998/02/25 06:23:55 asami Exp
#
DISTNAME= apache_1.3b5
PKGNAME= apache-1.3b5
WRKROOT= ${WRKDIR}/apache_1.3b5
WRKSRC= ${WRKROOT}/src
CATEGORIES= www
MASTER_SITES= http://www.apache.org/dist/
MAINTAINER= cjs@netbsd.org
CONFIGURE_SCRIPT=Configure
HAS_CONFIGURE= YES
HTTP_ROOT= ${PREFIX}/http
CONF_DIR= ${HTTP_ROOT}/conf
MAN1= apachectl.1 htpasswd.1
MAN8= httpd.8
# Set this for local-supplied patch, e.e.
# VERS_ID = mods-1.0/me
post-build:
(cd ${WRKSRC}/support && make)
post-patch:
@cd ${WRKSRC} && \
${SED} -e 's#^EXTRA_CFLAGS=#& -DHTTPD_ROOT=\\"${HTTP_ROOT}\\"#' \
< Configuration > Configuration.new && \
${MV} Configuration.new Configuration
@cd ${WRKROOT}/conf && \
for I in httpd.conf-dist access.conf-dist srm.conf-dist; do \
${SED} -e 's#@@ServerRoot@@#${HTTP_ROOT}#g' < $${I} > $${I}.new && \
${MV} $${I}.new $${I}; \
done
@cd ${WRKROOT}/conf && \
${SED} -e "s#^PidFile .*/#PidFile /var/run/#" < httpd.conf-dist \
>httpd.conf-dist.new && \
${MV} httpd.conf-dist.new httpd.conf-dist
@cd ${WRKSRC}/support && \
${SED} -e 's#/usr/local/apache/logs/#/var/run/#' \
-e 's#/usr/local/apache/src/#/usr/pkg/sbin/#' \
< apachectl >apachectl.new && \
${MV} apachectl.new apachectl
.if defined(VERS_ID)
@cd ${WRKSRC} && \
${MV} Configuration Configuration.old && \
${SED} 's;^#*OPTIM=.*;OPTIM= -DSERVER_SUBVERSION=\\"${VERS_ID}\\";' \
< Configuration.old > Configuration
.endif
do-install:
${INSTALL} -d -m 755 -o bin -g bin ${CONF_DIR} ${HTTP_ROOT}/htdocs \
${HTTP_ROOT}/icons ${HTTP_ROOT}/cgi-bin ${HTTP_ROOT}/logs
${INSTALL_PROGRAM} ${WRKSRC}/httpd ${PREFIX}/sbin
cd ${WRKSRC}/support && \
${INSTALL_PROGRAM} htdigest htpasswd logresolve ${PREFIX}/bin
cd ${WRKSRC}/support && \
${INSTALL_SCRIPT} dbmmanage ${PREFIX}/bin
cd ${WRKSRC}/support && \
${INSTALL_SCRIPT} rotatelogs apachectl log_server_status \
${PREFIX}/sbin
${INSTALL_DATA} -o nobody ${WRKROOT}/icons/* ${HTTP_ROOT}/icons
${INSTALL_MAN} ${WRKSRC}/support/httpd.8 \
${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/support/htpasswd.1 \
${WRKSRC}/support/apachectl.1 \
${PREFIX}/man/man1
cd ${WRKROOT}/conf && \
for file in httpd.conf srm.conf access.conf ; do \
if [ ! -f ${CONF_DIR}/$$file ] ; then \
${INSTALL_DATA} $$file-dist ${CONF_DIR}/$$file ; \
fi ; \
${INSTALL_DATA} $$file-dist ${CONF_DIR} ; \
done
cd ${WRKROOT}/conf && \
for file in mime.types magic ; do \
if [ ! -f ${CONF_DIR}/$$file ] ; then \
${INSTALL_DATA} $$file ${CONF_DIR} ; \
fi ; \
${INSTALL_DATA} $$file ${CONF_DIR}/$${file}-dist ; \
done
.include <bsd.port.mk>
|