Package: ats2-lang
Severity: wishlist
Dear Maintainer,
Upsteam version 0.1.9 includes ats2-mode emacs lisp files.
Could you support the ats2-mode on Debian system?
A patch to support it is attached with this mail.
Best regards,
--
Kiwamu Okabe
diff --git a/ats2-mode.emacsen-compat b/ats2-mode.emacsen-compat
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/ats2-mode.emacsen-compat
@@ -0,0 +1 @@
+0
diff --git a/ats2-mode.emacsen-install b/ats2-mode.emacsen-install
new file mode 100644
index 0000000..a8b3905
--- /dev/null
+++ b/ats2-mode.emacsen-install
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/install/ats2-mode
+
+FLAVOR=$1
+PACKAGE=ats2-mode
+
+# A number of old emacs versions are not supported by upstream:
+case $FLAVOR in
+ emacs|emacs19|emacs20|emacs21|xemacs21)
+ exit 0
+ ;;
+esac
+
+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-list 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/ats2-mode.emacsen-remove b/ats2-mode.emacsen-remove
new file mode 100644
index 0000000..a7e7fba
--- /dev/null
+++ b/ats2-mode.emacsen-remove
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/ats2-mode
+FLAVOR=$1
+PACKAGE=ats2-mode
+
+# A number of old emacs versions are not supported by upstream:
+case $FLAVOR in
+ emacs|emacs19|emacs20|emacs21|xemacs21)
+ exit 0
+ ;;
+esac
+
+echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+exit 0
diff --git a/ats2-mode.emacsen-startup b/ats2-mode.emacsen-startup
new file mode 100644
index 0000000..1d8a840
--- /dev/null
+++ b/ats2-mode.emacsen-startup
@@ -0,0 +1,12 @@
+;; -*-emacs-lisp-*-
+(if (not (file-exists-p "/usr/share/emacs/site-lisp/ats2-mode"))
+ (message "Package ats2-mode needs reinstall. Skipping setup.")
+
+ (setq load-path (cons (concat "/usr/share/"
+ (symbol-name debian-emacs-flavor)
+ "/site-lisp/ats2-mode") load-path))
+ (add-to-list 'auto-mode-alist '("\\.\\(d\\|s\\)ats\\'" . ats-mode))
+ (autoload 'ats-mode "ats2-mode" "Major mode to edit ATS2 source code" t)
+ (require 'ats2-flymake)
+ (add-hook 'ats-mode-hook 'ats2-flymake-load)
+)
diff --git a/ats2-mode.install b/ats2-mode.install
new file mode 100644
index 0000000..5de5f04
--- /dev/null
+++ b/ats2-mode.install
@@ -0,0 +1 @@
+utils/emacs/*.el usr/share/emacs/site-lisp/ats2-mode/
diff --git a/changelog b/changelog
index ce4249f..c05150e 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,10 @@
+ats2-lang (0.1.9-1) UNRELEASED; urgency=medium
+
+ * New upstream release
+ * Create ats2-mode package
+
+ -- Kiwamu Okabe <[email protected]> Mon, 26 Jan 2015 18:32:04 +0900
+
ats2-lang (0.1.8-1) unstable; urgency=medium
* New upstream release
diff --git a/control b/control
index da7d05c..a4300b8 100644
--- a/control
+++ b/control
@@ -9,7 +9,7 @@ Homepage: http://www.ats-lang.org/
Package: ats2-lang
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: ATS version 2 programming language compiler
+Description: ATS version 2 programming language - compiler
ATS2 a.k.a. ATS/Postiats is a programming language with a highly expressive
type system rooted in the framework Applied Type System. In particular, both
dependent types and linear types are available in ATS. The current
@@ -25,3 +25,11 @@ Description: ATS version 2 programming language compiler
deduction systems and their (meta-)properties.
.
This package contains the compiler patsopt and the frontend patscc.
+
+Package: ats2-mode
+Architecture: all
+Depends: ${misc:Depends}, emacs | emacsen, emacsen-common (>= 2.0.8)
+Suggests: ats2-lang
+Description: ATS version 2 programming language - mode for GNU Emacs
+ This package provides a GNU Emacs major mode for editing code in
+ ATS2 a.k.a. ATS/Postiats is a programming language.