Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 75 lines (60 sloc) 2.367 kB
e315955 @klacke ""
authored
1 #!/bin/sh
2
c9778e0 @klacke added support for 2 additional configure
authored
3 set -x
4
e315955 @klacke ""
authored
5 prefix=$1
c9778e0 @klacke added support for 2 additional configure
authored
6 destdir=$2
3a3459c @klacke ""
authored
7 erl=$3
28e4c73 @klacke first attempt to run properly under cygwin
authored
8 werl=$4
9 etcdir=$5
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
10 vardir=$6
28972a3 @klacke run_erl to_erl support patch from Mats Cronquist
authored
11 bindir=`dirname $erl` ; bindir=`dirname $bindir`/lib/erlang/bin
e315955 @klacke ""
authored
12
13 . ../vsn.mk
8104bc6 @klacke ""
authored
14 y=yaws-${YAWS_VSN}
3a3459c @klacke ""
authored
15 p=${prefix}
c9778e0 @klacke added support for 2 additional configure
authored
16 e=${etcdir}
17 v=${vardir}
e315955 @klacke ""
authored
18
c9778e0 @klacke added support for 2 additional configure
authored
19 install -d ${destdir}/${prefix}/bin
9624397 @klacke patch from Fredrik Linder to make it easier to integrate yaws into a…
authored
20
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
21 cat yaws.template | \
22 ./Subst %yawsdir% ${prefix}/lib/yaws | \
28972a3 @klacke run_erl to_erl support patch from Mats Cronquist
authored
23 ./Subst %vardir% ${vardir} | \
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
24 ./Subst %erl% "${erl}" | \
28972a3 @klacke run_erl to_erl support patch from Mats Cronquist
authored
25 ./Subst %run_erl% "${bindir}/run_erl" | \
26 ./Subst %to_erl% "${bindir}/to_erl" | \
c9778e0 @klacke added support for 2 additional configure
authored
27 ./Subst %werl% "${werl}" > ${destdir}/${prefix}/bin/yaws
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
28
c9778e0 @klacke added support for 2 additional configure
authored
29 chmod +x ${destdir}/${prefix}/bin/yaws
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
30
c9778e0 @klacke added support for 2 additional configure
authored
31 install -d ${destdir}/${prefix}/lib/yaws/examples/ebin
32 install -d ${destdir}/${prefix}/lib/yaws/examples/include
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
33
9011183 @klacke ""
authored
34 if [ -f /etc/gentoo-release ]; then
c9778e0 @klacke added support for 2 additional configure
authored
35 install -d ${destdir}/${etcdir}/init.d/
36 install -d ${destdir}/${etcdir}/conf.d/
37 install -d ${destdir}/${vardir}/run/yaws
38 chmod a+rwx ${destdir}/${vardir}/run/yaws
39 cp gentoo/init.d.yaws ${destdir}/${etcdir}/init.d/yaws
40 chmod +x ${destdir}/${etcdir}/init.d/yaws
41 sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${destdir}/${etcdir}/conf.d/yaws
9011183 @klacke ""
authored
42 elif [ -f /etc/redhat-release ]; then
c9778e0 @klacke added support for 2 additional configure
authored
43 install -d ${destdir}/${etcdir}/init.d
44 sed -e "s;%prefix%;$p;g" redhat/yaws.init.d > ${destdir}/${etcdir}/init.d/yaws
45 chmod +x ${destdir}/${etcdir}/init.d/yaws
46 install -d ${destdir}/${vardir}/run/yaws
47 chmod a+rwx ${destdir}/${vardir}/run/yaws
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
48 elif [ -f /etc/suseservers ]; then
c9778e0 @klacke added support for 2 additional configure
authored
49 install -d ${destdir}/${etcdir}/init.d
50 sed -e "s;%prefix%;$p;g" suse/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
6e7055a @klacke Darwin /etc scripts support supplied by Eric Baur
authored
54 elif [ "`uname -s`" = "Darwin" ]; then
55 startupdir="/Library/StartupItems/Yaws"
56 if [ ! -d ${startupdir} ]; then
57 mkdir ${startupdir};
58 fi
59 sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
60 chmod +x ${startupdir}/Yaws
61 cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
c9778e0 @klacke added support for 2 additional configure
authored
62 elif [ "`uname -s`" = "FreeBSD" ]; then
63 sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}/${etcdir}/rc.d/yaws.sh
9011183 @klacke ""
authored
64 else
c9778e0 @klacke added support for 2 additional configure
authored
65 install -d ${destdir}/${etcdir}
9011183 @klacke ""
authored
66 echo "Don't know how to make /etc/init scrips for this system"
c9778e0 @klacke added support for 2 additional configure
authored
67 echo "possibly add ${prefix}/bin/yaws --daemon --heart to your /etc/rc.local manually"
6377222 @klacke ""
authored
68 fi
e315955 @klacke ""
authored
69
e41d79b @klacke ""
authored
70
9011183 @klacke ""
authored
71
72
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
authored
73
74
Something went wrong with that request. Please try again.