ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/setup
Revision: 1.3
Committed: Tue Aug 28 17:08:06 2007 UTC (16 years, 8 months ago) by pippijn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +7 -3 lines
Log Message:
- changed name
- updated the example config to the new system
- added more documentation
- enhanced documentation generators
- added a link to the pdf to the website
- added an RSS feed generator
- transitioned hooks to c++ callbacks
- did various merges with upstream along the way
- added const where appropriate
- removed the old block allocator
- fixed most memory leaks
- transitioned some dictionaries to std::map
- transitioned some lists to std::vector
- made some free functions members where appropriate
- renamed string to dynstr and added a static string ststr
- use NOW instead of time (NULL) if possible
- completely reworked database backends, crypto handlers and protocol handlers
  to use an object factory
- removed the old module system. ermyth does not do any dynamic loading anymore
- fixed most of the build system
- reworked how protocol commands work

File Contents

# User Rev Content
1 pippijn 1.1 #!/bin/sh
2     #
3     # Copyright © 2005 Atheme Development Group
4 pippijn 1.2 # Rights to this code are documented in doc/pod/license.pod.
5 pippijn 1.1 #
6     # This file is a simple setup script.
7     #
8 pippijn 1.3 # $Id: setup,v 1.2 2007-07-21 01:29:07 pippijn Exp $
9 pippijn 1.1
10     PREFIX="$HOME/atheme"
11     LARGENET="no"
12     NLS="yes"
13     SASL="yes"
14     VERSION=`grep AC_INIT configure.ac | awk '{print \$2}' | sed s:\,::g`
15    
16 pippijn 1.3 if [ "x$PAGER" = "x" ]; then
17     PAGER="more"
18     fi
19    
20 pippijn 1.1 export ok INPUT
21    
22     clear
23    
24     cat .logo
25     echo " version $VERSION"
26    
27     echo ""
28    
29     if [ -f doc/RELEASE ] ; then
30     ok=0
31     echo "Would you like to read the release notes (recommended)?"
32     while [ $ok -eq 0 ] ; do
33     echo -n "[Yes] "
34     if read INPUT ; then : ; else echo "" ; exit 1 ; fi
35     if [ ! "$INPUT" ] ; then
36     echo ""
37 pippijn 1.3 $PAGER doc/RELEASE
38 pippijn 1.1 echo ""
39     echo "-----"
40     ok=1
41     fi
42     case $INPUT in
43     [Yy]*)
44     echo ""
45 pippijn 1.3 $PAGER doc/RELEASE
46 pippijn 1.1 ok=1
47     ;;
48     [Nn]*)
49     ok=1
50     ;;
51     esac
52     done
53     echo ""
54     fi
55    
56     ok=0
57     echo "Where do you want Atheme to be installed?"
58     echo "Press enter for the default, or type a new destination."
59     while [ $ok -eq 0 ] ; do
60     echo -n "[$PREFIX] "
61     if read INPUT ; then : ; else echo "" ; exit 1 ; fi
62     if [ ! "$INPUT" ] ; then
63     INPUT=$PREFIX
64     ok=1
65     else
66     ok=1
67     fi
68     done
69     PREFIX=$INPUT
70    
71     echo ""
72    
73     ok=0
74     echo "Are you running a large network (more than 2000 users)?"
75     while [ $ok -eq 0 ] ; do
76     echo -n "[$LARGENET] "
77     if read INPUT ; then : ; else echo "" ; exit 1 ; fi
78     if [ ! "$INPUT" ] ; then
79     INPUT=$LARGENET
80     ok=1
81     else
82     ok=1
83     fi
84     done
85     LARGENET=$INPUT
86    
87     ARGS="--prefix=$PREFIX"
88    
89     case "$LARGENET" in
90     [Yy])
91     ARGS="$ARGS --enable-large-net"
92     ;;
93     Yes)
94     ARGS="$ARGS --enable-large-net"
95     ;;
96     yes)
97     ARGS="$ARGS --enable-large-net"
98     ;;
99     esac
100    
101     echo ""
102    
103     ok=0
104     echo "Would you like to enable support for internationalization of"
105     echo "the messages used by Services? This will require gettext to be"
106     echo "installed."
107     while [ $ok -eq 0 ] ; do
108     echo -n "[$NLS] "
109     if read INPUT ; then : ; else echo "" ; exit 1 ; fi
110     if [ ! "$INPUT" ] ; then
111     INPUT=$NLS
112     ok=1
113     else
114     ok=1
115     fi
116     done
117     NLS=$INPUT
118    
119     case "$NLS" in
120     [Yy])
121     ARGS="$ARGS --enable-nls"
122     ;;
123     Yes)
124     ARGS="$ARGS --enable-nls"
125     ;;
126     yes)
127     ARGS="$ARGS --enable-nls"
128     ;;
129     esac
130    
131     echo ""
132    
133     ok=0
134     echo "Would you like to pass any additional options to configure? If so,"
135     echo "place them here:"
136     while [ $ok -eq 0 ] ; do
137     echo -n "[no] "
138     if read INPUT ; then : ; else echo "" ; exit 1 ; fi
139     if [ ! "$INPUT" ] ; then
140     INPUT=""
141     ok=1
142     else
143     ok=1
144     fi
145     done
146     ARGS="$ARGS $INPUT"
147    
148     if [ ! -f configure ]; then sh autogen.sh; fi
149     sh configure $ARGS
150     if [ $? != 0 ]; then
151     echo "Configure failed"
152     echo "Command was: sh configure $ARGS"
153     echo "Please fix this and try again"
154     exit 1
155     fi
156    
157     echo ""
158     echo "Press enter to begin compilation."
159     echo -n ""
160     if read INPUT ; then : ; else echo "" ; exit 1 ; fi
161    
162     make
163     if [ $? != 0 ]; then
164     echo "Compilation failed"
165     echo "Command was: make"
166     echo "Please fix this and try again"
167     exit 1
168     fi
169    
170     echo ""
171     echo "Press enter to begin installation."
172     echo -n ""
173     if read INPUT ; then : ; else echo "" ; exit 1 ; fi
174    
175     make install
176     if [ $? != 0 ]; then
177     echo "Installation failed"
178     echo "Command was: make install"
179     echo "Please fix this and try again"
180     exit 1
181     fi
182    
183     echo "----------------------------------------------------------------"
184     echo ">>> Atheme setup completed on `date`"
185     echo "----------------------------------------------------------------"
186    
187     exit 0