Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 98 lines (81 sloc) 3.237 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
da61d09 Claes Wikstrom 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 Claes Wikstrom *** empty log message ***
authored
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
da61d09 Claes Wikstrom cygwin install patch by Bill Robertsson
authored
21 install -d ${destdir}${prefix}/bin
22 install -d ${destdir}${prefix}/etc
316bf6d Claes Wikstrom small fixes
authored
23 install -d ${destdir}${vardir}/log/yaws
9624397 Claes Wikstrom patch from Fredrik Linder to make it easier to integrate yaws into apps...
authored
24
1dcb026 Claes Wikstrom New better install procedure, better (more interesting) yaws.conf templa...
authored
25 cat yaws.template | \
26 ./Subst %yawsdir% ${prefix}/lib/yaws | \
28972a3 Claes Wikstrom run_erl to_erl support patch from Mats Cronquist
authored
27 ./Subst %vardir% ${vardir} | \
1dcb026 Claes Wikstrom New better install procedure, better (more interesting) yaws.conf templa...
authored
28 ./Subst %erl% "${erl}" | \
28972a3 Claes Wikstrom 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 Claes Wikstrom cygwin install patch by Bill Robertsson
authored
31 ./Subst %werl% "${werl}" > ${destdir}${prefix}/bin/yaws
1dcb026 Claes Wikstrom New better install procedure, better (more interesting) yaws.conf templa...
authored
32
da61d09 Claes Wikstrom cygwin install patch by Bill Robertsson
authored
33 chmod +x ${destdir}${prefix}/bin/yaws
fdfd9e3 Claes Wikstrom cvs fixes + install scripts gentoo/suse/redhat
authored
34
da61d09 Claes Wikstrom 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 Claes Wikstrom New better install procedure, better (more interesting) yaws.conf templa...
authored
37
674c8b3 Claes Wikstrom git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/ya...
authored
38 ## seems gentoo don't like to be installed in /usr/local/etc
39 ## since /sbin/runscript still reads /etc/conf.d
9011183 Claes Wikstrom ""
authored
40 if [ -f /etc/gentoo-release ]; then
da61d09 Claes Wikstrom 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 Claes Wikstrom git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/ya...
authored
45 sed -e "s;%prefix%;$p;g" \
da61d09 Claes Wikstrom 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 Claes Wikstrom ""
authored
48 elif [ -f /etc/redhat-release ]; then
da61d09 Claes Wikstrom cygwin install patch by Bill Robertsson
authored
49 install -d ${destdir}${etcdir}/init.d
674c8b3 Claes Wikstrom git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/ya...
authored
50 sed -e "s;%prefix%;$p;g" \
da61d09 Claes Wikstrom 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 Claes Wikstrom cvs fixes + install scripts gentoo/suse/redhat
authored
55 elif [ -f /etc/suseservers ]; then
da61d09 Claes Wikstrom cygwin install patch by Bill Robertsson
authored
56 install -d ${destdir}${etcdir}/init.d
674c8b3 Claes Wikstrom git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/ya...
authored
57 sed -e "s;%prefix%;$p;g" \
da61d09 Claes Wikstrom 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 Claes Wikstrom added debian startup script
authored
62 elif [ -f /etc/debian_version ]; then
da61d09 Claes Wikstrom cygwin install patch by Bill Robertsson
authored
63 install -d ${destdir}${etcdir}/init.d
674c8b3 Claes Wikstrom git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/ya...
authored
64 sed -e "s;%prefix%;$p;g" \
da61d09 Claes Wikstrom 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 Claes Wikstrom added debian startup script
authored
69
9eaf9c4 Claes Wikstrom install patches for macosX by Eric Baur
authored
70 elif [ "`uname -s`" = "Darwin" -a `id -u` = 0 ]; then
6e7055a Claes Wikstrom Darwin /etc scripts support supplied by Eric Baur
authored
71 startupdir="/Library/StartupItems/Yaws"
9605d55 Claes Wikstrom Make/build fixes
authored
72 if [ ! -e ${startupdir} ]; then
6e7055a Claes Wikstrom Darwin /etc scripts support supplied by Eric Baur
authored
73 mkdir ${startupdir};
9eaf9c4 Claes Wikstrom 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 Claes Wikstrom 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 Claes Wikstrom 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 Claes Wikstrom added support for 2 additional configure
authored
83 elif [ "`uname -s`" = "FreeBSD" ]; then
da61d09 Claes Wikstrom 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 Claes Wikstrom 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 Ayaz 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 Claes Wikstrom added support for 2 additional configure
authored
90 echo "possibly add ${prefix}/bin/yaws --daemon --heart to your /etc/rc.local manually"
6377222 Claes Wikstrom ""
authored
91 fi
e315955 Claes Wikstrom ""
authored
92
e41d79b Claes Wikstrom ""
authored
93
9011183 Claes Wikstrom ""
authored
94
95
1dcb026 Claes Wikstrom New better install procedure, better (more interesting) yaws.conf templa...
authored
96
97
Something went wrong with that request. Please try again.