summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-01-19 14:56:52 +0000
committerfukachan <fukachan>2001-01-19 14:56:52 +0000
commit3482f090108e8024a10b692d379c9baf88f06a80 (patch)
tree45e35d6ae3a44d8220062c628cc0a0b636854f41
parent28f11ec41be4306f3b2eb907cac0a535b2a760c2 (diff)
downloadfml8-3482f090108e8024a10b692d379c9baf88f06a80.tar.gz
fml8-3482f090108e8024a10b692d379c9baf88f06a80.tar.bz2
fml8-3482f090108e8024a10b692d379c9baf88f06a80.zip
prepare installer and modify parameters to use it
-rwxr-xr-xINSTALL.sh71
-rw-r--r--Makefile40
-rw-r--r--fml/etc/main.cf15
3 files changed, 118 insertions, 8 deletions
diff --git a/INSTALL.sh b/INSTALL.sh
new file mode 100755
index 00000000..76ff3d58
--- /dev/null
+++ b/INSTALL.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# Copyright (C) 2001 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $Id$
+# $FML$
+#
+
+# Run this from the top-level fml source directory.
+
+PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc
+umask 022
+
+### configurations ###
+date=`date +%C%y%d%m`
+version=current-${date}
+prefix_dir=/usr/local
+config_dir=/etc/fml
+libexec_dir=$prefix_dir/libexec/fml
+lib_dir=$prefix_dir/lib/fml
+######################
+
+_mkdir () {
+ local dir=$1
+ echo mkdir $dir; test -d $dir || mkdir $dir
+}
+
+
+for dir in $config_dir \
+ $config_dir/defaults \
+ $config_dir/defaults/$version \
+ $lib_dir \
+ $lib_dir/$version \
+ $libexec_dir \
+ $libexec_dir/$version
+do
+ test -d $dir || _mkdir $dir
+done
+
+
+if [ ! -f $config_dir/main.cf ];then
+ sed -e s@__version__@$version@ \
+ -e s@__config_dir__@$config_dir@ \
+ -e s@__prefix_dir__@$prefix_dir@ \
+ fml/etc/main.cf > $config_dir/main.cf
+fi
+
+cp fml/etc/default_config.cf $config_dir/defaults/$version
+
+cp -pr fml/lib/* $lib_dir/$version
+cp -pr cpan/lib/* $lib_dir/$version
+cp -pr fml/libexec/* $libexec_dir/$version
+
+if [ ! -f $libexec_dir/fmlwrapper ];then
+
+ cp -pr fml/libexec/fmlwrapper $libexec_dir/
+ cp -pr fml/libexec/Standalone.pm $libexec_dir/
+ (
+ cd $libexec_dir/
+ ln -s fmlwrapper fml.pl
+ ln -s fmlwrapper distribute
+ ln -s fmlwrapper command
+ ln -s fmlwrapper fmlserv
+ ln -s fmlwrapper mead
+ )
+fi
+
+
+exit 0
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..18eaf07c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+PERL = perl -w -I ./lib/fml5 -I ./lib/CPAN -I ./lib/3RDPARTY -I ./lib
+
+all: test
+
+scan:
+ @ cvs -n update 2>&1 |grep -v : || echo ''
+
+update:
+ @ cvs update -dAP|grep -v : || echo ''
+
+test: test2
+
+test1:
+ @ cat w/example |\
+ perl -w libexec/distribute etc/default_config.cf etc/config.cf
+
+test2:
+ @ cat w/example |\
+ perl -w libexec/fml.pl /var/spool/ml/elena
+
+test3:
+ @ echo '-- test in the case where Socket6 fail'
+ @ cat w/example |\
+ /usr/pkg/bin/perl -w libexec/fml.pl /var/spool/ml/elena
+
+check:
+ @ for x in `find lib* -type f -print|grep pm|grep -v CPAN` ; do $(PERL) -c $$x || echo '' ;done
+
+clean:
+ @ find . |grep '~' |perl -nple unlink
+
+link:
+ rm -f FML Netlib IO
+ ln -s lib/fml5/FML .
+ ln -s lib/fml5/Netlib .
+ ln -s lib/fml5/IO .
+ (cd libexec; ln -s fmlwrapper fml.pl)
+
+hier:
+ perl bin/show_hierarchy.pl FML/libkern.pl | uniq
diff --git a/fml/etc/main.cf b/fml/etc/main.cf
index fc2961ec..8e9583b7 100644
--- a/fml/etc/main.cf
+++ b/fml/etc/main.cf
@@ -1,15 +1,12 @@
-version = 5.000
+version = __version__
-config_dir = /etc/fml
+config_dir = __config_dir__
-prefix_dir = /usr/local
+prefix_dir = __prefix_dir__
-libexec_dir = $prefix_dir/libexec/fml/$version
+libexec_dir = $prefix_dir/libexec/fml/$version
-lib_dir = $prefix_dir/lib/fml/$version/3RDPARTY
- $prefix_dir/lib/fml/$version/fml5
- $prefix_dir/lib/fml/$version/CPAN
- $prefix_dir/lib/fml/$version
+lib_dir = $prefix_dir/lib/fml/$version
# site local
local_lib_dir = $prefix_dir/lib/fml/site_local
@@ -18,8 +15,10 @@ local_lib_dir = $prefix_dir/lib/fml/site_local
# default_config.cf
default_config = $config_dir/defaults/$version/default_config.cf
+
# default domain
default_domain = fml.org
+
# domain specific configurations
domain_default_config = $config_dir/domains/__domain__/config.cf