1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
#!/bin/sh
#
# autogen.sh glue for fetchmail
# $Id: autogen.sh,v 1.18 2001/10/01 00:11:57 hmh Exp $
#
# Requires: gettext, automake, autoconf, dpkg-dev
set -e
# Fix fetchmailconf tabs that ESR's emacs keeps screwing up
vim -e -c "set ts=8 et" -c retab -c "wq" fetchmailconf &&
echo Vim used to make sure fetchmailconf is python -tt compatible
# Refresh GNU gettext, but do not allow symlinks
rm -f po/Makefile.in.in po/ChangeLog po/ChangeLog~ || true
gettextize -c -f && {
# Fix braindamage in gettext (debian bug #114019)
sed -e 's/=_/=GT_/g' -e 's/=N_/=NGT_/g' \
<po/Makefile.in.in >po/Makefile.in.in.new
mv po/Makefile.in.in.new po/Makefile.in.in
}
# Refresh GNU autotools toolchain.
aclocal
autoheader
#automake --verbose --foreign --add-missing
for i in config.guess config.sub missing install-sh mkinstalldirs ; do
test -r /usr/share/automake/${i} && cp -f /usr/share/automake/${i} .
chmod 755 ${i}
done
autoconf
# For the Debian build
test -d debian && {
# Make sure our executable and removable lists won't be screwed up
debclean && echo Cleaned buildtree just in case...
# refresh list of executable scripts, to avoid possible breakage if
# upstream tarball does not include the file or if it is mispackaged
# for whatever reason. Gettext needs this.
echo Generating list of executable files...
rm -f debian/executable.files
find -type f -perm +111 ! -name '.*' -fprint debian/executable.files
# Remove any files in upstream tarball that we don't have in the Debian
# package (because diff cannot remove files, and we don't want cruft in
# intl/ or po/ that could break a build).
version=`dpkg-parsechangelog | awk '/Version:/ { print $2 }' | sed -e 's/-[^-]\+$//'`
source=`dpkg-parsechangelog | awk '/Source:/ { print $2 }' | tr -d ' '`
if test -r ../${source}_${version}.orig.tar.gz ; then
echo Generating list of files that should be removed...
rm -f debian/deletable.files
touch debian/deletable.files
mkdir debian/tmp
cd debian/tmp
tar -zxf ../../../${source}_${version}.orig.tar.gz
cd ../..
for i in `find debian/tmp/ -type f ! -name '.*' -print | xargs` ; do
if test -r ${i} ; then
filename=`echo "${i}" | sed -e 's#.*debian/tmp/[^/]\+/##'`
test -r "${filename}" || echo "${filename}" >>debian/deletable.files
fi
done
rm -fr debian/tmp
else
echo Emptying list of files that should be deleted...
rm -f debian/deletable.files
touch debian/deletable.files
fi
}
exit 0
|