~ubuntu-branches/ubuntu/oneiric/denemo/oneiric

« back to all changes in this revision

Viewing changes to debian/autogen.sh

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-10-27 08:00:18 UTC
  • mfrom: (1.2.7 upstream) (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20101027080018-suwj9ozy99d0a5a2
Tags: 0.8.16-1ubuntu1
* Merge with Debian testing (LP: #638617), Ubuntu remaining changes:
  - debian/patches/ubuntuize.diff:
    + Provide a Ubuntu-specific customization.
  - debian/patches/fix_desktop.diff:
    + Add missing trailing semicolon.
    + Add MIME types.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# autogen.sh glue for hplip
 
4
#
 
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.
 
8
#
 
9
# BE CAREFUL with trees that are not completely automake-generated,
 
10
# this script deletes all Makefile.in files it can find.
 
11
#
 
12
# Requires: automake 1.9, autoconf 2.57+
 
13
# Conflicts: autoconf 2.13
 
14
set -e
 
15
 
 
16
echo Running autoreconf...
 
17
autoreconf --force --install
 
18
 
 
19
# For the Debian package build
 
20
test -d debian && {
 
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 .
 
25
 
 
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
 
33
        }
 
34
 
 
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
 
44
                mkdir 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 '{}' | \
 
47
                  while read -r i ; do
 
48
                        if test -e "${i}" ; then
 
49
                                filename=$(echo "${i}" | sed -e 's#.*debian/tmp/[^/]\+/##')
 
50
                                test -e "${filename}" || echo "${filename}" >>debian/deletable.files
 
51
                        fi
 
52
                  done
 
53
                rm -fr debian/tmp
 
54
        else
 
55
                echo Emptying list of files that should be deleted...
 
56
                rm -f debian/deletable.files
 
57
                touch debian/deletable.files
 
58
        fi
 
59
}
 
60
 
 
61
exit 0