Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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