~ubuntu-branches/ubuntu/quantal/maradns/quantal

« back to all changes in this revision

Viewing changes to build/install.sh

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2012-01-12 23:35:38 UTC
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: package-import@ubuntu.com-20120112233538-5jkaqrh9nbqtf1ey
Tags: upstream-2.0.04+really1.4.09
ImportĀ upstreamĀ versionĀ 2.0.04+really1.4.09

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
# Set the directory which is the top-level MaraDNS directory
11
11
if [ -z "$TOPLEVEL" ] ; then
12
 
        TOPLEVEL=$( pwd )
 
12
        TOPLEVEL=`pwd`
13
13
fi
14
14
 
15
15
cd $TOPLEVEL
48
48
 
49
49
# Make sure we have a place to put documents
50
50
# Thanks to Paul Howard for the following six lines
51
 
if [ ! -d "$( dirname $DOCS )" ] ; then
52
 
        if ! mkdir "$( dirname $DOCS )" ; then
53
 
                echo unable to make the $( dirname $DOCS ) directory. 
 
51
if [ ! -d "`dirname $DOCS`" ] ; then
 
52
        if ! mkdir "`dirname $DOCS`" ; then
 
53
                echo unable to make the `dirname $DOCS` directory. 
54
54
                exit 6
55
55
        fi
56
56
fi
87
87
        exit 1
88
88
fi
89
89
 
90
 
# Install the Deadwood binary
91
 
cd $TOPLEVEL/deadwood-*/src/
92
 
if [ -x Deadwood ] ; then
93
 
        if [ -f $SBIN/Deadwood ] ; then
94
 
                rm $SBIN/Deadwood
95
 
        fi
96
 
        cp Deadwood $SBIN
97
 
fi
98
 
 
99
90
# Install the getzone and fetchzone binaries
100
91
cd $TOPLEVEL/tcp
101
92
cp getzone fetchzone $BIN
137
128
cd $TOPLEVEL
138
129
cp maradns.gpg.key $DOCS
139
130
 
140
 
# Add Deadwood man page
141
 
cp deadwood-*/doc/Deadwood.1 $MAN1
142
 
# Add default dwood3rc file for Deadwood
143
 
if [ ! -f $RPM_BUILD_ROOT/etc/dwood3rc ] ; then
144
 
        cat deadwood-*/doc/dwood3rc | \
145
 
                sed 's/127.0.0.1\"/127.0.0.2\"/' | \
146
 
                sed 's/\/etc\/deadwood/\/etc\/maradns/' \
147
 
                > $RPM_BUILD_ROOT/etc/dwood3rc
148
 
else
149
 
        echo /etc/dwood3rc already there, not replacing
150
 
fi
151
 
 
152
131
# If the system in question does not already have configuration files,
153
132
# place example configuration files in /etc
154
133
if [ -d doc/$LANGUAGE/examples ] ; then
187
166
              cp $BUILDDIR/mara.startup $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns
188
167
              cp $BUILDDIR/zoneserver.startup \
189
168
                  $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns.zoneserver
190
 
              cp $BUILDDIR/deadwood.startup \
191
 
                  $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns.deadwood
192
 
              chmod 755 $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns.deadwood
193
169
        fi
194
170
        if cd $RPM_BUILD_ROOT/etc/rc.d/rc3.d/ ; then
195
171
                echo Starting up MaraDNS at runlevel 3
196
172
                rm S60maradns 2> /dev/null
197
173
                rm K60maradns.zoneserver 2> /dev/null
198
 
                rm S60maradns.deadwood 2> /dev/null
199
174
                ln -s ../init.d/maradns S60maradns
200
175
                ln -s ../init.d/maradns.zoneserver K60maradns.zoneserver
201
 
                ln -s ../init.d/maradns.deadwood S60maradns.deadwood
202
176
        fi
203
177
        if cd $RPM_BUILD_ROOT/etc/rc.d/rc5.d/ ; then
204
178
                echo starting up MaraDNS at runlevel 5
205
179
                rm S60maradns 2> /dev/null
206
180
                rm K60maradns.zoneserver 2> /dev/null
207
 
                rm S60maradns.deadwood 2> /dev/null
208
181
                ln -s ../init.d/maradns S60maradns
209
182
                ln -s ../init.d/maradns.zoneserver K60maradns.zoneserver
210
 
                ln -s ../init.d/maradns.deadwood S60maradns.deadwood
211
183
        fi
212
184
fi
213
185