X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=emacs-cvs-in-debian.sh;fp=emacs-cvs-in-debian.sh;h=0000000000000000000000000000000000000000;hb=6473993b691c6280c4ad1d1d9a3b697eb0e05eb2;hp=3c5ea2591aec3d4818e80375358446b625665c4b;hpb=5d1aa1fd3b6c8a003dd3789791a349f34a0b0c14;p=scripts.git diff --git a/emacs-cvs-in-debian.sh b/emacs-cvs-in-debian.sh deleted file mode 100755 index 3c5ea25..0000000 --- a/emacs-cvs-in-debian.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash - -######################################################################### -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the version 3 of the GNU General Public License # -# as published by the Free Software Foundation. # -# # -# This program is distributed in the hope that it will be useful, but # -# WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -# Written by and Copyright (C) Francois Fleuret # -# Contact for comments & bug reports # -######################################################################### - -# You need at least the Debian packages: gcc make cvs texinfo -# libx11-dev libxft-dev libgif-dev libjpeg62-dev libpng12-dev -# libtiff4-dev libxpm-dev - -set -e - -DIR=/usr/local/emacs-snapshot - -while [[ $1 ]]; do - - case $1 in - - ################################################################ - - download) - - mkdir -p ${DIR} - - cd ${DIR} - - cvs -z3 \ - -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs \ - co emacs - - ;; - - ################################################################ - - compile) - - cd ${DIR}/emacs/ - - # I do not like gtk and such, hence the very limited - # configuration options. Feel free to add your own. - - ./configure --prefix=${DIR} \ - --with-xpm --with-jpeg --with-tiff --with-png \ - --with-x --with-xft - - make -k bootstrap - make install - - ;; - - ################################################################ - - install) - - if [[ -a /usr/share/emacs-snapshot ]]; then - echo "You have to remove /usr/share/emacs-snapshot." >&2 - exit 1 - fi - - # We do not know the version you downloaded. This ugly - # command will figure it out for you - - SHARE=$(find ${DIR}/share/emacs/ -maxdepth 1 -mindepth 1 -type d \ - | \grep "/[0-9\.]*$") - - if [[ ! -d "${SHARE}" ]]; then - echo "Can not find ${SHARE}, that's weird." >&2 - exit 1 - fi - - ln -s ${SHARE}/ /usr/share/emacs-snapshot - - for p in emacs ctags etags emacsclient ebrowse; do - # Install the binary as a link in /usr/bin - ln -s ${DIR}/bin/$p /usr/bin/$p-snapshot - # Tell the Debian system that the binary can be used - # as an alternative version - update-alternatives \ - --install /usr/bin/$p $p /usr/bin/$p-snapshot 23 - # Tell the Debian system that that new version should - # be used as default - update-alternatives \ - --set $p /usr/bin/$p-snapshot - done - - mkdir -p /etc/emacs-snapshot/site-start.d - - # Compile and install for that version of emacs all the - # emacs packages installed as Debian packages (vm, bbdb, - # etc.) - /usr/lib/emacsen-common/emacs-install emacs-snapshot - - ;; - - ################################################################ - - deinstall) - - # Remove that version of emacs from the list of versions - # for which Debian emacs-related packages should be - # compiled - /usr/lib/emacsen-common/emacs-remove emacs-snapshot - - rm -rf /etc/emacs-snapshot - - # Remove the alternatives - for p in emacs ctags etags emacsclient ebrowse; do - update-alternatives --remove $p /usr/bin/$p-snapshot - rm /usr/bin/$p-snapshot - done - - rm /usr/share/emacs-snapshot - ;; - - ################################################################ - - remove) - - rm -rf ${DIR} - - ;; - - ################################################################ - - *) - - echo "$0 " >&2 - exit 1 - - ;; - - esac - - shift 1 - -done