File: old.shell.rules

package info (click to toggle)
maildrop 2.0.2-11%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 15,640 kB
  • ctags: 4,350
  • sloc: ansic: 61,420; cpp: 10,038; sh: 8,515; perl: 2,637; makefile: 840
file content (68 lines) | stat: -rw-r--r-- 2,437 bytes parent folder | download | duplicates (3)
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
#!/bin/sh -ex

export DH_COMPAT=2
tmp=`pwd`/debian/maildrop

CFLAGS="-g -D_GNU_SOURCE"
if echo $DEB_BUILD_OPTIONS | grep -vq noopt; then
CFLAGS="$CFLAGS -O2"
fi

case "$1" in
  build)
    dh_testdir
# trust on the auto-detect of qmail failing (for sendmail compability)
    [ -f config.status ] || CPPFLAGS="$CFLAGS" ./configure --prefix=/usr \
       --mandir='${prefix}/share/man' --libexecdir='${prefix}/lib/maildrop' \
       --sysconfdir=/etc \
       --enable-use-dotlock=1 --enable-use-flock=1 \
       --enable-sendmail=/usr/sbin/sendmail --enable-maildirquota
    [ -f maildrop/maildrop ] || make
    ;;
  clean)
    dh_testdir
    dh_testroot
    [ ! -f Makefile ] || make distclean
    rm -rf .deps
    dh_clean stamp-build
    ;;
  binary-arch|binary)
    [ -f config.status -a -f maildrop/maildrop ] || $0 build
    dh_testdir
    dh_testroot
    dh_clean -k
    dh_installdirs usr/bin usr/sbin usr/share/doc/maildrop etc
    make DESTDIR=$tmp install
# we use update-alternatives to manage these, because they're shared
# by other packages, notably qmail, courier-imap, mutt, mush
    (cd $tmp/usr/bin && mv maildirmake maildirmake.maildrop)
    (cd $tmp/usr/bin && mv lockmail lockmail.maildrop)
    (cd $tmp/usr/bin && mv deliverquota ../sbin/deliverquota.maildrop)
    (cd $tmp/usr/share/man/man1 && mv maildirmake.1 maildirmake.maildrop.1)
    (cd $tmp/usr/share/man/man8 && mv deliverquota.8 deliverquota.maildrop.8)
    (cd $tmp/usr/share/man/man1 && mv lockmail.1 lockmail.maildrop.1)
    (cd $tmp/usr/share/man/man5 && mv maildir.5 maildir.maildrop.5)
    (cd $tmp/usr/share/man/man7 && mv maildirquota.7 maildirquota.maildrop.7)
    ln -s maildropfilter.5.gz $tmp/usr/share/man/man5/maildroprc.5.gz
    ln -s maildropfilter.5.gz $tmp/usr/share/man/man5/mailfilter.5.gz
    install -m 644 -p debian/maildroprc $tmp/etc
    find $tmp/usr -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty
    dh_installdocs README README.html AUTHORS INSTALL INSTALL.html maildroptips.txt
    dh_installchangelogs ChangeLog
# NB PAM config installed manually
#    dh_installpam
    if echo $DEB_BUILD_OPTIONS | grep -vq nostrip; then
      dh_strip
    fi
    dh_compress
    dh_fixperms
    (cd $tmp/usr/bin && chgrp mail maildrop lockmail.maildrop)
    (cd $tmp/usr/bin && chmod g+s maildrop lockmail.maildrop)
    dh_installdeb
    dh_perl
    dh_shlibdeps
    dh_gencontrol
    dh_md5sums
    dh_builddeb
    ;;
esac