Subversion Repositories libspf2

Compare Revisions

Ignore whitespace Rev 4 → Rev 5

/trunk/debian/patches/01_line-endings.dpatch
13,16 → 13,16
set -e
 
dpatch_patch() {
# Change line endings to LF in files with CRLF
sed -ri -e 's/\r$//' $FILES_WITH_CRLF
if [ ! -f debian/patched/patched-line-endings.tar.gz ]; then
tar -czf debian/patched/patched-line-endings.tar.gz $FILES_WITH_CRLF
# Change line endings to LF in files with CRLF
sed -ri -e 's/\r$//' $FILES_WITH_CRLF
fi
}
 
dpatch_unpatch() {
# Change line endings back to CRLF in files that had it in the tarball
# Unfortunately there are exceptions ... have to watch out for changes
# in future upstream versions (or simply make backups instead).
sed -ri -e '/\r$|^#pragma comment/!s/$/\r/' $FILES_WITH_CRLF
sed -ri -e '$s/\r$//' src/libspf2/spf_dns_windns.c
tar -xzf debian/patched/patched-line-endings.tar.gz
}
 
DPATCH_LIB_NO_DEFAULT=1