Architecture-any packages only built once
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 10 May 2010 11:31:13 +0000 (13:31 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 10 May 2010 11:31:13 +0000 (13:31 +0200)
id-deb-build/id-pbuild.sh

index abb65fd..cab6efa 100755 (executable)
@@ -73,6 +73,11 @@ fi
 PBUILDER=/usr/sbin/pbuilder
 PRODUCT=`echo *.dsc|sed 's/_.*//g'`
 ARCHS="i386 amd64"
+if grep "Architecture: all" $PKG >/dev/null; then
+    USE_ARCHS=i386
+else
+    USE_ARCHS=$ARCHS
+fi
 echo "Dsc $PKG . Product $PRODUCT"
 echo "Ubuntu distros: $UBUNTU_DIST"
 echo "Debian distros: $DEBIAN_DIST"
@@ -91,8 +96,9 @@ if $upload; then
 fi
 i=0
 date
+
 for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do
-    for arch in ${ARCHS}; do
+    for arch in ${USE_ARCHS}; do
         rm -fr ${dist}-${arch}
        (
            if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then
@@ -110,7 +116,7 @@ for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do
 done
 wait
 for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do
-    for arch in ${ARCHS}; do
+    for arch in ${USE_ARCHS}; do
        if test -f ${dist}-${arch}/*.dsc; then
            :
        else