summaryrefslogtreecommitdiffstats
path: root/encap/tools/ostiary/ostiary-3.4.ep
blob: 19ca2fe0a39ec6abb60bdad7c7e4a6968458a8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0"?>

<!-- $Id$ -->

<encap_profile
	profile_ver="1.0"
	pkgspec="ostiary-3.4"
>

<prereq package="m4-1.4.4" />

<environment
        variable="CC"
        value="gcc"
        type="set"
/>

<environment
        variable="PATH"
PLATFORM_IF_MATCH(solaris)
        value="/usr/local/lib/bcfg2/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:"
PLATFORM_ELSE
        value="/usr/local/lib/bcfg2/bin:/usr/local/bin:"
PLATFORM_ENDIF
        type="prepend"
/>

PLATFORM_IF_MATCH(linux)
PLATFORM_ELSE
<environment
        variable="MAKE"
        value="gmake"
        type="set"
/>
PLATFORM_ENDIF

<source
url="http://www.pobox.com/users/dclark/mirror/ostiary/ostiary-3.4.tar.gz
     http://ingles.homeunix.org/software/ost/ostiary-3.4.tar.gz"
     use_objdir="no"
>

</source>

<prepackage>
# /usr/local/etc stuff
mkdir share 2>/dev/null || exit 1
mkdir share/doc 2>/dev/null || exit 1
mkdir share/doc/ostiary 2>/dev/null || exit 1
mkdir share/doc/ostiary/examples 2>/dev/null || exit 1
mv etc/ostiary.cfg share/doc/ostiary/examples/ostiary.cfg
rmdir etc
# daemons should be in /usr/local/sbin
mkdir sbin 2>/dev/null || exit 1
mv bin/ostiaryd sbin/ostiaryd
# daemontool stuff
mkdir var 2>/dev/null || exit 1
mkdir var/svc.d 2>/dev/null || exit 1
mkdir var/svc.d/ostiary 2>/dev/null || exit 1
mkdir var/svc.d/ostiary/log 2>/dev/null || exit 1
# encap stuff
mkdir var 2>/dev/null || exit 0
mkdir var/encap 2>/dev/null || exit 0
touch var/encap/${ENCAP_PKGNAME}
</prepackage>

<include_file name="var/svc.d/ostiary/run" mode="0755"><![CDATA[
#!/bin/sh
exec 2>&1
exec /usr/local/sbin/ostiaryd -c /usr/local/etc/ostiary.cfg -v -D
]]></include_file>

<include_file name="var/svc.d/ostiary/log/run" mode="0755"><![CDATA[
#!/bin/sh
exec 2>&1
exec /command/multilog t /usr/local/var/multilog/ostiary
]]></include_file>

<include_file name="postinstall" mode="0755"><![CDATA[
#!/bin/sh -e
umask 002
BASEDIR="`echo ${0} | xargs -n1 dirname`"
LOG=${BASEDIR}/postinstall.log
exec > $LOG 2>&1
printf "Running ostiary postinstall script...\n"
date
test -d /usr/local/var/multilog || mkdir /usr/local/var/multilog
test -d /usr/local/var/multilog/ostiary || mkdir /usr/local/var/multilog/ostiary
printf "Finished ostiary postinstall script.\n"
]]></include_file>

<encapinfo>
description Ostiary - Simple, Secure Remote Script Execution
</encapinfo>

</encap_profile>