dockerrpm
37 lines
| 970 B
| text/plain
|
TextLexer
/ contrib / dockerrpm
Mads Kiilerich
|
r22438 | #!/bin/bash -e | ||
Matt Mackall
|
r21255 | |||
Augie Fackler
|
r24968 | . $(dirname $0)/dockerlib.sh | ||
Matt Mackall
|
r21255 | BUILDDIR=$(dirname $0) | ||
Augie Fackler
|
r24969 | export ROOTDIR=$(cd $BUILDDIR/..; pwd) | ||
Matt Mackall
|
r21255 | |||
Augie Fackler
|
r24968 | checkdocker | ||
Mads Kiilerich
|
r22438 | |||
Mads Kiilerich
|
r22439 | PLATFORM="$1" | ||
Mads Kiilerich
|
r22443 | shift # extra params are passed to buildrpm | ||
Mads Kiilerich
|
r22439 | |||
Augie Fackler
|
r24969 | initcontainer $PLATFORM | ||
Mads Kiilerich
|
r22440 | |||
Mads Kiilerich
|
r22441 | RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM | ||
Mads Kiilerich
|
r22443 | contrib/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $* | ||
Mads Kiilerich
|
r22441 | |||
DSHARED=/mnt/shared | ||||
Mathias De Maré
|
r33598 | $DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \ | ||
Mads Kiilerich
|
r22441 | rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean | ||
Mads Kiilerich
|
r22444 | |||
Mathias De Maré
|
r33598 | $DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \ | ||
Mads Kiilerich
|
r22444 | createrepo $DSHARED | ||
cat << EOF > $RPMBUILDDIR/mercurial.repo | ||||
# Place this file in /etc/yum.repos.d/mercurial.repo | ||||
[mercurial] | ||||
Mads Kiilerich
|
r23124 | name=Mercurial packages for $PLATFORM | ||
Mads Kiilerich
|
r22444 | # baseurl=file://$RPMBUILDDIR/ | ||
Mads Kiilerich
|
r23124 | baseurl=http://hg.example.com/build/$PLATFORM/ | ||
Mads Kiilerich
|
r22444 | skip_if_unavailable=True | ||
gpgcheck=0 | ||||
enabled=1 | ||||
EOF | ||||
echo | ||||
echo "Build complete - results can be found in $RPMBUILDDIR" | ||||