summaryrefslogtreecommitdiffstats
path: root/www/apache20
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2002-04-18 20:29:41 +0000
committerijliao <ijliao@FreeBSD.org>2002-04-18 20:29:41 +0000
commitd3e1f82c0d7d25387ebe34a254ec4d3e3fe9f8b5 (patch)
tree9cd9c2afdea6da31ddf3ee5befda9cc70839407a /www/apache20
parent08d2f60dacfb0ded591ee0c39d370d068a0bca92 (diff)
downloadFreeBSD-ports-d3e1f82c0d7d25387ebe34a254ec4d3e3fe9f8b5.zip
FreeBSD-ports-d3e1f82c0d7d25387ebe34a254ec4d3e3fe9f8b5.tar.gz
Respect $DESTDIR for all paths
PR: 37211 Submitted by: maintainer
Diffstat (limited to 'www/apache20')
-rw-r--r--www/apache20/Makefile9
-rw-r--r--www/apache20/files/apache.sh2
-rw-r--r--www/apache20/files/config.layout22
-rw-r--r--www/apache20/files/patch-Makefile.in23
-rw-r--r--www/apache20/files/patch-config.layout29
-rw-r--r--www/apache20/files/patch-docs:conf:ssl-std.conf16
-rw-r--r--www/apache20/files/patch-support:log_server_status.in2
-rw-r--r--www/apache20/pkg-plist2
8 files changed, 59 insertions, 46 deletions
diff --git a/www/apache20/Makefile b/www/apache20/Makefile
index 3d83bc6..d2e3f3d 100644
--- a/www/apache20/Makefile
+++ b/www/apache20/Makefile
@@ -41,7 +41,9 @@ CONFIGURE_ENV= CC="${CC}" CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}"
SHARED_MODULES= all cgid charset_lite ext_filter case_filter case_filter_in \
deflate bucketeer
-RC_SUB= -e 's,@@PREFIX@@,${PREFIX},g'
+RC_SUB= -e 's,@@PREFIX@@,${PREFIX},g' -e 's,@@DESTDIR@@,${DESTDIR},g'
+MAKE_ENV+= DESTDIR=${DESTDIR}
+PLIST_SUB+= DESTDIR=${DESTDIR}
.if defined(NOPORTDOCS)
MAKE_ENV+= NOPORTDOCS=YES
@@ -68,7 +70,7 @@ CONFIGURE_ARGS+= --enable-suexec \
--with-suexec-uidmin=1000 --with-suexec-gidmin=1000 \
--with-suexec-docroot="${PREFIX}/www/data" \
--with-suexec-safepath="${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin" \
- --with-suexec-logfile="/var/log/httpd-suexec.log"
+ --with-suexec-logfile="${DESTDIR}/var/log/httpd-suexec.log"
PLIST_SUB+= SUEXEC=""
.else
PLIST_SUB+= SUEXEC="@comment "
@@ -112,6 +114,7 @@ post-patch:
); done
@${FIND} ${WRKSRC} -name "*.orig" -exec ${RM} -f {} \;
@${SED} ${RC_SUB} ${FILESDIR}/apache.sh >${WRKDIR}/apache2.sh
+ @${SED} ${RC_SUB} ${FILESDIR}/config.layout >>${WRKSRC}/config.layout
.if ${OSVERSION} >= 500032
.for ltfile in srclib/pcre/ltmain.sh srclib/apr/build/ltmain.sh \
srclib/apr-util/xml/expat/conftools/ltmain.sh
@@ -128,5 +131,7 @@ post-install:
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache2.sh startup file."; \
${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache2.sh ${PREFIX}/etc/rc.d/apache2.sh; \
fi
+ [ -d ${DESTDIR}/var/log ] || ${MKDIR} ${DESTDIR}/var/log
+ [ -d ${DESTDIR}/var/run ] || ${MKDIR} ${DESTDIR}/var/run
.include <bsd.port.post.mk>
diff --git a/www/apache20/files/apache.sh b/www/apache20/files/apache.sh
index ab1a718..82405c6 100644
--- a/www/apache20/files/apache.sh
+++ b/www/apache20/files/apache.sh
@@ -7,7 +7,7 @@ start)
[ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start${SSL} > /dev/null && echo -n ' apache2'
;;
stop)
- [ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null && echo -n ' apache2'
+ [ -r @@DESTDIR@@/var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null && echo -n ' apache2'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
diff --git a/www/apache20/files/config.layout b/www/apache20/files/config.layout
new file mode 100644
index 0000000..9344b82
--- /dev/null
+++ b/www/apache20/files/config.layout
@@ -0,0 +1,22 @@
+<Layout FreeBSD>
+ prefix: /usr/local
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libexecdir: ${exec_prefix}/libexec/apache2
+ mandir: ${prefix}/man
+ sysconfdir: ${prefix}/etc/apache2
+ datadir: ${prefix}/www
+ installbuilddir: ${prefix}/share/apache2
+ errordir: ${datadir}/error
+ iconsdir: ${datadir}/icons
+ htdocsdir: ${datadir}/data
+ manualdir: ${prefix}/share/doc/apache2
+ cgidir: ${datadir}/cgi-bin
+ includedir: ${prefix}/include/apache2
+ localstatedir: @@DESTDIR@@/var
+ runtimedir: ${localstatedir}/run
+ logfiledir: ${localstatedir}/log
+ proxycachedir: ${datadir}/proxy
+ infodir: ${exec_prefix}/share/info
+</Layout>
diff --git a/www/apache20/files/patch-Makefile.in b/www/apache20/files/patch-Makefile.in
index 6e19ed4..5c784dd 100644
--- a/www/apache20/files/patch-Makefile.in
+++ b/www/apache20/files/patch-Makefile.in
@@ -1,6 +1,6 @@
--- Makefile.in.orig Sat Apr 6 04:36:06 2002
-+++ Makefile.in Sun Apr 7 08:26:45 2002
-@@ -33,12 +33,15 @@
++++ Makefile.in Thu Apr 18 09:22:29 2002
+@@ -33,23 +33,28 @@
@test -d $(sysconfdir) || $(MKINSTALLDIRS) $(sysconfdir)
@cd $(top_srcdir)/docs/conf; \
for i in mime.types magic; do \
@@ -17,7 +17,20 @@
( \
n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
-@@ -57,7 +60,7 @@
+ sed -e 's#@@ServerRoot@@#$(prefix)#g' \
+ -e 's#@@Port@@#$(PORT)#g' \
++ -e 's#@@DESTDIR@@#$(DESTDIR)#g' \
+ -e '/@@LoadModule@@/d' \
+ < $$i; \
+ else \
+ sed -n -e '/@@LoadModule@@/q' \
+ -e 's#@@ServerRoot@@#$(prefix)#g' \
+ -e 's#@@Port@@#$(PORT)#g' \
++ -e 's#@@DESTDIR@@#$(DESTDIR)#g' \
+ -e 'p' \
+ < $$i; \
+ for j in $(DSO_MODULES) "^EOL^"; do \
+@@ -57,7 +62,7 @@
echo "<IfDefine SSL>"; \
fi; \
if test $$j != "^EOL^"; then \
@@ -26,7 +39,7 @@
fi; \
if test "x$$j" = "xssl"; then \
echo "</IfDefine>"; \
-@@ -106,11 +109,14 @@
+@@ -106,11 +111,14 @@
install-htdocs:
@echo Installing HTML documents
@@ -44,7 +57,7 @@
install-error:
@echo Installing error documents
-@@ -126,9 +132,10 @@
+@@ -126,9 +134,10 @@
install-cgi:
@echo Installing CGIs
diff --git a/www/apache20/files/patch-config.layout b/www/apache20/files/patch-config.layout
deleted file mode 100644
index 55349a3..0000000
--- a/www/apache20/files/patch-config.layout
+++ /dev/null
@@ -1,29 +0,0 @@
---- config.layout.orig Fri Mar 29 04:04:47 2002
-+++ config.layout Sun Apr 7 06:27:03 2002
-@@ -309,3 +309,26 @@
- installbuilddir: ${prefix}/etc/apache2/build
- errordir: ${datadir}/error
- </Layout>
-+
-+<Layout FreeBSD>
-+ prefix: /usr/local
-+ exec_prefix: ${prefix}
-+ bindir: ${exec_prefix}/bin
-+ sbindir: ${exec_prefix}/sbin
-+ libexecdir: ${exec_prefix}/libexec/apache2
-+ mandir: ${prefix}/man
-+ sysconfdir: ${prefix}/etc/apache2
-+ datadir: ${prefix}/www
-+ installbuilddir: ${prefix}/share/apache2
-+ errordir: ${datadir}/error
-+ iconsdir: ${datadir}/icons
-+ htdocsdir: ${datadir}/data
-+ manualdir: ${prefix}/share/doc/apache2
-+ cgidir: ${datadir}/cgi-bin
-+ includedir: ${prefix}/include/apache2
-+ localstatedir: /var
-+ runtimedir: ${localstatedir}/run
-+ logfiledir: ${localstatedir}/log
-+ proxycachedir: ${datadir}/proxy
-+ infodir: ${exec_prefix}/share/info
-+</Layout>
diff --git a/www/apache20/files/patch-docs:conf:ssl-std.conf b/www/apache20/files/patch-docs:conf:ssl-std.conf
index b13bee0..267aaae 100644
--- a/www/apache20/files/patch-docs:conf:ssl-std.conf
+++ b/www/apache20/files/patch-docs:conf:ssl-std.conf
@@ -7,16 +7,16 @@
-#SSLSessionCache shmht:logs/ssl_scache(512000)
-#SSLSessionCache shmcb:logs/ssl_scache(512000)
-SSLSessionCache dbm:logs/ssl_scache
-+#SSLSessionCache shmht:/var/log/httpd-ssl_scache(512000)
-+#SSLSessionCache shmcb:/var/log/httpd-ssl_scache(512000)
-+SSLSessionCache dbm:/var/log/httpd-ssl_scache
++#SSLSessionCache shmht:@@DESTDIR@@/var/log/httpd-ssl_scache(512000)
++#SSLSessionCache shmcb:@@DESTDIR@@/var/log/httpd-ssl_scache(512000)
++SSLSessionCache dbm:@@DESTDIR@@/var/log/httpd-ssl_scache
SSLSessionCacheTimeout 300
# Semaphore:
# Configure the path to the mutual exclusion semaphore the
# SSL engine uses internally for inter-process synchronization.
-SSLMutex file:logs/ssl_mutex
-+SSLMutex file:/var/log/httpd-ssl_mutex
++SSLMutex file:@@DESTDIR@@/var/log/httpd-ssl_mutex
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the
@@ -25,7 +25,7 @@
# Log levels are (ascending order: higher ones include lower ones):
# none, error, warn, info, trace, debug.
-SSLLog logs/ssl_engine_log
-+SSLLog /var/log/httpd-ssl_engine_log
++SSLLog @@DESTDIR@@/var/log/httpd-ssl_engine_log
SSLLogLevel info
##
@@ -39,8 +39,8 @@
ServerAdmin you@your.address
-ErrorLog logs/error_log
-TransferLog logs/access_log
-+ErrorLog /var/log/httpd-error.log
-+TransferLog /var/log/httpd-access.log
++ErrorLog @@DESTDIR@@/var/log/httpd-error.log
++TransferLog @@DESTDIR@@/var/log/httpd-access.log
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
@@ -110,7 +110,7 @@
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
-CustomLog logs/ssl_request_log \
-+CustomLog /var/log/httpd-ssl_request.log \
++CustomLog @@DESTDIR@@/var/log/httpd-ssl_request.log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
diff --git a/www/apache20/files/patch-support:log_server_status.in b/www/apache20/files/patch-support:log_server_status.in
index 191377e..652edf4 100644
--- a/www/apache20/files/patch-support:log_server_status.in
+++ b/www/apache20/files/patch-support:log_server_status.in
@@ -5,7 +5,7 @@
require 'sys/socket.ph';
-$wherelog = "/var/log/graph/"; # Logs will be like "/var/log/graph/19960312"
-+$wherelog = "/var/log/httpd-status-"; # Logs will be like "/var/log/httpd-status-19960312.log"
++$wherelog = "@logfiledir@/httpd-status-"; # Logs will be like "/var/log/httpd-status-19960312.log"
$server = "localhost"; # Name of server, could be "www.foo.com"
$port = "80"; # Port on server
-$request = "/status/?auto"; # Request to send
diff --git a/www/apache20/pkg-plist b/www/apache20/pkg-plist
index 00cbaa9..d9ab005 100644
--- a/www/apache20/pkg-plist
+++ b/www/apache20/pkg-plist
@@ -815,3 +815,5 @@ www/icons/world2.png
@dirrm lib/apache2
@dirrm include/apache2
@dirrm etc/apache2
+@exec [ -d %%DESTDIR%%/var/log ] || mkdir -p %%DESTDIR%%/var/log
+@exec [ -d %%DESTDIR%%/var/run ] || mkdir -p %%DESTDIR%%/var/run
OpenPOWER on IntegriCloud