- webpublish mkdir -p $WEBPATH/$BASE/{RPMS,SRPMS}
- webpublish_rsync_dir /vservers/$BASE/build/RPMS/ $WEBPATH/$BASE/RPMS/
- [[ -n "$PUBLISH_SRPMS" ]] && webpublish_rsync_dir /vservers/$BASE/build/SRPMS/ $WEBPATH/$BASE/SRPMS/
+ # guess if we've been doing any debian-related build
+ if [ ! -f /vservers/$BASE/etc/debian_version ] ; then
+ webpublish mkdir -p $WEBPATH/$BASE/{RPMS,SRPMS}
+ webpublish_rsync_dir $WEBPATH/$BASE/RPMS/ /vservers/$BASE/build/RPMS/
+ [[ -n "$PUBLISH_SRPMS" ]] && webpublish_rsync_dir $WEBPATH/$BASE/SRPMS/ /vservers/$BASE/build/SRPMS/
+ else
+ # run scanpackages so we can use apt-get on this
+ # (not needed on fedora b/c this is done by the regular build already)
+ vserver $BASE exec bash -c "(cd /build ; dpkg-scanpackages DEBIAN/ | gzip -9c > DEBIAN/Packages.gz)"
+ webpublish mkdir -p $WEBPATH/$BASE/DEBIAN
+ webpublish_rsync_files $WEBPATH/$BASE/DEBIAN/ /vservers/$BASE/build/DEBIAN/*.deb
+ webpublish_rsync_files $WEBPATH/$BASE/ /vservers/$BASE/build/DEBIAN/*.gz
+ fi