mdnbuildtest.sh revision dafcb997e390efa4423883dafd100c975c4095d6
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley#! /bin/sh -ex
dc2a85bed7fcfceab0df1867fbc1d35796261dedTinderbox User#
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2000, 2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Permission to use, copy, modify, and distribute this software for any
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley# purpose with or without fee is hereby granted, provided that the above
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley# copyright notice and this permission notice appear in all copies.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
0042d68e2f0d655d5a1088dd5f8be3c79c2477a6Brian Wellington# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
0042d68e2f0d655d5a1088dd5f8be3c79c2477a6Brian Wellington# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
d9059b0c38bd630c367d81424d72b1308cd74b04Tatuya JINMEI 神明達哉# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley# PERFORMANCE OF THIS SOFTWARE.
25c5d8e89efc6e6299a351eabcf55ac7e6005ebfMark Andrews
8c9fba44a41e3ea23e7e8405029980aba672f7ceEvan Hunt# $Id: mdnbuildtest.sh,v 1.3 2004/03/05 05:14:16 marka Exp $
e7857b5ee05414961bb11f9e57f654163fae6acbckb
d9059b0c38bd630c367d81424d72b1308cd74b04Tatuya JINMEI 神明達哉# XXXDCL This is currently much too specific to the environment in which
630b2d0c5a04cfc8b08d4585b7a0d997c00d7341Evan Hunt# it was written (NetBSD 1.5_alpha2 with libiconv in /usr/local/lib). It
440be4c866f6935ac069db79a414304507a664c2Michael Graff# is essentially just a copy of the commands I used to test building of
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley# the mdnkit contributed source, and needs to be better generalized.
501f6a2fa5541c0384640d7f6dc4d592acebfee9Andreas Gustafsson
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Directory was prepared with:
ad26c868910d4a7368fae94e5d7389d4139f7225Andreas Gustafsson# cvs export -r {tag} bind9
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt# cd bind9
b4d79725458782ce4ae781255fc7a22614a8b484Bob Halley
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewssh -ex util/sanitize_all.sh
e334405421979688f2d838805ac67ee47bd62976Mark Andrews
faa4af28cff84d7ac45c1da98e40c00f65a24aa3Mark Andrewsmdn=`pwd`/contrib/idn/mdnkit
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley
b4d79725458782ce4ae781255fc7a22614a8b484Bob Halleyset +e
6b79e960e6ba2991aeb02a6c39af255ab7f06d99Mark Andrewspatch -p0 < $mdn/patch/bind9/patch.most > patch.out 2>&1
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrewsset -e
2dd99c098ca162f985b7ef3c8142a964ad8281aeMark Andrews
b4d79725458782ce4ae781255fc7a22614a8b484Bob Halleycmd="egrep '^Hunk' patch.out | egrep -v '^Hunk #[0-9]+ succeeded at [0-9]+\.$'"
e9f6414d40ac21743db777007260053323570835Andreas Gustafssonif eval $cmd | egrep -q .; then
9ab8a7477d6a31275ca7d1f6b5f37c23a8a7e6cbBob Halley echo Patch was not entirely clean: >&2
b4d79725458782ce4ae781255fc7a22614a8b484Bob Halley $cmd >&2
b4d79725458782ce4ae781255fc7a22614a8b484Bob Halley echo Patch output is in patch.out. >&2
2ebe19d1a2b5381dcd6dce5882dfd5c98ab6db6dAndreas Gustafsson exit 1
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrencefi
4fdb67f4ebec8003fe8d4e34c2c1389725a4f793Bob Halley
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrencecd $mdn
ce1f5b8d0ae5936fd187c1f414ff12a7e3b0aa37Andreas Gustafsson
90ace4c9e063e67fb452907d11bf29eae618a355Brian WellingtonCFLAGS=-I/usr/local/include ./configure --with-iconv='-L/usr/local/lib -liconv'
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrencemake
d60f5b9bc8c1e1f7ddebc6c7834f7550a8e8be6fBob Halley
d60f5b9bc8c1e1f7ddebc6c7834f7550a8e8be6fBob Halleycd ../../..
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halley
7e6c9a9a733f7a57ace98e4692573f42a2cad0edBob Halleycp configure configure.orig
810656a187f2c358323bbf679f792f19a46a7973Mark Andrewsautoconf
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonset +e
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssondiff -u2 ./configure.orig ./configure > $mdn/patch/bind9/patch.configure
50faa6daf7e7550b3cd9d981ff3ddb9c0175080bAndreas Gustafssonset -e
d662fd77ecb875663f3d7510a8dd03f369697da2Andreas Gustafsson
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonmake
e334405421979688f2d838805ac67ee47bd62976Mark Andrews
e334405421979688f2d838805ac67ee47bd62976Mark Andrewsmake distclean > /dev/null 2>&1
e334405421979688f2d838805ac67ee47bd62976Mark Andrews
e334405421979688f2d838805ac67ee47bd62976Mark Andrewsmdntmp=tmp/mdn
e334405421979688f2d838805ac67ee47bd62976Mark Andrews
e334405421979688f2d838805ac67ee47bd62976Mark Andrewsrm -rf $mdntmp
e334405421979688f2d838805ac67ee47bd62976Mark Andrewsmkdir -p $mdntmp/lib $mdntmp/include
e334405421979688f2d838805ac67ee47bd62976Mark Andrewscp $mdn/lib/.libs/libmdn.so $mdntmp/lib
e334405421979688f2d838805ac67ee47bd62976Mark Andrewscp -r $mdn/include/mdn $mdntmp/include
e334405421979688f2d838805ac67ee47bd62976Mark Andrews
e334405421979688f2d838805ac67ee47bd62976Mark Andrews./configure --with-mdn=$mdntmp --with-iconv="-L/usr/local/lib -liconv"
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
b77cab68c65633bc534090b09fbac743b161f9b7Bob HalleyLD_LIBRARY_PATH=/usr/local/lib:$mdntmp/lib:/usr/lib make
b77cab68c65633bc534090b09fbac743b161f9b7Bob Halley
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinexit 0
0e5d1f7463f3b748b0aff6057c9d2d26cd15189bBob Halley