No longer in use
[git-tools-moved-to-github.git] / id-deb-build / id-pbuild.sh
index 0f3441e..e53268e 100755 (executable)
@@ -79,7 +79,7 @@ if test ! -x $PBUILDROOT; then
 fi
 
 if test "$CENTOS_DIST"; then
-    RNAME=`rpm -q --specfile *.spec --queryformat "%{NAME};" | cut -d ";" -f1`
+    RNAME=`awk '/Name:/ {print $2}' *.spec`
     echo "RNAME=$RNAME"
     if test "$NAME" -a "$NAME" != "$RNAME"; then
        echo "NAME in IDMETA ($NAME) does not match RPM spec NAME ($RNAME)"
@@ -100,15 +100,8 @@ if $debian; then
            echo "$MKDEBSRC not found"
            exit 1
        fi
-       DCH=debian/changelog
-       if ! git ls-files $DCH --error-unmatch >/dev/null 2>&1; then
-           rm -f $DCH
-           echo "${DNAME} (${VERSION}-1.indexdata) unstable; urgency=medium" >$DCH
-           echo '' >>$DCH
-           echo '  * Upstream.' >>$DCH
-           echo '' >>$DCH
-           echo " -- `git config --get user.name` <`git config --get user.email`>  `date -R`" >>$DCH
-           echo '' >>$DCH
+       if ! ${ID_DEB_BUILD}/id-mk-deb-changelog.sh; then
+           echo "id-mk-deb-changelog.sh failed"
        fi
        if test "${SUDO_USER}"; then
            if test ! -d deb-src; then
@@ -121,6 +114,7 @@ if $debian; then
                    echo "deb-src could not be removed. Remove deb-src manually"
                    exit 1
                fi
+               rm -f deb-src/*.dsc
            fi
            $MKDEBSRC
        fi
@@ -169,6 +163,7 @@ if $debian; then
     fi
     if test ! -f ${HOME_EXPORT}/.pbuilderrc; then
        echo "${HOME_EXPORT}/.pbuilderrc missing"
+       echo "You may need to run: ln -s ~/proj/git-tools/id-deb-build/pbuilderrc ~/.pbuilderrc"
        exit 1
     fi
 fi