Skip to content

HTTPS clone URL

Subversion checkout URL

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