3
# autogen.sh glue for hplip
5
# HPLIP used to have five or so different autotools trees. Upstream
6
# has reduced it to two. Still, this script is capable of cleaning
7
# just about any possible mess of autoconf files.
9
# BE CAREFUL with trees that are not completely automake-generated,
10
# this script deletes all Makefile.in files it can find.
12
# Requires: automake 1.9, autoconf 2.57+
13
# Conflicts: autoconf 2.13
16
echo Running autoreconf...
17
autoreconf --force --install
19
# For the Debian package build
21
# link these in Debian builds
22
rm -f config.sub config.guess
23
ln -s /usr/share/misc/config.sub .
24
ln -s /usr/share/misc/config.guess .
26
# refresh list of executable scripts, to avoid possible breakage if
27
# upstream tarball does not include the file or if it is mispackaged
28
# for whatever reason.
29
[ "$1" = "updateexec" ] && {
30
echo Generating list of executable files...
31
rm -f debian/executable.files
32
find -type f -perm +111 ! -name '.*' -fprint debian/executable.files
35
# Remove any files in upstream tarball that we don't have in the Debian
36
# package (because diff cannot remove files)
37
version=`dpkg-parsechangelog | awk '/Version:/ { print $2 }' | sed -e 's/-[^-]\+$//'`
38
source=`dpkg-parsechangelog | awk '/Source:/ { print $2 }' | tr -d ' '`
39
if test -r ../${source}_${version}.orig.tar.gz ; then
40
echo Generating list of files that should be removed...
41
rm -f debian/deletable.files
42
touch debian/deletable.files
43
[ -e debian/tmp ] && rm -rf debian/tmp
45
( cd debian/tmp ; tar -zxf ../../../${source}_${version}.orig.tar.gz )
46
find debian/tmp/ -type f ! -name '.*' -print0 | xargs -0 -ri echo '{}' | \
48
if test -e "${i}" ; then
49
filename=$(echo "${i}" | sed -e 's#.*debian/tmp/[^/]\+/##')
50
test -e "${filename}" || echo "${filename}" >>debian/deletable.files
55
echo Emptying list of files that should be deleted...
56
rm -f debian/deletable.files
57
touch debian/deletable.files