1#!/bin/sh
2
3NAME="wzdftpd"
4
5TEST_RESULTS=$1
6test -z "$TEST_RESULTS" && TEST_RESULTS=results.log
7
8# Exit immediately if command fails
9set -e
10
11# Print command executed to stdout
12set -v
13
14# Pull in config scripts
15PATH=$AUTO_BUILD_ROOT/bin:$PATH
16export PATH
17
18# Clean up build area
19[ -f Makefile ] && make -k maintainer-clean ||:
20
21./bootstrap || exit 1
22
23# Configure the build
24./configure --prefix=$AUTO_BUILD_ROOT
25
26# Make
27make
28
29
30if [ -z "$SKIP_TESTS" -o "$SKIP_TESTS" = "0" ]; then
31  make check TEST_VERBOSE=1 | tee $TEST_RESULTS
32fi
33
34
35make install
36
37rm -f $NAME-*.tar.gz
38make dist
39
40cp $NAME-*.tar.gz $HOME/package-root/tar/
41
42if [ -x /usr/bin/rpmbuild ]; then
43  rpmbuild -ta --clean $NAME-*.tar.gz
44fi
45
46if [ -x /usr/bin/fakeroot ]; then
47  fakeroot debian/rules clean
48  fakeroot debian/rules DESTDIR=$HOME/package-root/debian binary
49fi
50
51exit 0
52