]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_gencontrol
r108: Initial Import
[debhelper.git] / dh_gencontrol
index e2a4e701b223cb689d050ba8ae7605a38794d636..c3698b56c20ccacb323e80f907d5ff3a6738234b 100755 (executable)
@@ -9,11 +9,18 @@ for PACKAGE in $DH_DOPACKAGES; do
        TMP=`tmpdir $PACKAGE`
        EXT=`pkgext $PACKAGE`
 
+       changelog=`pkgfile $PACKAGE changelog`
+       if [ ! "$changelog" ]; then
+               changelog=debian/changelog
+       fi
+
        if [ ! -d $TMP/DEBIAN ]; then
                doit "install -o root -g root -d $TMP/DEBIAN"
        fi
 
        # Generate and install control file.
-       doit "dpkg-gencontrol -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP $DH_U_PARAMS"
+       doit "dpkg-gencontrol -l$changelog -isp -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP $DH_U_PARAMS"
+       # This chmod is only necessary if the user sets the umask to something odd.
+       doit "chmod 644 $TMP/DEBIAN/control"
        doit "chown root.root $TMP/DEBIAN/control"
 done