~ubuntu-branches/ubuntu/saucy/sendmail/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/libmilter0.postrm

  • Committer: Bazaar Package Importer
  • Author(s): Richard A Nelson (Rick)
  • Date: 2008-04-21 18:04:00 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20080421180400-u4n3us1rqbd1eyir
Tags: 8.14.2-5
Determine libmilter library level dynamically - using the upstream
notation of <version-major>.<version-minor>.<patch-level>

This way, I don't need to remember to bump .so levels by hand, as
upstream is pretty good about incompatabilitesand the package
name directly corresponds with what a milter developer/builder
needs to know (instead of libmilter2 == 1.0.1)though the sendmail
version also gives that information.

This does affect the milter packages, who currently link against
libmilter1, as the new name is libmilter1.0.0 (the -dev package
keeps is name; libmilter-dev).

NOTE: things will continue work until milters are rebuiltas
the old library package still works.

With this change, when 8.14.3 is shipped, it will automatically
create libmilter1.0.1 (a bump in the patch level).

I thought about adding a compat symlink, but the milters don't seem
to be written in a way that makes that possiblethey apparently are
checking exact values of SMFI_VERSION, instead of
SM_LM_VRS_MAJOR(SMFI_VERSION) & SM_LM_VRS_MINOR(SMFI_VERSION)
and so don't work with the newer 1.0.1 level anyway (trust me) :(

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
#
3
 
# Debian post removal script
4
 
#
5
 
# Install of already installed package:
6
 
#       1) Upgrade of package:
7
 
#               new-preinst upgrade old-version
8
 
#               *) new-postrm abort-upgrade old-version
9
 
#       2) package had some configuration files from a previous version installed
10
 
#               new-preinst install old-version
11
 
#               *) new-postrm abort-install old-version
12
 
#       3) Otherwise (i.e., the package was completely purged)
13
 
#               new-preinst install
14
 
#               *) new-postrm abort-install
15
 
#
16
 
# Removal of a package:
17
 
#       1) prerm remove
18
 
#       2) The package's files are removed (except conffiles).
19
 
#       3) postrm remove
20
 
#       4) All the maintainer scripts except the postrm are removed.
21
 
#       5) The conffiles and any backup files
22
 
#               (~-files, #*# files, %-files, .dpkg-{old,new,tmp}, etc.) are removed.
23
 
#       6) postrm purge
24
 
#       7) The package's file list is removed
25
 
#
26
 
set -e;
27
 
 
28
 
PACKAGE=libmilter0;
29
 
 
30
 
case "$1" in
31
 
        remove)
32
 
                # /usr/share/doc/$PACKAGE is a symlink to /usr/share/doc/sendmail
33
 
                rm -f /usr/share/doc/sendmail/$PACKAGE 2>/dev/null || true;
34
 
                rmdir /usr/share/doc/sendmail/sendmail 2>/dev/null || true;
35
 
                ;;
36
 
 
37
 
        purge)
38
 
                ;;
39
 
 
40
 
        upgrade)
41
 
                ;;
42
 
 
43
 
        failed-upgrade|abort-install|abort-upgrade|disappear)
44
 
                ;;
45
 
 
46
 
        *)
47
 
                echo "$PACKAGE postrm called with unknown argument \`$1'" >&2;
48
 
                exit 1;
49
 
                ;;
50
 
        esac;
51
 
 
52
 
#DEBHELPER#
53
 
exit 0;