Permalink
Browse files

Adjusted configuration proceedure for new apache configuration.

Also moved regex for conf files into the Makefile so that it happens
at "make config" or "make all" instead of at ./configure time.
This is good for a couple of reasons, mainly though because make isn't
going to touch the files if they've already been built and the format
hasn't changed, where as ./configure will just blast through regardless.
  • Loading branch information...
1 parent 0b2e5f3 commit 19389fe706c9001784a81a2e693682d0a4fb4d6b @MarkJaroski committed Jan 24, 2002
Showing with 297 additions and 254 deletions.
  1. +24 −3 Makefile.in
  2. +12 −12 conf/bricolage.tmp.conf.in
  3. +42 −21 configure
  4. +4 −3 configure.ac
  5. +215 −215 inst/bric.sql.in
View
@@ -38,6 +38,7 @@ POSTGRES_ROOT_USER = @POSTGRES_ROOT_USER@
POSTGRES_SYSTEM_USER = @POSTGRES_SYSTEM_USER@
POSTGRES_ROOT_PASS = @PG_ROOT_PASS@
HAVE_SSL = @HAVE_SSL@
+HOSTNAME = @HOSTNAME@
# Installation related variables
@@ -168,7 +169,7 @@ CPAN_TARGETS = $(subst :,.,$(addprefix ${INST}/cpan/,${MISSING_MODULES}))
# ****************************************************************
# Standard targets follow. These are discussed at length
# in the GNU Make manual: http://www.gnu.org/manual/
-all: doc
+all: doc config
install: dep installdirs install-bin install-comp \
install-conf install-data install-lib install-doc \
install-man install-html chowndirs chownpg chmoddirs
@@ -257,6 +258,26 @@ ${CPAN_TARGETS}:
${PERL} -MCPAN -e '$$m = "$(@F)" ;$$m =~ s/\./:/g ; install $$m'
touch $@
+# This is where we do our config files
+config: inst/bric.sql conf/bricolage.tmp.conf
+
+inst/bric.sql: inst/bric.sql.in
+ cp $^ $@
+ perl -pi -e 's/%DBI_USER%/${DBI_USER}/g' $@
+
+conf/bricolage.tmp.conf: conf/bricolage.tmp.conf.in
+ cp $^ $@
+ perl -pi -e 's/%HOSTNAME%/${HOSTNAME}/g' $@
+ perl -pi -e 's/%HAVE_SSL%/${HAVE_SSL}/g' $@
+ perl -pi -e 's,%APACHE%,${APACHE},g' $@
+ perl -pi -e 's,%APACHE_CONF%,${APACHE_CONF},g' $@
+ perl -pi -e 's/%APACHE_USER%/${APACHE_USER}/g' $@
+ perl -pi -e 's/%APACHE_GROUP%/${APACHE_GROUP}/g' $@
+ perl -pi -e 's/%DB_NAME%/${DB_NAME}/g' $@
+ perl -pi -e 's/%DBI_USER%/${DBI_USER}/g' $@
+ perl -pi -e 's/%DBI_PASS%/${DBI_PASS}/g' $@
+ perl -pi -e 's,%compdir%,${compdir},g' $@
+ perl -pi -e 's,%datadir%,${datadir},g' $@
# and here are our document files.
@@ -282,7 +303,7 @@ endif
clean: docclean
- ${RM} -f Changes TODO License tags
+ ${RM} -f Changes TODO License tags conf/bricolage.tmp.conf inst/bric.sql
dist-clean:
${RM} -f ${INST}/install.log
@@ -296,7 +317,7 @@ docclean:
.PHONY : clean dep clean cpan doc install installdirs \
install-bin install-comp install-conf install-data \
install-lib install-doc install-html install-man \
- uninstall uninstalldirs \
+ uninstall uninstalldirs config \
uninstall-bin uninstall-comp uninstall-conf uninstall-data \
uninstall-lib uninstall-doc uninstall-html uninstall-man
View
@@ -5,25 +5,25 @@
# turns on SSL support. Note that if SSL_ENABLE is turned on, then LISTEN_PORT
# *must* be 80, or else Bricolage will not start. VHOST is the Virtual host name
# under which Bricolage should run.
-APACHE_BIN = /usr/local/apache/bin/httpd
-APACHE_CONF = /usr/local/bricolage/conf/httpd.conf
+APACHE_BIN = %APACHE%
+APACHE_CONF = %APACHE_CONF%
LISTEN_PORT = 80
-SSL_ENABLE = Off
+SSL_ENABLE = %HAVE_SSL%
NAME_VHOST = *
-VHOST_SERVER_NAME = @HOSTNAME@
+VHOST_SERVER_NAME = %HOSTNAME%
# System User settings. These are the names of the system user and group under
# which Apache and Mason run. Default to 'nobody' and 'nobody' if not specified.
-SYS_USER = @APACHE_USER@
-SYS_GROUP = @APACHE_GROUP@
+SYS_USER = %APACHE_USER%
+SYS_GROUP = %APACHE_GROUP%
# Database settings. These are simply the name of the database in which all
# Bricolage data will be stored, as well as the username and password the
# application can use to access that data. DB_NAME defaults to 'sharky',
# DBI_USER defaults to 'castellan', and DBI_PASS defaults to 'nalletsac'.
-DB_NAME = @DB_NAME@
-DBI_USER = @DBI_USER@
-DBI_PASS = @DBI_PASS@
+DB_NAME = %DB_NAME%
+DBI_USER = %DBI_USER%
+DBI_PASS = %DBI_PASS%
# Mason settings. These specify the location of the Bricolage UI Mason
# components. The defaults are the $BRICOLAGE_ROOT/comp for MASON_COMP_ROOT and
@@ -34,8 +34,8 @@ DBI_PASS = @DBI_PASS@
# environment variable before you do anything! Also be sure that these
# directories exist on the file system and that SYS_USER specified above has
# permission to write to them.
-MASON_COMP_ROOT = @compdir@
-MASON_DATA_ROOT = @datadir@
+MASON_COMP_ROOT = %compdir%
+MASON_DATA_ROOT = %datadir%
# Burner settings. The BURN_ROOT directive specifies the location of Bricolage
# templates and the files output upon publishing or previewing content. The
@@ -48,7 +48,7 @@ MASON_DATA_ROOT = @datadir@
# be used except the OUTPUT argument, which Bricolage handles so that the output
# is sent to the same place as template Mason code sends its content. Defaults
# to no arguments if unspecified.
-BURN_ROOT = @datadir@/burn
+BURN_ROOT = %datadir%/burn
INCLUDE_XML_WRITER = No
#XML_WRITER_ARGS = NEWLINES => 1, UNSAFE => 1, DATA_MODE => 1, DATA_INDENT => 4
View
@@ -2554,18 +2554,38 @@ echo "${ECHO_T}no" >&6
fi
- echo "$as_me:2557: checking for CPAN module Apache::Session 1.53" >&5
-echo $ECHO_N "checking for CPAN module Apache::Session 1.53... $ECHO_C" >&6
+ echo "$as_me:2557: checking for CPAN module Net::FTPServer " >&5
+echo $ECHO_N "checking for CPAN module Net::FTPServer ... $ECHO_C" >&6
#
# use perl itself to check for the module
#
- if perl -e "use Apache::Session 1.53" 2>/dev/null ;then
+ if perl -e "use Net::FTPServer " 2>/dev/null ;then
echo "$as_me:2563: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:2566: result: no" >&5
echo "${ECHO_T}no" >&6
if test -z "${MISSING_MOD}" ; then
+ NEW_LIST="Net::FTPServer" ;
+ else
+ NEW_LIST="${MISSING_MOD} Net::FTPServer";
+ fi
+ MISSING_MOD=$NEW_LIST
+
+ fi
+
+ echo "$as_me:2577: checking for CPAN module Apache::Session 1.53" >&5
+echo $ECHO_N "checking for CPAN module Apache::Session 1.53... $ECHO_C" >&6
+ #
+ # use perl itself to check for the module
+ #
+ if perl -e "use Apache::Session 1.53" 2>/dev/null ;then
+ echo "$as_me:2583: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:2586: result: no" >&5
+echo "${ECHO_T}no" >&6
+ if test -z "${MISSING_MOD}" ; then
NEW_LIST="Apache::Session" ;
else
NEW_LIST="${MISSING_MOD} Apache::Session";
@@ -2574,16 +2594,19 @@ echo "${ECHO_T}no" >&6
fi
- echo "$as_me:2577: checking for CPAN module Apache::libapreq " >&5
+# Apache::libapreq does not define $Apache::libapreq::VERSION
+# so we can't check for it here
+
+ echo "$as_me:2600: checking for CPAN module Apache::libapreq " >&5
echo $ECHO_N "checking for CPAN module Apache::libapreq ... $ECHO_C" >&6
#
# use perl itself to check for the module
#
if perl -e "use Apache::libapreq " 2>/dev/null ;then
- echo "$as_me:2583: result: yes" >&5
+ echo "$as_me:2606: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:2586: result: no" >&5
+ echo "$as_me:2609: result: no" >&5
echo "${ECHO_T}no" >&6
if test -z "${MISSING_MOD}" ; then
NEW_LIST="Apache::libapreq" ;
@@ -2707,7 +2730,7 @@ if cmp -s $cache_file confcache; then :; else
fi
rm -f confcache
- echo "$as_me:2710: checking whether we will wave the PG_ROOT_PASS requirement" >&5
+ echo "$as_me:2733: checking whether we will wave the PG_ROOT_PASS requirement" >&5
echo $ECHO_N "checking whether we will wave the PG_ROOT_PASS requirement... $ECHO_C" >&6
# Check whether --with-no-pgroot-pass or --without-no-pgroot-pass was given.
@@ -2716,24 +2739,24 @@ if test "${with_no_pgroot_pass+set}" = set; then
if test "$withval" = "yes" ;then
PG_NO_PASS="true"
- echo "$as_me:2719: result: yes" >&5
+ echo "$as_me:2742: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
PG_NO_PASS="false"
- echo "$as_me:2723: result: no" >&5
+ echo "$as_me:2746: result: no" >&5
echo "${ECHO_T}no" >&6
fi
else
PG_NO_PASS="false"
- echo "$as_me:2730: result: no" >&5
+ echo "$as_me:2753: result: no" >&5
echo "${ECHO_T}no" >&6
fi;
if test "${PG_NO_PASS}" = "false" ;then
- { { echo "$as_me:2736: error:
+ { { echo "$as_me:2759: error:
You must define PG_ROOT_PASS
@@ -2757,7 +2780,7 @@ echo "$as_me: error:
# write out the makefiles
# TODO: The files here that aren't makefiles should eventually
# be handled by make, this is cheating in a way
-ac_config_files="$ac_config_files Makefile doc/Makefile install/bric.sql conf/bricolage.tmp.conf"
+ac_config_files="$ac_config_files Makefile doc/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -2868,7 +2891,7 @@ rm -f confdef2opt.sed
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:2871: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:2894: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -3035,7 +3058,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:3038: error: ambiguous option: $1
+ { { echo "$as_me:3061: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@@ -3054,7 +3077,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:3057: error: unrecognized option: $1
+ -*) { { echo "$as_me:3080: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@@ -3091,9 +3114,7 @@ do
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
- "install/bric.sql" ) CONFIG_FILES="$CONFIG_FILES install/bric.sql" ;;
- "conf/bricolage.tmp.conf" ) CONFIG_FILES="$CONFIG_FILES conf/bricolage.tmp.conf" ;;
- *) { { echo "$as_me:3096: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:3117: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -3319,7 +3340,7 @@ done; }
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:3322: creating $ac_file" >&5
+ { echo "$as_me:3343: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -3337,7 +3358,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:3340: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:3361: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -3350,7 +3371,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:3353: error: cannot find input file: $f" >&5
+ { { echo "$as_me:3374: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
View
@@ -113,9 +113,10 @@ CHECK_CPAN_MODULE(MISSING_MOD, MLDBM, 2.00)
CHECK_CPAN_MODULE(MISSING_MOD, Params::Validate, 0.04)
CHECK_CPAN_MODULE(MISSING_MOD, HTML::Mason, 1.03)
CHECK_CPAN_MODULE(MISSING_MOD, DBD::Pg, 1.00)
+CHECK_CPAN_MODULE(MISSING_MOD, Net::FTPServer)
CHECK_CPAN_MODULE(MISSING_MOD, Apache::Session, 1.53)
-dnl Apache::libapreq does not define $Apache::libapreq::VERSION
-dnl so we can't check for it here
+# Apache::libapreq does not define $Apache::libapreq::VERSION
+# so we can't check for it here
CHECK_CPAN_MODULE(MISSING_MOD, Apache::libapreq)
AC_CACHE_SAVE
@@ -131,5 +132,5 @@ AC_SUBST(VERSION)
# write out the makefiles
# TODO: The files here that aren't makefiles should eventually
# be handled by make, this is cheating in a way
-AC_CONFIG_FILES([Makefile doc/Makefile inst/bric.sql conf/bricolage.tmp.conf])
+AC_CONFIG_FILES([Makefile doc/Makefile])
AC_OUTPUT
Oops, something went wrong.

0 comments on commit 19389fe

Please sign in to comment.