root/make_slack_package_btun.sh

Revision 195, 1.7 kB (checked in by ng, 3 years ago)

reorganization

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 export PATH="/sbin/:$PATH"
4
5 rm -fr slack
6 mkdir -p slack/install
7
8 cat > slack/install/slack-desc <<EOF
9 # HOW TO EDIT THIS FILE:
10 # The "handy ruler" below makes it easier to edit a package description.  Line
11 # up the first '|' above the ':' following the base package name, and the '|'
12 # on the right side marks the last column you can put a character in.  You must
13 # make exactly 11 lines for the formatting to be correct.  It's also
14 # customary to leave one space after the ':'.
15
16     |-----handy-ruler------------------------------------------------------|
17 btun: btun (network tool)
18 btun:
19 btun: A backward tunnel creator that enable you to go through firewalls.
20 btun:
21 btun:
22 btun:
23 btun:
24 btun:
25 btun:
26 btun:
27 btun:
28 EOF
29 chmod a+r slack/install/slack-desc
30
31 cat > slack/install/doinst.sh <<EOF
32 #/bin/sh
33
34 if ! grep btund /etc/rc.d/rc.M >/dev/null 2>&1
35 then
36
37    echo '# Start the btun server'             >> /etc/rc.d/rc.M
38    echo 'if [ -x /etc/rc.d/rc.btund ]; then'  >> /etc/rc.d/rc.M
39    echo '. /etc/rc.d/rc.btund start'          >> /etc/rc.d/rc.M
40    echo 'fi'                                  >> /etc/rc.d/rc.M
41
42 fi
43
44 LDP=/usr/lib/btun/plugins/
45 if ! grep "\$LDP" /etc/ld.so.conf >/dev/null 2>&1
46 then
47    echo "\$LDP" >> /etc/ld.so.conf
48    /sbin/ldconfig
49 fi
50
51 EOF
52 chmod a+rx slack/install/doinst.sh
53
54 make mrproper || exit 1
55 make btun $* || exit 1
56 make tcpmux $* || exit 1
57 make installbtun $* prefix=slack || exit 1
58
59 install -m 755 -d slack/etc/rc.d/
60 install -m 644 btun/C_client_server/config/rc.btund slack/etc/rc.d/
61 rm -f slack/etc/btund/users
62
63 rev=$(common/get_svn_rev.sh)
64 name="btun-rev$rev-$(uname -m).tgz"
65
66 cd slack
67 makepkg -l y -p -c n  "$name"
68 mv "$name" ..
69 cd ..
70 rm -fr slack
71
72 echo Done package $name.
Note: See TracBrowser for help on using the browser.