3 #########################################################################
4 # This program is free software: you can redistribute it and/or modify #
5 # it under the terms of the version 3 of the GNU General Public License #
6 # as published by the Free Software Foundation. #
8 # This program is distributed in the hope that it will be useful, but #
9 # WITHOUT ANY WARRANTY; without even the implied warranty of #
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
11 # General Public License for more details. #
13 # You should have received a copy of the GNU General Public License #
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
16 # Written by and Copyright (C) Francois Fleuret #
17 # Contact <francois@fleuret.org> for comments & bug reports #
18 #########################################################################
20 # You need at least the Debian packages: gcc make cvs texinfo
21 # libx11-dev libxft-dev libgif-dev libjpeg62-dev libpng12-dev
22 # libtiff4-dev libxpm-dev
26 DIR=/usr/local/emacs-snapshot
32 ################################################################
41 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs \
46 ################################################################
52 # I do not like gtk and such, hence the very limited
53 # configuration options. Feel free to add your own.
55 ./configure --prefix=${DIR} \
56 --with-xpm --with-jpeg --with-tiff --with-png \
64 ################################################################
68 if [[ -a /usr/share/emacs-snapshot ]]; then
69 echo "You have to remove /usr/share/emacs-snapshot." >&2
73 # We do not know the version you downloaded. This ugly
74 # command will figure it out for you
76 SHARE=$(find ${DIR}/share/emacs/ -maxdepth 1 -mindepth 1 -type d \
79 if [[ ! -d "${SHARE}" ]]; then
80 echo "Can not find ${SHARE}, that's weird." >&2
84 ln -s ${SHARE}/ /usr/share/emacs-snapshot
86 for p in emacs ctags etags emacsclient ebrowse; do
87 # Install the binary as a link in /usr/bin
88 ln -s ${DIR}/bin/$p /usr/bin/$p-snapshot
89 # Tell the Debian system that the binary can be used
90 # as an alternative version
92 --install /usr/bin/$p $p /usr/bin/$p-snapshot 23
93 # Tell the Debian system that that new version should
96 --set $p /usr/bin/$p-snapshot
99 mkdir -p /etc/emacs-snapshot/site-start.d
101 # Compile and install for that version of emacs all the
102 # emacs packages installed as Debian packages (vm, bbdb,
104 /usr/lib/emacsen-common/emacs-install emacs-snapshot
108 ################################################################
112 # Remove that version of emacs from the list of versions
113 # for which Debian emacs-related packages should be
115 /usr/lib/emacsen-common/emacs-remove emacs-snapshot
117 rm -rf /etc/emacs-snapshot
119 # Remove the alternatives
120 for p in emacs ctags etags emacsclient ebrowse; do
121 update-alternatives --remove $p /usr/bin/$p-snapshot
122 rm /usr/bin/$p-snapshot
125 rm /usr/share/emacs-snapshot
128 ################################################################
136 ################################################################
140 echo "$0 <download | compile | install | deinstall | remove>" >&2