aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs-d-mode/PKGBUILD23
-rw-r--r--emacs-d-mode/emacs-d-mode.install16
-rwxr-xr-xemacs-d-mode/watch21
3 files changed, 60 insertions, 0 deletions
diff --git a/emacs-d-mode/PKGBUILD b/emacs-d-mode/PKGBUILD
new file mode 100644
index 0000000..89cb486
--- /dev/null
+++ b/emacs-d-mode/PKGBUILD
@@ -0,0 +1,23 @@
+# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>
+# Contributor: Gianni Vialetto <gianni@rootcube.net>
+# Contributor: Gour <gour@atmarama.net>
+
+pkgname=emacs-d-mode
+pkgver=2.0.5
+pkgrel=1
+pkgdesc="Emacs major mode for the D programming language"
+url="http://www.wikiservice.at/d/wiki.cgi?EditorSupport/EmacsEditor"
+arch=('any')
+license=('GPL2')
+depends=()
+install=$pkgname.install
+source=(https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/tarball/2.0.5)
+md5sums=('7efcc516991ea27322b17055600288d7')
+
+package() {
+ cd "$srcdir/"
+
+ install -m755 -d "$pkgdir/usr/share/emacs/site-lisp"
+ install -m644 Emacs-D-Mode-Maintainers-Emacs-D-Mode-9482533/d-mode.el "$pkgdir/usr/share/emacs/site-lisp"
+}
+
diff --git a/emacs-d-mode/emacs-d-mode.install b/emacs-d-mode/emacs-d-mode.install
new file mode 100644
index 0000000..a7f8c2f
--- /dev/null
+++ b/emacs-d-mode/emacs-d-mode.install
@@ -0,0 +1,16 @@
+post_install() {
+ cat << EOF
+==> To set up Emacs to automatically edit files ending in .d[i] using D-mode
+==> add the following to your ~/.emacs file (GNU Emacs) or ~/.xemacs/init.el
+==> file (XEmacs):
+
+ (autoload 'd-mode "d-mode" "Major mode for editing D code." t)
+ (add-to-list 'auto-mode-alist '("\\\.d[i]?\\\'" . d-mode))
+
+EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
diff --git a/emacs-d-mode/watch b/emacs-d-mode/watch
new file mode 100755
index 0000000..610a94f
--- /dev/null
+++ b/emacs-d-mode/watch
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+[ -f release ] && rm release
+
+wget https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/tags -O - 2>/dev/null | grep tag-name | grep -Po '>.+</' > release
+
+if [ $? = 0 ]; then
+ [ -f unfetchable ] && rm unfetchable
+ md5sum release > new-sum
+ touch sum
+ if [ "$(cat sum)" = "$(cat new-sum)" ]; then
+ rm new-sum
+ else
+ mv new-sum sum
+ echo 'emacs-d-mode'
+ fi
+elif [ ! -f unfetchable ]; then
+ touch unfetchable
+ echo 'emacs-d-mode (unfetchable)'
+fi
+