source: npl/commonservers/daemontools/daemontools.SlackBuild @ 105afb5

Last change on this file since 105afb5 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.8 KB
Line 
1#!/bin/sh
2#DEP:libtimesaver
3#DEP:slackpackage
4## Include the slackware-pkg conf file
5if [ -a /etc/slack-package.conf ]; then
6. /etc/slack-package.conf
7  else
8  echo "Sorry you need to have the slack-package.conf file to run these"
9  echo "please install the slackbuilds package from LinuxPackages.net"
10  exit 1
11fi
12
13# Set initial variables:
14NAME=daemontools
15VERSION=0.76
16BUILD=$MYIN
17
18
19## Location to download the sources
20SRC_LOC="http://cr.yp.to/daemontools/$NAME-$VERSION.tar.gz"
21
22PKG=$TMP/package-$NAME
23
24## Lets Grab the Source if needed
25if [ -a $CWD/$NAME-$VERSION.tar.gz ]; then
26  echo "Source present not downloading"
27  else
28  $WGET $SRC_LOC || true
29fi
30
31if [ ! -d $TMP ]; then
32  mkdir -p $TMP # location to build the source
33fi
34
35rm -rf $PKG
36mkdir -p $PKG
37
38cd $TMP
39rm -rf admin
40tar xzvf $CWD/$NAME-$VERSION.tar.gz  || exit 1
41#################### timesaver patches erin boppen
42#EDWIN: uitgeschakeld, te krikky en niet handig voor profi gebruik.
43#patch -p0 <$CWD/supervise.patch || exit 1     
44#patch -p0 <$CWD/makefile.patch || exit 1
45
46               
47compile() {
48cd admin
49patch -p0 < $CWD/$NAME-$VERSION.errno.patch || exit 1
50cd ../
51mkdir /package
52cp -R admin /package
53cd /package/admin/daemontools-$VERSION/
54cp /usr/lib/libtimesaver.a src/
55cp $CWD/Makefile /package/admin/daemontools-0.76/src/
56./package/install
57}
58
59prepare() {
60mkdir -p $PKG/usr/bin
61mkdir -p $PKG/service
62cp /package/admin/daemontools-$VERSION/command/* $PKG/usr/bin
63}
64
65description() {
66mkdir -p $PKG/install
67        cat > $PKG/install/slack-desc << END
68      |-----handy-ruler------------------------------------------------------|
69daemontools: daemontools $VERSION
70daemontools:
71daemontools: daemontools is an extensive collection of tools for managing
72daemontools: UNIX services. It includes tools for starting, restarting,
73daemontools: stopping, monitoring and logging any services that you might
74daemontools: wish to run on a UNIX machine.
75daemontools:
76daemontools:
77daemontools:
78daemontools:
79daemontools:
80END
81}
82
83runscript() {
84
85
86#syn-3 wrapper scripts
87cp $CWD/svc* $PKG/usr/bin || exit 1
88chmod +x $PKG/usr/bin/svc* || exit 1
89
90#supervise compatibility hax0r
91#unwanted by new key system , look at timesaver
92#mv $PKG/usr/bin/{supervise,supervise.new} || exit 1
93#mkdir -p $PKG/install
94#cat > $PKG/install/doinst.sh << END
95#if ! [ -e usr/bin/supervise ]; then
96#       mv usr/bin/supervise.new usr/bin/supervise
97#fi
98#END
99#chmod +x $PKG/install/doinst.sh
100
101
102}
103
104build() {
105# Build the package:
106cd $PKG
107makepkg -l y -c n $CWD/$NAME.pkg || exit 1
108echo $VERSION > $CWD/$NAME.version
109echo $ARCH > $CWD/$NAME.arch
110echo "Your $NAME package is complete, make sure you open it up before installing it."
111echo "It is located in /tmp thanks for your support The Linuxpackages.net Folks"
112}
113
114cleanup() {
115rm -rf $CWD/tmp
116}
117
118compile || exit 1
119prepare || exit 1
120description
121runscript
122build || exit 1
123cleanup
Note: See TracBrowser for help on using the repository browser.