diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2015-03-10 22:37:13 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2015-03-10 22:37:13 -0400 |
commit | 1b9995725af7f9deae1acc09db1d7801aab78e14 (patch) | |
tree | cf68c0f8f40f210994f8c93a1e046f32173ab2f5 /debian | |
parent | b29f23f2d2f2dd587eccb9c84a77501dc9746adb (diff) |
Package urweb-mode
Diffstat (limited to 'debian')
-rw-r--r-- | debian/control | 18 | ||||
-rw-r--r-- | debian/urweb-mode.emacsen-install | 30 | ||||
-rw-r--r-- | debian/urweb-mode.emacsen-remove | 9 | ||||
-rw-r--r-- | debian/urweb-mode.emacsen-startup | 21 | ||||
-rw-r--r-- | debian/urweb-mode.install | 1 |
5 files changed, 78 insertions, 1 deletions
diff --git a/debian/control b/debian/control index dbf82349..3589b89d 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ Build-Depends: libssl-dev, mlton Build-Depends-Indep: + emacs24 | emacsen, texlive-fonts-recommended, texlive-latex-extra Standards-Version: 3.9.6 @@ -29,7 +30,8 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: - urweb-doc + urweb-doc, + urweb-mode Description: purely functional language for web programming Ur is a pure, functional, statically typed, strict programming language in the tradition of ML and Haskell; however, it features a significantly richer type @@ -133,3 +135,17 @@ Description: Ur/Web reference manual applications backed by SQL databases. . This package provides the Ur/Web reference manual in PDF format. + +Package: urweb-mode +Section: editors +Architecture: all +Multi-Arch: foreign +Depends: emacsen-common, ${misc:Depends} +Description: Emacs mode for editing Ur/Web programs + Ur is a pure, functional, statically typed, strict programming language in the + tradition of ML and Haskell; however, it features a significantly richer type + system. Ur/Web is Ur plus a special standard library and associated rules for + parsing and optimization. Ur/Web supports constructing dynamic web + applications backed by SQL databases. + . + This package provides an Emacs mode for editing Ur/Web source files. diff --git a/debian/urweb-mode.emacsen-install b/debian/urweb-mode.emacsen-install new file mode 100644 index 00000000..9f47ce49 --- /dev/null +++ b/debian/urweb-mode.emacsen-install @@ -0,0 +1,30 @@ +#!/bin/sh -e +#/usr/lib/emacsen-common/packages/install/urweb-mode + +FLAVOR=$1 +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +PACKAGE=urweb-mode +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +# The byte-compiled files goes into the site-lisp directory. +BCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} +install -m 755 -d ${BCDIR} + +# The elisp source files are in the generic site-lisp directory. +SRCDIR=/usr/share/emacs/site-lisp/${PACKAGE} +SRC=`find ${SRCDIR} -name '*.el' -exec basename '{}' ';'` + +# Prepare for byte-compiling the source files. +cd ${BCDIR} +ln -sf ${SRCDIR}/*.el . +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF + +# Byte-compile elisp files. +FLAGS="--no-site-file --no-init-file --batch -l path.el -f batch-byte-compile" +${FLAVOR} ${FLAGS} ${SRC} +rm -f path.el + +exit 0 diff --git a/debian/urweb-mode.emacsen-remove b/debian/urweb-mode.emacsen-remove new file mode 100644 index 00000000..b45668c7 --- /dev/null +++ b/debian/urweb-mode.emacsen-remove @@ -0,0 +1,9 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/urweb-mode +FLAVOR=$1 +PACKAGE=urweb-mode +if [ ${FLAVOR} != emacs ]; then + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi +exit 0 diff --git a/debian/urweb-mode.emacsen-startup b/debian/urweb-mode.emacsen-startup new file mode 100644 index 00000000..4341955a --- /dev/null +++ b/debian/urweb-mode.emacsen-startup @@ -0,0 +1,21 @@ +;; -*-emacs-lisp-*- + +(if (not (file-exists-p "/usr/share/emacs/site-lisp/urweb-mode")) + (message "Package urweb-mode removed but not purged. Skipping setup.") + + (let ((pkgdir (concat "/usr/share/" + (symbol-name debian-emacs-flavor) + "/site-lisp/urweb-mode"))) + + ;; Only load urweb-mode if it has been installed. + (if (zerop (length (file-expand-wildcards pkgdir))) + (message "urweb-mode not for this flavor. Skipping.") + + ;; The urweb-mode package follows the Debian/GNU Linux 'emacsen' policy + ;; and byte-compiles its elisp files for each 'emacs flavor'. The + ;; compiled code is then installed in a subdirectory of the respective + ;; site-lisp directory. + (debian-pkg-add-load-path-item pkgdir) + + ;; Autoload urweb-mode top-level functions site-wide. + (load "urweb-mode-startup")))) diff --git a/debian/urweb-mode.install b/debian/urweb-mode.install new file mode 100644 index 00000000..ab5866c8 --- /dev/null +++ b/debian/urweb-mode.install @@ -0,0 +1 @@ +usr/share/emacs/site-lisp/urweb-mode
\ No newline at end of file |