Merge branch 'vendor/OPENSSL'
[dragonfly.git] / test / fastbulk / dobuild
1 #!/bin/csh
2 #
3 # This is run from the chroot via fastbulk, which has CDd
4 # into a particular pkgsrc directory and wants us to build it.
5
6 # Nothing to do if the package already exists.  Remove the run log
7 # to prevent fastbulk from replacing the log from a previous run
8 #
9 set pkgname = "`bmake show-var VARNAME=PKGNAME`"
10 set logname = $argv[1]
11 if ( -f /usr/pkgsrc/packages/All/${pkgname}.tgz ) then
12     rm -f /tmp/logs/run/$logname
13     exit 0
14 endif
15
16 # We have to remove any conflicting packages or the one we
17 # are trying to build will refuse to build.  Note that we
18 # leave the related packages intact.
19 #
20 foreach i ( `bmake show-var VARNAME=CONFLICTS` )
21     echo "DELETING CONFLICTING PACKAGE: $i"
22     pkg_delete -r "$i"
23 end
24
25 # To ensure a clean build deinstall anything that
26 # may cause our build repackage to fail.
27 #
28 # Clean after repackaging (if it succeeded) to keep the
29 # work topology footprint small.  The work topology is
30 # left intact for failed builds.
31 #
32 bmake deinstall DEINSTALLDEPENDS=ALL SKIP_LICENSE_CHECK=yes
33 bmake repackage clean SKIP_LICENSE_CHECK=yes
34 exit $status