Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 97 lines (80 sloc) 3.201 kB
e315955 @klacke ""
authored
1 #!/bin/sh
2
443b55e @klacke Build and make fixes
authored
3 #set -x
c9778e0 @klacke added support for 2 additional configure
authored
4
e315955 @klacke ""
authored
5 prefix=$1
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
6 erl=$2
7 werl=$3
8 etcdir=$4
9 vardir=$5
10 bindir=$6
11 destdir=$7
87a5ac5 @klacke *** empty log message ***
authored
12
13 #bindir=`dirname $erl` ; bindir=`dirname $bindir`/lib/erlang/bin
e315955 @klacke ""
authored
14
15 . ../vsn.mk
8104bc6 @klacke ""
authored
16 y=yaws-${YAWS_VSN}
3a3459c @klacke ""
authored
17 p=${prefix}
c9778e0 @klacke added support for 2 additional configure
authored
18 e=${etcdir}
19 v=${vardir}
e315955 @klacke ""
authored
20
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
21 install -d ${destdir}${prefix}/bin
22 install -d ${destdir}${prefix}/etc
9624397 @klacke patch from Fredrik Linder to make it easier to integrate yaws into a…
authored
23
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
24 cat yaws.template | \
25 ./Subst %yawsdir% ${prefix}/lib/yaws | \
28972a3 @klacke run_erl to_erl support patch from Mats Cronquist
authored
26 ./Subst %vardir% ${vardir} | \
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
27 ./Subst %erl% "${erl}" | \
28972a3 @klacke run_erl to_erl support patch from Mats Cronquist
authored
28 ./Subst %run_erl% "${bindir}/run_erl" | \
29 ./Subst %to_erl% "${bindir}/to_erl" | \
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
30 ./Subst %werl% "${werl}" > ${destdir}${prefix}/bin/yaws
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
31
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
32 chmod +x ${destdir}${prefix}/bin/yaws
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
33
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
34 install -d ${destdir}${prefix}/lib/yaws/examples/ebin
35 install -d ${destdir}${prefix}/lib/yaws/examples/include
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
36
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
37 ## seems gentoo don't like to be installed in /usr/local/etc
38 ## since /sbin/runscript still reads /etc/conf.d
9011183 @klacke ""
authored
39 if [ -f /etc/gentoo-release ]; then
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
40 install -d ${destdir}${etcdir}/init.d/
41 install -d ${destdir}${etcdir}/conf.d/
42 install -d ${destdir}${vardir}/run/yaws
43 chmod a+rwx ${destdir}${vardir}/run/yaws
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
44 sed -e "s;%prefix%;$p;g" \
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
45 -e "s;%etcdir%;$e;g" gentoo/init.d.yaws > ${destdir}${etcdir}/init.d/yaws
46 chmod +x ${destdir}${etcdir}/init.d/yaws
9011183 @klacke ""
authored
47 elif [ -f /etc/redhat-release ]; then
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
48 install -d ${destdir}${etcdir}/init.d
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
49 sed -e "s;%prefix%;$p;g" \
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
50 -e "s;%etcdir%;$e;g" redhat/yaws.init.d > ${destdir}${etcdir}/init.d/yaws
51 chmod +x ${destdir}${etcdir}/init.d/yaws
52 install -d ${destdir}${vardir}/run/yaws
53 chmod a+rwx ${destdir}${vardir}/run/yaws
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
54 elif [ -f /etc/suseservers ]; then
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
55 install -d ${destdir}${etcdir}/init.d
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
56 sed -e "s;%prefix%;$p;g" \
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
57 -e "s;%etcdir%;$e;g" suse/yaws.init.d/ > ${destdir}${etcdir}/init.d/yaws
58 chmod +x ${destdir}${etcdir}/init.d/yaws
59 install -d ${destdir}${vardir}/run/yaws
60 chmod a+rwx ${destdir}${vardir}/run/yaws
701732a @klacke added debian startup script
authored
61 elif [ -f /etc/debian_version ]; then
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
62 install -d ${destdir}${etcdir}/init.d
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
63 sed -e "s;%prefix%;$p;g" \
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
64 -e "s;%etcdir%;$e;g" debian/yaws.init.d > ${destdir}${etcdir}/init.d/yaws
65 chmod +x ${destdir}${etcdir}/init.d/yaws
66 install -d ${destdir}${vardir}/run/yaws
67 chmod a+rwx ${destdir}${vardir}/run/yaws
701732a @klacke added debian startup script
authored
68
9eaf9c4 @klacke install patches for macosX by Eric Baur
authored
69 elif [ "`uname -s`" = "Darwin" -a `id -u` = 0 ]; then
6e7055a @klacke Darwin /etc scripts support supplied by Eric Baur
authored
70 startupdir="/Library/StartupItems/Yaws"
9605d55 @klacke Make/build fixes
authored
71 if [ ! -e ${startupdir} ]; then
6e7055a @klacke Darwin /etc scripts support supplied by Eric Baur
authored
72 mkdir ${startupdir};
9eaf9c4 @klacke install patches for macosX by Eric Baur
authored
73 elif [ ! -d ${startupdir} ]; then
74 echo "${startupdir} exists but is not a directory, bailing out ..."
75 exit 1
6e7055a @klacke Darwin /etc scripts support supplied by Eric Baur
authored
76 fi
77 sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
78 chmod +x ${startupdir}/Yaws
79 cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
9eaf9c4 @klacke install patches for macosX by Eric Baur
authored
80 # MacOS is particular about the ownership of startup items.
81 chown -R root:wheel ${startupdir}
c9778e0 @klacke added support for 2 additional configure
authored
82 elif [ "`uname -s`" = "FreeBSD" ]; then
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
83 sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}${etcdir}/rc.d/yaws.sh
fabb01c @klacke NetBSD support from Kuzma Bartosz
authored
84 elif [ "`uname -s`" = "NetBSD" ]; then
85 sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" netbsd/yaws.sh > /etc/rc.d/yaws
86 else
da61d09 @klacke cygwin install patch by Bill Robertsson
authored
87 install -d ${destdir}${etcdir}
9011183 @klacke ""
authored
88 echo "Don't know how to make /etc/init scrips for this system"
c9778e0 @klacke added support for 2 additional configure
authored
89 echo "possibly add ${prefix}/bin/yaws --daemon --heart to your /etc/rc.local manually"
6377222 @klacke ""
authored
90 fi
e315955 @klacke ""
authored
91
e41d79b @klacke ""
authored
92
9011183 @klacke ""
authored
93
94
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
95
96
Something went wrong with that request. Please try again.