~ubuntu-branches/ubuntu/trusty/bbdb/trusty

« back to all changes in this revision

Viewing changes to debian/bbdb.emacsen-install

  • Committer: Bazaar Package Importer
  • Author(s): Barak A. Pearlmutter
  • Date: 2010-12-12 14:57:47 UTC
  • Revision ID: james.westby@ubuntu.com-20101212145747-du36spexvax17xwo
Tags: 2.36-2
* Update to bbdb-vcard 0.3, which better parses birthdays
* bump standards version (debian/changelog)
* bump to dh 8, dh --parallel, dh --with autotools_dev (debian/compat,
  debian/control, debian/rules)
* rephrase for grammar and Moore's Law (debian/bbdb.emacsen-install)
  (closes: #440192, #540539)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
case "${FLAVOR}" in
23
23
    emacs)
24
 
    echo "install/${PACKAGE}: Ignoring Flavor ${FLAVOR} ..."
25
 
    ;;
 
24
        echo "install/${PACKAGE}: Ignoring Flavor ${FLAVOR} ..."
 
25
        ;;
26
26
    *)
27
27
 
28
 
    echo "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
29
 
 
30
 
    rm -rf ${ELCDIR}
31
 
    cd ${ELDIR}
32
 
    TARGETS="rmail mhe gnus bbdb"
33
 
 
34
 
    if [ -d /usr/share/${FLAVOR}/site-lisp/vm ]; then
35
 
       TARGETS="$TARGETS vm"
36
 
    elif [ ${FLAVOR} = xemacs20 -o ${FLAVOR} = xemacs21 ]; then
37
 
       TARGETS="$TARGETS vm"
38
 
    fi
39
 
 
40
 
    if [ ${FLAVOR} = emacs19 -o ${FLAVOR} = mule2 ]; then
41
 
        MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp
42
 
    elif [ ${FLAVOR} = xemacs20 -o ${FLAVOR} = xemacs21 ]; then
43
 
        MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/mh-e
44
 
    else        # emacs20
45
 
        MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/mail
46
 
    fi
47
 
 
48
 
    ## for Gnus
49
 
    if [ -d /usr/share/${FLAVOR}/site-lisp/gnus ]; then
50
 
       GNUSDIR=/usr/share/${FLAVOR}/site-lisp/gnus
51
 
    elif [ -d /usr/share/${FLAVOR}/site-lisp/semi-gnus ]; then
52
 
       GNUSDIR=/usr/share/${FLAVOR}/site-lisp/semi-gnus
53
 
    elif [ -d /usr/share/${FLAVOR}/site-lisp/t-gnus ]; then
54
 
       GNUSDIR=/usr/share/${FLAVOR}/site-lisp/t-gnus
55
 
    elif [ -d /usr/share/${FLAVOR}/site-lisp/chaos ]; then
56
 
       GNUSDIR=/usr/share/${FLAVOR}/site-lisp/chaos
57
 
    fi
58
 
 
59
 
    if [ -z ${GNUSDIR} ]; then
60
 
       if [ ${FLAVOR} = emacs19 -o ${FLAVOR} = mule2 ]; then
61
 
         GNUSDIR=/usr/share/emacs/19.34/lisp
62
 
       elif [ ${FLAVOR} = xemacs20 ]; then
63
 
         GNUSDIR=/usr/lib/xemacs-20.4/lisp/gnus
64
 
       elif [ ${FLAVOR} = xemacs21 ]; then
65
 
         GNUSDIR=/usr/share/xemacs21/packages/lisp/gnus
66
 
       else
67
 
         GNUSDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/gnus
68
 
       fi
69
 
    fi
70
 
 
71
 
    LOG=`tempfile`
 
28
        echo "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
 
29
 
 
30
        rm -rf ${ELCDIR}
 
31
        cd ${ELDIR}
 
32
        TARGETS="rmail mhe gnus bbdb"
 
33
 
 
34
        if [ -d /usr/share/${FLAVOR}/site-lisp/vm ]; then
 
35
            TARGETS="$TARGETS vm"
 
36
        elif [ ${FLAVOR} = xemacs20 -o ${FLAVOR} = xemacs21 ]; then
 
37
            TARGETS="$TARGETS vm"
 
38
        fi
 
39
 
 
40
        if [ ${FLAVOR} = emacs19 -o ${FLAVOR} = mule2 ]; then
 
41
            MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp
 
42
        elif [ ${FLAVOR} = xemacs20 -o ${FLAVOR} = xemacs21 ]; then
 
43
            MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/mh-e
 
44
        else    # emacs20
 
45
            MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/mail
 
46
        fi
 
47
 
 
48
        ## for Gnus
 
49
        if [ -d /usr/share/${FLAVOR}/site-lisp/gnus ]; then
 
50
            GNUSDIR=/usr/share/${FLAVOR}/site-lisp/gnus
 
51
        elif [ -d /usr/share/${FLAVOR}/site-lisp/semi-gnus ]; then
 
52
            GNUSDIR=/usr/share/${FLAVOR}/site-lisp/semi-gnus
 
53
        elif [ -d /usr/share/${FLAVOR}/site-lisp/t-gnus ]; then
 
54
            GNUSDIR=/usr/share/${FLAVOR}/site-lisp/t-gnus
 
55
        elif [ -d /usr/share/${FLAVOR}/site-lisp/chaos ]; then
 
56
            GNUSDIR=/usr/share/${FLAVOR}/site-lisp/chaos
 
57
        fi
 
58
 
 
59
        if [ -z ${GNUSDIR} ]; then
 
60
            if [ ${FLAVOR} = emacs19 -o ${FLAVOR} = mule2 ]; then
 
61
                GNUSDIR=/usr/share/emacs/19.34/lisp
 
62
            elif [ ${FLAVOR} = xemacs20 ]; then
 
63
                GNUSDIR=/usr/lib/xemacs-20.4/lisp/gnus
 
64
            elif [ ${FLAVOR} = xemacs21 ]; then
 
65
                GNUSDIR=/usr/share/xemacs21/packages/lisp/gnus
 
66
            else
 
67
                GNUSDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/gnus
 
68
            fi
 
69
        fi
 
70
 
 
71
        LOG=`tempfile`
72
72
        
73
73
        rm -rf ${ELCDIR} && cp -a ${ELDIR} ${ELCDIR}
74
74
 
75
75
        # at ELCDIR
76
76
        ( cd ${ELCDIR}
77
 
        echo "Generating bbdb-autoloads..."
78
 
        echo "Generating bbdb-autoloads" >> $LOG
79
 
        make autoloads >> $LOG 2>&1
80
 
        if [ $FLAVOR != xemacs20 -a $FLAVOR != xemacs21 ]; then
81
 
            echo  "(provide 'bbdb-autoloads)" >> lisp/bbdb-autoloads.el
82
 
        fi
83
 
        echo "Byte-compiling bbdb. This takes looooooong..."
84
 
        make  $TARGETS EMACS_PROG=${FLAVOR} VMDIR=/usr/share/${FLAVOR}/site-lisp/vm GNUSDIR=${GNUSDIR} MHEDIR=${MHEDIR} >> $LOG 2>&1
85
 
        mv lisp/*.elc utils/*.el .
86
 
        rm -rf tex utils lisp Makefile
87
 
        ${FLAVOR} ${COMPILE} *.el >> $LOG 2>&1
 
77
            echo "Generating bbdb-autoloads..."
 
78
            echo "Generating bbdb-autoloads" >> $LOG
 
79
            make autoloads >> $LOG 2>&1
 
80
            if [ $FLAVOR != xemacs20 -a $FLAVOR != xemacs21 ]; then
 
81
                echo  "(provide 'bbdb-autoloads)" >> lisp/bbdb-autoloads.el
 
82
            fi
 
83
            echo "Byte-compiling bbdb..."
 
84
            make  $TARGETS EMACS_PROG=${FLAVOR} \
 
85
                VMDIR=/usr/share/${FLAVOR}/site-lisp/vm \
 
86
                GNUSDIR=${GNUSDIR} \
 
87
                MHEDIR=${MHEDIR} >> $LOG 2>&1
 
88
            mv lisp/*.elc utils/*.el .
 
89
            rm -rf tex utils lisp Makefile
 
90
            ${FLAVOR} ${COMPILE} *.el >> $LOG 2>&1
88
91
        )
89
 
    cat > ${ELCDIR}/load-path.el <<EOF 
 
92
        cat > ${ELCDIR}/load-path.el <<EOF 
90
93
(setq load-path (cons (concat "/usr/share/${FLAVOR}/site-lisp/bbdb") load-path))
91
94
(provide 'bbdb/load-path)
92
95
EOF
93
 
    if [ ! -e ${ELCDIR}/bbdb-gnus.elc ]; then
94
 
        echo "*** installing not-compiled bbdb-gnus.el ***" >> $LOG
95
 
        echo "install -m 644 ${ELDIR}/lisp/bbdb-gnus.el ${ELCDIR}" >> $LOG
96
 
        install -m 644 ${ELDIR}/lisp/bbdb-gnus.el ${ELCDIR}
97
 
    fi
 
96
        if [ ! -e ${ELCDIR}/bbdb-gnus.elc ]; then
 
97
            echo "*** installing not-compiled bbdb-gnus.el ***" >> $LOG
 
98
            echo "install -m 644 ${ELDIR}/lisp/bbdb-gnus.el ${ELCDIR}/" >> $LOG
 
99
            install -m 644 ${ELDIR}/lisp/bbdb-gnus.el ${ELCDIR}/
 
100
        fi
98
101
 
99
102
        # a hack to fix #179821, #210248, #233904
100
 
        # If bbdb gets installed before vm then the bbdb doesnt have the bbdb-vm compiled....
101
 
        install -m 644 ${ELDIR}/lisp/bbdb-vm.el ${ELCDIR}
102
 
 
103
 
    # make -k clean >> $LOG
104
 
    mv $LOG ${ELCDIR}/CompilationLog
105
 
    gzip -9 ${ELCDIR}/CompilationLog
106
 
    chmod 644 ${ELCDIR}/CompilationLog.gz
107
 
 
108
 
    # make symlinks for source files that were not copied over to ELCDIR
109
 
    # this makes find-function and find-library work properly
110
 
    cd ${ELDIR}/lisp
111
 
    for f in *.el; do
112
 
        if [ -e ${ELCDIR}/${f}c ] && [ ! -e ${ELCDIR}/${f} ]; then
113
 
            ln -sf ${ELDIR}/lisp/${f} ${ELCDIR}/${f}
114
 
        fi
115
 
    done
116
 
 
117
 
    echo " done."
118
 
    ;;
 
103
        # If bbdb is installed before vm, then bbdb does not have bbdb-vm compiled....
 
104
        install -m 644 ${ELDIR}/lisp/bbdb-vm.el ${ELCDIR}/
 
105
 
 
106
        # make -k clean >> $LOG
 
107
        mv $LOG ${ELCDIR}/CompilationLog
 
108
        gzip -9 ${ELCDIR}/CompilationLog
 
109
        chmod 644 ${ELCDIR}/CompilationLog.gz
 
110
 
 
111
        # make symlinks for source files that were not copied over to ELCDIR
 
112
        # this makes find-function and find-library work properly
 
113
        cd ${ELDIR}/lisp
 
114
        for f in *.el; do
 
115
            if [ -e ${ELCDIR}/${f}c ] && [ ! -e ${ELCDIR}/${f} ]; then
 
116
                ln -sf ${ELDIR}/lisp/${f} ${ELCDIR}/${f}
 
117
            fi
 
118
        done
 
119
 
 
120
        echo " done."
 
121
        ;;
119
122
esac
120