[SCM] Packaging for Google Go branch, debian-sid, updated. debian/2011.02.01.1-1-8-g38ffa67

Ondřej Surý ondrej at sury.org
Fri Feb 18 10:46:25 UTC 2011


The following commit has been merged in the debian-sid branch:
commit ac2d3c9eb73a2d23848c55c3171d8ff6dd0feed9
Author: Ondřej Surý <ondrej at sury.org>
Date:   Wed Feb 16 11:50:13 2011 +0100

    Build golang-mode package (Courtesy of Florian Weimer)

diff --git a/debian/control b/debian/control
index f17e074..f6255bc 100644
--- a/debian/control
+++ b/debian/control
@@ -71,3 +71,11 @@ Description: Tools for Google's Go programming language
  garbage collection and the power of run-time reflection.  It's a
  fast, statically typed, compiled language that feels like a
  dynamically typed, interpreted language.
+
+Package: golang-mode
+Architecture: all
+Depends: emacs23 | emacsen
+Suggests: golang-go
+Description: Go mode for GNU Emacs
+ Provides a major mode for GNU Emacs to edit programs written in Google's
+ Go programming language.
diff --git a/debian/golang-mode.emacsen-install b/debian/golang-mode.emacsen-install
new file mode 100644
index 0000000..5521e51
--- /dev/null
+++ b/debian/golang-mode.emacsen-install
@@ -0,0 +1,34 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/install/golang-mode
+
+FLAVOR=$1
+PACKAGE=golang-mode
+
+# Do nothing if generic flavor.
+if [ ${FLAVOR} = emacs ]; then
+       exit 0;
+fi
+
+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/debian/golang-mode.emacsen-remove b/debian/golang-mode.emacsen-remove
new file mode 100644
index 0000000..a56922e
--- /dev/null
+++ b/debian/golang-mode.emacsen-remove
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/golang-mode
+FLAVOR=$1
+PACKAGE=golang-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/golang-mode.emacsen-startup b/debian/golang-mode.emacsen-startup
new file mode 100644
index 0000000..378f11f
--- /dev/null
+++ b/debian/golang-mode.emacsen-startup
@@ -0,0 +1,7 @@
+;; -*-emacs-lisp-*-
+
+(let ((path "/usr/share/emacs/site-lisp/golang-mode"))
+  (when (file-exists-p path)
+    (add-to-list 'load-path path t)
+    (require 'go-mode-load)))
+
diff --git a/debian/golang-mode.install b/debian/golang-mode.install
new file mode 100644
index 0000000..1453aa7
--- /dev/null
+++ b/debian/golang-mode.install
@@ -0,0 +1 @@
+misc/emacs/*.el usr/share/emacs/site-lisp/golang-mode/

-- 
Packaging for Google Go



More information about the Pkg-google-commits mailing list