* add all other functionality of debstd (??)
* dh_fixperms: allow listing of files not to be touched (diffucult).
* add a dh_debstd, which mimics debstd, but uses debhelper tools internally.
+* dh_du: change it so it doesn't grep for things with tabs in them. That's
+ nasty. (and makes cut-and-paste from dh_du -v not work).
+debhelper (0.18) unstable; urgency=low
+
+ * examples/*: added source, diff targets that just print an error.
+ * dh_clean: clean up more files - *.orig, *.rej, *.bak, .*.orig, .*.rej,
+ .SUMS, TAGS, and empty files.
+ * dh_lib: doit(): use eval on parameters, instead of directly running
+ them. This lets me clean up several nasty areas where I had to echo the
+ commands once, and then run them seperatly.
+
+ -- Joey Hess <joeyh@master.debian.org> Mon, 10 Nov 1997 19:48:36 -0500
+
debhelper (0.17) unstable; urgency=low
* Added dh_installdirs, automatically creates subdirectories (for
# Remove other temp files. doit isn't smart enough to handle this, so I echo
# by hand (sigh).
-verbose_echo "find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \;"
-find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \;
+doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE -o -name '*.orig' \
+ -o -name '*.rej' -o -name '*.bak' -o -name '.*.orig' \
+ -o -name '.*.rej' -o -name .SUMS -o -name TAGS -o -name core \
+ -o -size 0 \) -exec rm -f {} \;"
doit "install -d $TMP/DEBIAN"
fi
- verbose_echo "du -k $TMP | sed \"s: $TMP/: :\" | grep -v \" DEBIAN$\" | grep -v \" $TMP$\" > $TMP/DEBIAN/du"
- du -k $TMP | sed "s: $TMP/: :" | grep -v " DEBIAN$" | grep -v " $TMP$" >$TMP/DEBIAN/du
+ # Note that the tabs in this next line are important.
+ doit "du -k $TMP | sed 's: $TMP/: :' | grep -v ' DEBIAN$' | grep -v ' $TMP$' >$TMP/DEBIAN/du"
doit "chown root.root debian/tmp/DEBIAN/du"
done
if [ -f debian/$EXT$file ]; then
# Add this into the script, where it has #DEBHELPER#
if [ -f debian/$EXT$file.debhelper ]; then
- verbose_echo "perl -pe \"s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg\" < debian/$EXT$file > $TMP/DEBIAN/$file"
- perl -pe "s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg" < debian/$EXT$file > $TMP/DEBIAN/$file
+ doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file"
doit "chown root.root $TMP/DEBIAN/$file"
doit "chmod 755 $TMP/DEBIAN/$file"
else
# Auto-generate script header and add .debhelper
# content to it.
if [ -f debian/$EXT$file.debhelper ]; then
- verbose_echo "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file"
- echo '#!/bin/sh -e' > $TMP/DEBIAN/$file
- verbose_echo "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file"
- cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file
+ doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file"
+ doit "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file"
doit "chown root.root $TMP/DEBIAN/$file"
doit "chmod 755 $TMP/DEBIAN/$file"
fi
fi
done
# Create dirs.
- verbose_echo "cd $TMP && install -d $dirs && cd ../.."
- cd $TMP
- install -d $dirs
- cd ../..
+ doit "cd $TMP && install -d $dirs && cd ../.."
fi
done
# Run a command, and display the command to stdout if verbose mode is on.
# All commands that modifiy files in $TMP should be ran via this
# function.
-# Unfortunatly, this function doesn't work if your command uses redirection,
-# you will have to call verbose_echo by hand then.
doit() {
- verbose_echo "$*"
- $*
+ verbose_echo "$@"
+ eval "$@"
}
# Echo something if the verbose flag is on.
verbose_echo() {
if [ "$DH_VERBOSE" ]; then
- echo " $*"
+ echo " $@"
fi
}
fi
# Running doit doesn't cut it here.
- verbose_echo echo "# Automatically added by `basename $0` on `822-date`" ">>" $autoscript_debscript
- echo "# Automatically added by `basename $0` on `822-date`" >> $autoscript_debscript
- verbose_echo sed "$autoscript_sed" $autoscript_filename ">>" $autoscript_debscript
- sed "$autoscript_sed" $autoscript_filename >> $autoscript_debscript
- verbose_echo echo "# End automatically added section" ">>" $autoscript_debscript
- echo "# End automatically added section" >> $autoscript_debscript
+ doit "echo \"# Automatically added by `basename $0` on `822-date`\" >> $autoscript_debscript"
+ doit "sed \"$autoscript_sed\" $autoscript_filename >> $autoscript_debscript"
+ doit "echo '# End automatically added section' >> $autoscript_debscript"
}
# Argument processing and global variable initialization is below.
if [ ! -d "$TMP/DEBIAN" ] ; then
doit "install -d $TMP/DEBIAN"
fi
- verbose_echo "echo \"$LIBRARY $MAJOR $PACKAGE\" >>$TMP/DEBIAN/shlibs"
- echo "$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs
+ doit "echo '$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs"
done
if [ -e "$TMP/DEBIAN/shlibs" ]; then
doit "install -d $TMP/DEBIAN"
fi
- # Doit isn't smart enough to hande this next command so echo by hand. (sigh)
- verbose_echo 'find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP/:: | sort > $TMP/DEBIAN/allfiles'
- find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP:: | sort > $TMP/DEBIAN/allfiles
+ doit "find $TMP/* -type f ! -regex '^$TMP/DEBIAN/.*' | sed s:$TMP:: | sort > $TMP/DEBIAN/allfiles"
# Check if we should exclude conffiles.
if [ ! "$DH_EXCLUDE" -a -r $TMP/DEBIAN/conffiles ]; then
- verbose_echo "sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new"
- sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new
+ doit "sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new"
doit "mv $TMP/DEBIAN/allfiles.new $TMP/DEBIAN/allfiles"
fi
- verbose_echo "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.."
- cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../..
+ doit "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.."
doit "chown root.root $TMP/DEBIAN/md5sums"
doit "rm -f $TMP/DEBIAN/allfiles"
done
dh_md5sums
dh_builddeb
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
dh_md5sums -a
dh_builddeb -a
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary