summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Whitt2017-05-19 11:09:26 -0400
committerAlex Whitt2017-05-19 11:09:26 -0400
commit1fc6889fe4307cd91f5c7fba9aa794b0085da983 (patch)
treeb3a47ff1921b6135388db8e07eadfbac6cf4faa7
downloadaur-1fc6889fe4307cd91f5c7fba9aa794b0085da983.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD28
-rw-r--r--emacs-ansible.install31
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d8867e44ea11
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+# Generated by mksrcinfo v8
+# Fri May 19 15:09:00 UTC 2017
+pkgbase = emacs-ansible
+ pkgdesc = Ansible minor mode for Emacs
+ pkgver = 0.1.0
+ pkgrel = 1
+ url = https://github.com/k1LoW/emacs-ansible
+ install = emacs-ansible.install
+ arch = any
+ license = GPL3
+ depends = emacs
+ depends = emacs-s
+ depends = emacs-f
+ depends = emacs-yasnippet
+ source = emacs-ansible-0.1.0.tar.gz::https://github.com/k1LoW/emacs-ansible/archive/0.1.0.tar.gz
+ sha256sums = 0de0cf9d9506b3abf0c27e72eea47282e81abb3d8b7c2808f1ab401456d1aa8f
+
+pkgname = emacs-ansible
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f64a97231f01
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Alex Whitt <alex.joseph.whitt@gmail.com>
+
+_pkgsrcname=emacs-ansible
+_pkgmaintainer=k1LoW
+_pkgdestdirname=ansible
+_versionprefix=
+pkgver=0.1.0
+pkgrel=1
+pkgdesc="Ansible minor mode for Emacs"
+pkgname=emacs-${_pkgdestdirname}
+arch=(any)
+url="https://github.com/${_pkgmaintainer}/${_pkgsrcname}"
+license=('GPL3')
+depends=('emacs' 'emacs-s' 'emacs-f' 'emacs-yasnippet')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/${_pkgmaintainer}/${_pkgsrcname}/archive/${_versionprefix}${pkgver}.tar.gz")
+sha256sums=('0de0cf9d9506b3abf0c27e72eea47282e81abb3d8b7c2808f1ab401456d1aa8f')
+install=${pkgname}.install
+
+build() {
+ cd "${srcdir}/${_pkgsrcname}-${pkgver}"
+ emacs -q --no-splash -batch -L . -f batch-byte-compile *.el
+}
+
+package() {
+ cd "${srcdir}/${_pkgsrcname}-${pkgver}"
+ mkdir -p "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+ install -m644 *.el{c,} "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+}
diff --git a/emacs-ansible.install b/emacs-ansible.install
new file mode 100644
index 000000000000..ab1949a8e7f5
--- /dev/null
+++ b/emacs-ansible.install
@@ -0,0 +1,31 @@
+post_install () {
+
+cat << EOF
+
+==> Add this code to your .emacs file to use the mode:
+
+(require 'ansible)
+(add-hook 'yaml-mode-hook '(lambda () (ansible 1)))
+
+==> Set the path to your vault password file ("~/vault_pass" by default):
+
+(setq ansible::vault-password-file "path/to/pwd/file")
+
+==> Optionally, use the following to auto decrypt/encrypt vault files:
+
+(add-hook 'ansible-hook 'ansible::auto-decrypt-encrypt)
+
+==> Or do the above with use-package:
+
+(use-package ansible
+ :config
+ (add-hook 'yaml-mode-hook '(lambda () (ansible 1)))
+ (setq ansible::vault-password-file "path/to/pwd/file") ; If not in the default location
+(add-hook 'ansible-hook 'ansible::auto-decrypt-encrypt)) ; For auto de/encryption
+
+EOF
+}
+
+post_upgrade () {
+ post_install $1
+}