You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by fu...@apache.org on 2007/12/18 03:48:01 UTC
svn commit: r605070 - in /httpd/mod_ftp/trunk: NWGNUmakefile
build/mkconfNW.awk
Author: fuankg
Date: Mon Dec 17 18:48:00 2007
New Revision: 605070
URL: http://svn.apache.org/viewvc?rev=605070&view=rev
Log:
added processing of the conf file.
Added:
httpd/mod_ftp/trunk/build/mkconfNW.awk (with props)
Modified:
httpd/mod_ftp/trunk/NWGNUmakefile
Modified: httpd/mod_ftp/trunk/NWGNUmakefile
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/NWGNUmakefile?rev=605070&r1=605069&r2=605070&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/NWGNUmakefile (original)
+++ httpd/mod_ftp/trunk/NWGNUmakefile Mon Dec 17 18:48:00 2007
@@ -14,6 +14,17 @@
include $(AP_WORK)\build\NWGNUhead.inc
#
+# Make sure all needed macro's are defined
+#
+
+ifndef FTPPORT
+FTPPORT = 8021
+endif
+ifndef FTPROOT
+FTPROOT = ftproot
+endif
+
+#
# build this level's files
#
@@ -21,11 +32,12 @@
# installation area
#
install :: nlms FORCE
+ $(CHKNOT) $(INSTALL)\$(BASEDIR)\$(FTPROOT)\nul mkdir $(INSTALL)\$(BASEDIR)\$(FTPROOT)
xcopy $(XCOPYSW) docs\manual $(INSTALL)\$(BASEDIR)\manual
ifeq "$(wildcard $(INSTALL)\$(BASEDIR)\conf\extra)" "$(INSTALL)\$(BASEDIR)\conf\extra"
- copy docs\conf\extra\ftpd.conf $(INSTALL)\$(BASEDIR)\conf\extra\*.*
+ -$(AWK) -v BDIR=$(BASEDIR) -v PORT=$(FTPPORT) -f build\mkconfnw.awk docs\conf\extra\ftpd.conf >$(INSTALL)\$(BASEDIR)\conf\extra\ftpd.conf
else
- copy docs\conf\extra\ftpd.conf $(INSTALL)\$(BASEDIR)\conf\*.*
+ -$(AWK) -v BDIR=$(BASEDIR) -v FTPROOT=$(FTPROOT) -v FTPPORT=$(FTPPORT) -f build\mkconfnw.awk docs\conf\extra\ftpd.conf >$(INSTALL)\$(BASEDIR)\conf\ftpd.conf
endif
Added: httpd/mod_ftp/trunk/build/mkconfNW.awk
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/build/mkconfNW.awk?rev=605070&view=auto
==============================================================================
--- httpd/mod_ftp/trunk/build/mkconfNW.awk (added)
+++ httpd/mod_ftp/trunk/build/mkconfNW.awk Mon Dec 17 18:48:00 2007
@@ -0,0 +1,75 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+BEGIN {
+
+ A["ServerRoot"] = "SYS:/"BDIR
+ A["FTPPort"] = FTPPORT
+ A["ftpdocsdir"] = FTPROOT
+ A["logfiledir"] = "logs"
+ A["sysconfdir"] = "conf"
+
+ B["ftpdocsdir"] = A["ServerRoot"]"/"A["ftpdocsdir"]
+
+}
+
+/#@@LoadModule@@/ {
+ print "LoadModule ftp_module modules/mod_ftp.nlm"
+ print "#LoadModule ftp_cmd_pwd_module modules/ftpcmdpwd.nlm"
+ next
+}
+
+match ($0,/^#SSLSessionCache +"dbm:/) {
+ sub(/^#/, "")
+}
+
+match ($0,/^SSLSessionCache +"shmcb:/) {
+ sub(/^SSLSessionCache/, "#SSLSessionCache")
+}
+
+match ($0,/^SSLMutex +"file:@exp_runtimedir@\/ssl_mutex"/) {
+ sub(/"file:@exp_runtimedir@\/ssl_mutex"/, "default")
+}
+
+match ($0,/@@.*@@/) {
+ s=substr($0,RSTART+2,RLENGTH-4)
+ sub(/@@.*@@/,A[s],$0)
+}
+
+match ($0,/@rel_.*@/) {
+ s=substr($0,RSTART+5,RLENGTH-6)
+ sub(/@rel_.*@/,A[s],$0)
+}
+
+match ($0,/@exp_.*@/) {
+ s=substr($0,RSTART+5,RLENGTH-6)
+ sub(/@exp_.*@/,B[s],$0)
+}
+
+match ($0,/@nonssl_.*@/) {
+ s=substr($0,RSTART+8,RLENGTH-9)
+ sub(/@nonssl_.*@/,B[s],$0)
+}
+
+{
+ print
+}
+
+
+END {
+ print ""
+}
+
+
Propchange: httpd/mod_ftp/trunk/build/mkconfNW.awk
------------------------------------------------------------------------------
svn:keywords = Id