22
22
case "${FLAVOR}" in
24
echo "install/${PACKAGE}: Ignoring Flavor ${FLAVOR} ..."
24
echo "install/${PACKAGE}: Ignoring Flavor ${FLAVOR} ..."
28
echo "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
32
TARGETS="rmail mhe gnus bbdb"
34
if [ -d /usr/share/${FLAVOR}/site-lisp/vm ]; then
36
elif [ ${FLAVOR} = xemacs20 -o ${FLAVOR} = xemacs21 ]; then
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
45
MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/mail
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
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
67
GNUSDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/gnus
28
echo "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
32
TARGETS="rmail mhe gnus bbdb"
34
if [ -d /usr/share/${FLAVOR}/site-lisp/vm ]; then
36
elif [ ${FLAVOR} = xemacs20 -o ${FLAVOR} = xemacs21 ]; then
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
45
MHEDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/mail
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
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
67
GNUSDIR=/usr/share/${FLAVOR}/site-lisp/../lisp/gnus
73
73
rm -rf ${ELCDIR} && cp -a ${ELDIR} ${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
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
83
echo "Byte-compiling bbdb..."
84
make $TARGETS EMACS_PROG=${FLAVOR} \
85
VMDIR=/usr/share/${FLAVOR}/site-lisp/vm \
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
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)
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}
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}/
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}
103
# make -k clean >> $LOG
104
mv $LOG ${ELCDIR}/CompilationLog
105
gzip -9 ${ELCDIR}/CompilationLog
106
chmod 644 ${ELCDIR}/CompilationLog.gz
108
# make symlinks for source files that were not copied over to ELCDIR
109
# this makes find-function and find-library work properly
112
if [ -e ${ELCDIR}/${f}c ] && [ ! -e ${ELCDIR}/${f} ]; then
113
ln -sf ${ELDIR}/lisp/${f} ${ELCDIR}/${f}
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}/
106
# make -k clean >> $LOG
107
mv $LOG ${ELCDIR}/CompilationLog
108
gzip -9 ${ELCDIR}/CompilationLog
109
chmod 644 ${ELCDIR}/CompilationLog.gz
111
# make symlinks for source files that were not copied over to ELCDIR
112
# this makes find-function and find-library work properly
115
if [ -e ${ELCDIR}/${f}c ] && [ ! -e ${ELCDIR}/${f} ]; then
116
ln -sf ${ELDIR}/lisp/${f} ${ELCDIR}/${f}