summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEsben Haabendal2018-06-07 13:53:27 +0200
committerEsben Haabendal2018-06-07 13:53:27 +0200
commitd752d0778fdac65917ca3248bc1d988cb81ff203 (patch)
tree43df1f9b997b324f945b1928690f79b1121d3803
downloadaur-d752d0778fdac65917ca3248bc1d988cb81ff203.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD32
-rw-r--r--emacs-with-editor.install24
3 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b567ddcb5006
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = emacs-with-editor
+ pkgdesc = Use the Emacsclient as the of child processes
+ pkgver = 2.7.3
+ pkgrel = 0
+ url = http://github.com/magit/with-editor
+ install = emacs-with-editor.install
+ arch = any
+ license = GPL3
+ depends = emacs>=24.4
+ provides = emacs-with-editor
+ conflicts = emacs-with-editor-git
+ source = git+https://github.com/magit/with-editor.git#tag=2.7.3
+ md5sums = SKIP
+
+pkgname = emacs-with-editor
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0509c7001f79
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Esben Haabendal <esben@haabendal.dk>
+
+pkgname=emacs-with-editor
+pkgver=2.7.3
+pkgrel=0
+pkgdesc="Use the Emacsclient as the $EDITOR of child processes"
+arch=('any')
+_github_org="magit"
+_github_repo="with-editor"
+url="http://github.com/${_github_org}/${_github_repo}"
+license=('GPL3')
+depends=('emacs>=24.4')
+provides=('emacs-with-editor')
+conflicts=('emacs-with-editor-git')
+install="${pkgname}.install"
+source=("git+https://github.com/${_github_org}/${_github_repo}.git#tag=v$pkgver")
+md5sums=('SKIP')
+
+build() {
+ cd "$srcdir/${_github_repo}"
+ unset EMACS
+ make EFLAGS="-L /usr/share/emacs/site-lisp -L ${srcdir}/${_gitrepo}/lisp" \
+ lisp info
+}
+
+package() {
+ cd "$srcdir/${_github_repo}"
+ mkdir -p ${pkgdir}/usr/share/emacs/site-lisp
+ install -m 644 with-editor.{el,elc} ${pkgdir}/usr/share/emacs/site-lisp
+ mkdir -p ${pkgdir}/usr/share/info
+ install -m 644 with-editor.info ${pkgdir}/usr/share/info/
+}
diff --git a/emacs-with-editor.install b/emacs-with-editor.install
new file mode 100644
index 000000000000..10c08d4ce5b4
--- /dev/null
+++ b/emacs-with-editor.install
@@ -0,0 +1,24 @@
+infodir=/usr/share/info
+filelist=(with-editor.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+op=$1
+shift
+$op $*