blob: 3e8f23b876ddd1e7690ced8c31081827a0631cda (
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
|
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header:
S=${WORKDIR}
DESCRIPTION="Roger Wilco base station"
HOMEPAGE="http://rogerwilco.gamespy.com/"
SRC_URI="http://games.gci.net/pub/VoiceOverIP/RogerWilco/rwbs_Linux_0_27.tar.gz"
KEYWORDS="~x86"
# Everything is statically linked
DEPEND=""
IUSE=""
src_install () {
cd ${WORKDIR}
dodoc README.TXT CHANGES.TXT LICENSE.TXT
dobin ${S}/rwbs ${S}/run_rwbs
rm -f ${S}/rwbs ${S}/run_rwbs
# Put distribution into /usr/share/rwbs
mkdir -p ${D}/usr/share/rwbs/
mv * ${D}/usr/share/rwbs/
# Do conf script
mkdir -p ${D}/etc/conf.d/
cat > ${D}/etc/conf.d/rwbs <<EOF
# Roger Wilco base station configuration
#
# $ rwbs --help reads:
# usage: ./rwbs [-b(ackwardcompat)] [-t(est)] [-s(tatic)] [-p <passwd>] [-u <udpport>] [-x <connectspeed>] [-n <hostname>]
# connectspeed is an integer measuring the allocated broadcast
# capacity for the channel host. The recommended value is 1.
# Higher values will cause the RWBS to use its additional broadcast capacity
# to help relay transmissions, at the expense of scalability.
# the b(ackwardcompat) option tells RWBS to appear as a "user" on the
# channel. Mark I users will prefer this, but not Mark Ia users.
# The s(tatic) option indicates that a client asking to join a
# non-existent named channel should be turned away with an error.
# rather than being hosted on a dynamically-created channel.
# hostname is what your station's name will be in the Roger Wilco Channel Tab.
# For instance, if you used -n "Clan Hurt", Roger Wilco users will see
# an entry in the Channel window named "Clan Hurt Base"
# If the -t(est) flag is used, the base station echoes transmissions
# when there is just one other party on the channel.
# Specify whatever options you want on this line
RWBS_OPTS='-n "Gentoo Linux"'
EOF
# do init script
mkdir -p ${D}/etc/init.d/
cat > ${D}/etc/init.d/rwbs <<EOF
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
depend() {
need net
}
start() {
ebegin "Starting Roger Wilco base station"
start-stop-daemon --start --quiet --exec /usr/bin/rwbs -b \\
-- \${RWBS_OPTS} >>/var/log/rwbs 2>&1
eend $?
}
stop() {
ebegin "Stopping Roger Wilco base station"
start-stop-daemon --stop --quiet --exec /usr/bin/rwbs \\
> /dev/null 2>&1
eend $?
}
EOF
chmod 755 ${D}/etc/init.d/rwbs
}
pkg_postinst() {
einfo
einfo "This build of ${PN} uses an init script, located at"
einfo "/etc/init.d/rwbs, to start and stop ${PN}."
einfo
}
|