Comments
Patch
@@ -140,14 +140,10 @@ rpm:
rpm-py:
contrib/buildrpm --rpmbuilddir $(PWD)/build/rpm --withpython --suffix -py
-docker-fedora:
- mkdir -p build/fedora
- contrib/dockerrpm fedora
-
-docker-centos6:
- mkdir -p build/centos6
- contrib/dockerrpm centos6
+# Valid rpm-$NAME targets have a corresponding contrib/docker/$NAME
+rpm-%:
+ contrib/dockerrpm $@
.PHONY: help all local build doc clean install install-bin install-doc \
install-home install-home-bin install-home-doc dist dist-notests tests \
- update-pot rpm rpm-py docker-fedora
+ update-pot rpm rpm-py
@@ -15,11 +15,13 @@ fi
$DOCKER version | grep -q "^Server version:" || { echo "Error: docker server not found - check it is running and your permissions"; exit 1; }
[ "$1" ] || { echo "Error: platform name must be specified"; exit 1; }
+NAME="$1"
+NAME="${NAME#rpm-}"
-DFILE="$ROOTDIR/contrib/docker/$1"
+DFILE="$ROOTDIR/contrib/docker/$NAME"
[ -f "$DFILE" ] || { echo "Error: docker file $DFILE not found"; exit 1; }
-CONTAINER="hg-rpm-$1"
+CONTAINER="hg-rpm-$NAME"
DBUILDUSER=build
(
@@ -28,7 +30,7 @@ echo RUN groupadd $DBUILDUSER -g `id -g`
echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER
) | $DOCKER build --tag $CONTAINER -
-RPMBUILD=$ROOTDIR/build/$1
+RPMBUILD=$ROOTDIR/build/$NAME
contrib/buildrpm --rpmbuilddir $RPMBUILD --prepare
DSHARED=/mnt/shared