Debian Codegraph @

debian/emacsen-install

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 # /usr/lib/emacsen-common/packages/install/semi
3 set -e
4
5 FLAVOR=$1
6 PACKAGE=semi
7
8 ELCDIR=/usr/share/$FLAVOR/site-lisp/$PACKAGE
9 ELDIR=/usr/share/$PACKAGE
10 ELCSTAMP=$ELCDIR/compile-stamp
11
12 case $FLAVOR in
13 *xemacs*|emacs2[0-3]|emacs1?|mule2)
14 exit 0
15 ;;
16 esac
17
18 if [scip-shell system . . `[`. ! -f "/usr/share/$FLAVOR/site-lisp/apel/alist.elc" ]; then exit 0; fi
19 if [scip-shell system . . `[`. ! -f "/usr/share/$FLAVOR/site-lisp/flim/mime.elc" ]; then exit 0; fi
20
21 if [scip-shell system . . `[`. -f "$ELCSTAMP" ]; then
22 if [scip-shell system . . `[`. -z "`findscip-shell system . . find. "$ELDIR/mime-view.el" -newer "$ELCSTAMP"`" ]; then
23 echoscip-shell system . . echo. "install/$PACKAGE: already byte-compiled for $FLAVOR, skipped"
24 exit 0
25 fi
26 rmscip-shell system . . rm. -f "$ELCSTAMP"
27 fi
28
29 LOG="$ELCDIR/CompilationLog"
30 echoscip-shell system . . echo. "install/$PACKAGE: byte-compiling for $FLAVOR"
31
32 cd "$ELDIR"
33 LINKS=`echoscip-shell system . . echo. *.el`
34 if [scip-shell system . . `[`. ! -d "$ELCDIR" ]; then
35 mkdirscip-shell system . . mkdir. "$ELCDIR"
36 chmodscip-shell system . . chmod. 755 "$ELCDIR"
37 fi
38
39 cd "$ELCDIR"
40 TOELDIR=../../../$PACKAGE
41 rmscip-shell system . . rm. -f *.elc __myinit.el
42 for f in $LINKS; do
43 lnscip-shell system . . ln. -sf "$TOELDIR/$f" .
44 done
45 FILES=`echoscip-shell system . . echo. sig*.el mime*.el semi*.el mail*.el | sedscip-shell system . . sed. 's/mime-mc.el//; s/mime-vcard.el//'`
46
47 catscip-shell system . . cat. > __myinit.el << EOF
48 (setq inhibit-automatic-native-compilation t)
49 (setq native-comp-deferred-compilation nil)
50 (setq comp-enable-subr-trampolines nil)
51 (setq load-path (cons "/usr/share/$FLAVOR/site-lisp/apel" load-path))
52 (setq load-path (cons "/usr/share/$FLAVOR/site-lisp/flim" load-path))
53 (setq load-path (cons "/usr/share/$FLAVOR/site-lisp/bitmap-mule" load-path))
54 (setq load-path (cons "." load-path))
55 (setq byte-compile-warnings t)
56 EOF
57
58 FLAGS="-q -no-site-file -batch -l __myinit.el -f batch-byte-compile"
59 echoscip-shell system . . echo. "$FLAVOR" $FLAGS $FILES > "$LOG"
60 set +e
61 "$FLAVOR" $FLAGS $FILES >> "$LOG" 2>&1
62 if [scip-shell system . . `[`. $? -ne 0 ]; then catscip-shell system . . cat. "$LOG"; exit 1; fi
63 set -e
64 gzipscip-shell system . . gzip. -9f "$LOG"
65 chmodscip-shell system . . chmod. 644 *.elc
66
67 rmscip-shell system . . rm. -f __myinit.el*
68
69 if [scip-shell system . . `[`. -f /usr/share/emacsen-common/debian-startup.elscip-shell filesystem . . `/usr/share/emacsen-common/debian-startup.el`. ] && \
70 [ ! -f "/etc/$FLAVOR/site-start.d/51$PACKAGE.el" ] && \
71 [ -f "/etc/emacs/site-start.d/51$PACKAGE.el" ] && \
72 [ -d "/etc/$FLAVOR/site-start.d" ]; then
73 lnscip-shell system . . ln. -sf "../../emacs/site-start.d/51$PACKAGE.el" "/etc/$FLAVOR/site-start.d/51$PACKAGE.el"
74 fi
75
76 echoscip-shell system . . echo. "install/$PACKAGE: byte-compiling for reverse dependency"
77 pkgs=
78 for p in wl:wl wl-beta:wl w3m-el:w3m w3m-el-snapshot:w3m cmail t-gnus; do
79 pkg=`echoscip-shell system . . echo. $p | cutscip-shell system . . cut. -d : -f 1`
80 sname=`echoscip-shell system . . echo. $p | cutscip-shell system . . cut. -d : -f 2`
81 dir=/usr/share/$FLAVOR/site-lisp/$sname
82 if [scip-shell system . . `[`. -n "$sname" ] && [scip-shell system . . `[`. -d "$dir" ] && [scip-shell system . . `[`. -f "/usr/lib/emacsen-common/packages/install/$pkg" ]; then
83 rmscip-shell system . . rm. -f "$dir"/*.elc "$dir"/*/*.elc "$dir"/*-stamp "$dir"/*/*-stamp
84 pkgs="$pkg $pkgs"
85 fi
86 done
87 for pkg in $pkgs; do
88 "/usr/lib/emacsen-common/packages/install/$pkg" "$FLAVOR"
89 done
90
91 touchscip-shell system . . touch. "$ELCSTAMP"
92 exit 0