-
Notifications
You must be signed in to change notification settings - Fork 5
/
buildtest
86 lines (76 loc) · 1.61 KB
/
buildtest
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
86
#!/bin/sh
#
# buildtest -- build and test with numerous option combinations
#
# configuration
module="opendkim"
version="$1"
buildtop="`echo $1 | sed 's/-[A-Za-z0-9]*//g'`"
download="http://downloads.sourceforge.net/project/${module}/${module}-${version}.tar.gz"
buildroot=/var/tmp
# setup
buildtime="`date +%Y%m%d%H%M%S`"
buildname="${module}-${buildtime}"
builddir="${buildroot}/${buildname}"
# create directories
mkdir $builddir
cd $builddir
# download and unpack
wget -q $download
gunzip -c `basename $download` | tar xf -
cd ${module}-${buildtop}
for i in --enable-filter \
--with-db \
--with-odbx \
--with-tre \
--with-unbound \
--enable-allsymbols \
--enable-bodylengthdb \
--enable-capture_unknown_errors \
--enable-diffheaders \
--enable-dkim_reputation \
--enable-dnsupgrade \
--enable-identity_header \
--enable-parsetime \
--enable-redirect \
--enable-replace_rules \
--enable-report_intervals \
--enable-resign \
--enable-select_canonicalization \
--enable-selector_header \
--enable-sender_macro \
--enable-stats \
--enable-vbr \
--enable-ztags
do
# configure
./configure $CONFIG_OPTS $i > configure.out 2>&1
if test $? != 0
then
echo "${buildname} ./configure error"
tail -20 configure.out
exit 1
fi
# make
make > make.out 2>&1
if test $? != 0
then
echo "${buildname} make error"
tail -20 make.out
exit 1
fi
# make check
make check > make.out 2>&1
if test $? != 0
then
echo "${buildname} make check error"
tail -20 make.out
exit 1
fi
# make clean
rm make.out configure.out
make clean > /dev/null 2>&1
done
cd $HOME
rm -rf $builddir
exit 0