blob: 9d7bbd9cc276c9a703a8602047f216bff0bf1f9d (
plain) (
blame)
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
|
# New ports collection makefile for: apache HTTPD
# Version required: 1.3b2
# Date created: Fri Aug 25 16:42:36 CDT 1995
# Whom: ache@nagual.pp.ru
#
# $Id: Makefile,v 1.39 1997/08/25 23:02:41 ache Exp $
#
DISTNAME= apache_1.3b2
PKGNAME= apache-1.3b2
CATEGORIES= www
MASTER_SITES= ftp://www.apache.org/apache/dist/
MAINTAINER= ache@freebsd.org
# Set it for local-supplied patch, f.e.
# VERS_ID = mods-1.0/me
post-patch:
@cd ${WRKSRC}/conf && \
for I in access.conf-dist srm.conf-dist; do \
sed -e "s#@@ServerRoot@@#${PREFIX}/www#g" < $${I} > $${I}.new; \
mv $${I}.new $${I}; \
done
@cd ${WRKSRC}/conf && \
sed -e "s#@@ServerRoot@@#${PREFIX}/etc/apache#g" < \
httpd.conf-dist > httpd.conf-dist.new && \
mv httpd.conf-dist.new httpd.conf-dist
@${RM} -rf ${WRKSRC}/icons/CVS
.if defined(VERS_ID)
@cd ${WRKSRC}/src && \
mv Configuration Configuration.old && \
sed 's;^#*OPTIM=.*;OPTIM= -DSERVER_SUBVERSION=\\"${VERS_ID}\\";' \
< Configuration.old > Configuration
.endif
CONF_DIR= ${PREFIX}/etc/apache
MAN1= htpasswd.1
MAN8= httpd.8
do-install:
install -d -m 755 -o bin -g bin ${CONF_DIR} ${PREFIX}/www/data \
${PREFIX}/www/icons ${PREFIX}/www/cgi-bin
${INSTALL_PROGRAM} ${WRKSRC}/src/httpd ${PREFIX}/sbin
cd ${WRKSRC}/src/support && \
${INSTALL_PROGRAM} htdigest htpasswd logresolve rotatelogs \
${PREFIX}/sbin
cd ${WRKSRC}/src/support && \
${INSTALL_SCRIPT} apachectl dbmmanage log_server_status \
${PREFIX}/sbin
${INSTALL_DATA} -o nobody ${WRKSRC}/icons/* ${PREFIX}/www/icons
${INSTALL_MAN} ${WRKSRC}/src/support/httpd.8 \
${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/src/support/htpasswd.1 \
${PREFIX}/man/man1
cd ${WRKSRC} && \
for file in httpd.conf srm.conf access.conf ; do \
if [ ! -f ${CONF_DIR}/$$file ] ; then \
${INSTALL_DATA} conf/$$file-dist ${CONF_DIR}/$$file ; \
fi ; \
${INSTALL_DATA} conf/$$file-dist ${CONF_DIR} ; \
done
cd ${WRKSRC} && \
for file in mime.types magic ; do \
if [ ! -f ${CONF_DIR}/$$file ] ; then \
${INSTALL_DATA} conf/$$file ${CONF_DIR} ; \
fi ; \
${INSTALL_DATA} conf/$$file ${CONF_DIR}/$${file}-dist ; \
done
post-install:
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
echo "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
echo "#!/bin/sh" > ${PREFIX}/etc/rc.d/apache.sh; \
echo "[ -x /usr/local/sbin/httpd ] && /usr/local/sbin/httpd && echo -n ' httpd'" >> ${PREFIX}/etc/rc.d/apache.sh; \
chmod 751 ${PREFIX}/etc/rc.d/apache.sh; \
fi
.include <bsd.port.mk>
|