File: emacsen-install

package info (click to toggle)
select-xface 0.15-13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 176 kB
  • sloc: lisp: 1,602; sh: 67; makefile: 34
file content (57 lines) | stat: -rw-r--r-- 1,472 bytes parent folder | download
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
#!/bin/sh
# /usr/lib/emacsen-common/packages/install/select-xface
set -e

FLAVOR=$1
PACKAGE="select-xface"

if [ "X${FLAVOR}" = "X" ]; then
  echo Need argument to determin FLAVOR of emacsen
  exit 1
fi
if [ "X${PACKAGE}" = "X" ]; then
  echo Internal error: need package nameen
  exit 1
fi

ELDIR=/usr/share/${PACKAGE}
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
TOELDIR=../../../$PACKAGE
COMPILE_SRC="select-xface.el"
COMPILE_OPT="-batch -q -no-site-file -l __myinit.el -f batch-byte-compile"

echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
rm -rf ${ELCDIR}
install -m 755 -d ${ELCDIR}

cp ${ELDIR}/* ${ELCDIR}/

cd "$ELDIR"
FILES=`echo *.el`
cd "$ELCDIR"
cat > __myinit.el << EOF
(setq inhibit-automatic-native-compilation t)
(setq native-comp-deferred-compilation nil)
(setq comp-enable-subr-trampolines nil)
EOF
set +e
${FLAVOR} ${COMPILE_OPT} ${COMPILE_SRC} > CompilationLog 2>&1
if [ $? -ne 0 ]; then cat CompilationLog; exit 1; fi
set -e
rm -f ${ELCDIR}/*.el
for f in $FILES; do
    ln -sf "$TOELDIR/$f" .
done
gzip -9f CompilationLog
if [ -f ${ELCDIR}/select-xface.elc ]; then
  chmod 644 ${ELCDIR}/*.elc
fi
if [ -f /usr/share/emacsen-common/debian-startup.el ] && \
   [ ! -f "/etc/$FLAVOR/site-start.d/52$PACKAGE.el" ] && \
   [ -f "/etc/emacs/site-start.d/52$PACKAGE.el" ] && \
   [ -d "/etc/$FLAVOR/site-start.d" ]; then
  ln -sf "../../emacs/site-start.d/52$PACKAGE.el" "/etc/$FLAVOR/site-start.d/52$PACKAGE.el"
fi
echo " done."

exit 0