diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:44:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:44:08 +0000 |
commit | 933bbaf3ed7bd659a5c044745aea763815928598 (patch) | |
tree | 6fe3906ff9f7121999800da3683c206d128b7d39 /debian/config-custom/create-custom-config-package | |
parent | Adding upstream version 4.94.2. (diff) | |
download | exim4-933bbaf3ed7bd659a5c044745aea763815928598.tar.xz exim4-933bbaf3ed7bd659a5c044745aea763815928598.zip |
Adding debian version 4.94.2-7+deb11u2.debian/4.94.2-7+deb11u2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/config-custom/create-custom-config-package | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/debian/config-custom/create-custom-config-package b/debian/config-custom/create-custom-config-package new file mode 100755 index 0000000..03be647 --- /dev/null +++ b/debian/config-custom/create-custom-config-package @@ -0,0 +1,71 @@ +#!/bin/bash + +if [ -n "$1" ]; then + PACKAGESUFFIX="$1" +else + PACKAGESUFFIX="custom" +fi + +TARGETDIR="../exim4-config-$PACKAGESUFFIX" +#DEBUG=1 + +# copy over -changelog, generating a proper changelog entry +# copy over update-exim4defaults, ip-up.d, email-addresses + +dh_testdir + +set -e + +copytextreplace() { + FILE="$1" + DSTFILE="$2" + DIR="${FILE%/*}" + FILE="${FILE##*/}" + if [ -z "$DSTFILE" ]; then + DSTFILE="$FILE" + fi + [ $DEBUG ] && echo >&2 "DBG: source $DIR/$FILE" + [ $DEBUG ] && echo >&2 "DBG: dst $TARGETDIR/$DIR/$DSTFILE" + mkdir -p $TARGETDIR/$DIR + if ! [ -e "$TARGETDIR/$DIR/$FILE" ]; then + < $DIR/$FILE \ + sed -e "s/exim4-config/exim4-config-$PACKAGESUFFIX/g" \ + -e "s/orig-exim4-config-$PACKAGESUFFIX/exim4-config/g" \ + > $TARGETDIR/$DIR/$DSTFILE + chmod --reference=$DIR/$FILE $TARGETDIR/$DIR/$DSTFILE + else + echo >&2 "ERR: can't write to $TARGETDIR/$DIR/$DSTFILE, file exists" + exit 1 + fi +} + +for file in manpages config templates postinst postrm dirs; do + copytextreplace debian/exim4-config.$file exim4-config-$PACKAGESUFFIX.$file +done + +for file in `cat debian/exim4-config.manpages` \ + `find debian/debconf \( -path '*/.svn/*' -prune \) -or \( -type f -print \)`; do + copytextreplace $file +done + +for file in compat control copyright rules install; do + copytextreplace debian/config-custom/debian/$file +done + +for file in ip-up.d update-exim4defaults email-addresses; do + copytextreplace debian/$file +done + +# manual corrections in target directory + +mv $TARGETDIR/debian/config-custom/debian/* $TARGETDIR/debian +rm -rf $TARGETDIR/debian/config-custom +chmod 775 $TARGETDIR/debian/rules + +# hack changelog + +< debian/changelog sed -n "/^exim4/{s/exim4/exim4-config-$PACKAGESUFFIX/p;q;}" > $TARGETDIR/debian/changelog +echo -e "\n * automatically generated changelog" >> $TARGETDIR/debian/changelog +< debian/changelog sed -n '/^ --/{p;q;}' >> $TARGETDIR/debian/changelog +cd $TARGETDIR +dch --append "generated source package by create-custom-package" |