~ubuntu-branches/ubuntu/vivid/exuberant-ctags/vivid

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-04-14 13:42:14 UTC
  • Revision ID: package-import@ubuntu.com-20120414134214-000g5e5nur0lcgci
Tags: 1:5.9~svn20110310-4
* Simplify alternatives handling.  update-alternatives doesn't need so
  much babysitting these days.
* Reduce the etags alternative's priority to 10 so that it's less than
  that of emacs (closes: #668560).
* Upgrade to debhelper v9 and its new arrangements for honouring
  dpkg-buildflags output.
* Append CPPFLAGS to CFLAGS, since the upstream build system doesn't
  honour CPPFLAGS.  This enables -D_FORTIFY_SOURCE=2 with Debian's default
  dpkg-buildflags configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
set -e
4
4
 
5
 
if [ "$1" != "configure" ]; then
6
 
        exit 0
7
 
fi
 
5
update-alternatives --install /usr/bin/ctags ctags /usr/bin/ctags-exuberant 30 \
 
6
        --slave /usr/share/man/man1/ctags.1.gz ctags.1.gz /usr/share/man/man1/ctags-exuberant.1.gz
 
7
update-alternatives --install /usr/bin/etags etags /usr/bin/ctags-exuberant 10 \
 
8
        --slave /usr/share/man/man1/etags.1.gz etags.1.gz /usr/share/man/man1/ctags-exuberant.1.gz
8
9
 
9
 
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
10
 
        buffer=$(tempfile)
11
 
        for i in ctags etags ; do
12
 
                update-alternatives --display $i > "$buffer" || true
13
 
                if ! grep -q '\(exuberant|/usr/man\)' "$buffer" ; then
14
 
                        update-alternatives --install /usr/bin/$i $i /usr/bin/ctags-exuberant 30 \
15
 
                                --slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/ctags-exuberant.1.gz
16
 
                fi
17
 
        done
18
 
        rm -f "$buffer"
19
 
fi
20
10
 
21
11
#DEBHELPER#
22
12