summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-06-09 11:41:58 -0700
committerAndy Weidenbaum2015-06-09 11:41:58 -0700
commit02eb78fa2fa1a1e2c871df4b27568b3f1cb0753c (patch)
tree984fb4e8ffb738313c400c81e4283ccfc8629aa3
downloadaur-02eb78fa2fa1a1e2c871df4b27568b3f1cb0753c.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD36
-rw-r--r--scmindent.install27
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b8c0b6fdec48
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = scmindent-git
+ pkgdesc = External filter program for properly indenting Racket, Scheme and Lisp
+ pkgver = 20140827
+ pkgrel = 1
+ url = https://github.com/ds26gte/scmindent
+ install = scmindent.install
+ arch = any
+ license = unknown
+ makedepends = git
+ depends = racket
+ provides = lispindent
+ provides = scmindent
+ conflicts = lispindent
+ conflicts = scmindent
+ source = git+https://github.com/ds26gte/scmindent
+ sha256sums = SKIP
+
+pkgname = scmindent-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..07a226e8a7d9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=scmindent-git
+pkgver=20140827
+pkgrel=1
+pkgdesc="External filter program for properly indenting Racket, Scheme and Lisp"
+arch=('any')
+depends=('racket')
+makedepends=('git')
+url="https://github.com/ds26gte/scmindent"
+license=('unknown')
+source=(git+https://github.com/ds26gte/scmindent)
+sha256sums=('SKIP')
+provides=('lispindent' 'scmindent')
+conflicts=('lispindent' 'scmindent')
+install=scmindent.install
+
+pkgver() {
+ cd ${pkgname%-git}
+ git log -1 --format="%cd" --date=short | sed "s|-||g"
+}
+
+package() {
+ cd ${pkgname%-git}
+
+ msg 'Installing documentation...'
+ install -Dm 644 README.md "$pkgdir/usr/share/doc/scmindent/README.md"
+ install -Dm 644 history "$pkgdir/usr/share/doc/scmindent/history"
+
+ msg 'Installing...'
+ install -Dm 755 lispindent.lisp "$pkgdir/usr/bin/lispindent"
+ install -Dm 755 scmindent.rkt "$pkgdir/usr/bin/scmindent"
+
+ msg 'Cleaning up pkgdir...'
+ find "$pkgdir" -type d -name .git -exec rm -r '{}' +
+}
diff --git a/scmindent.install b/scmindent.install
new file mode 100644
index 000000000000..585fbc6cffd2
--- /dev/null
+++ b/scmindent.install
@@ -0,0 +1,27 @@
+post_install() {
+ printf "%b\n" "$scmindent"
+}
+
+post_upgrade() {
+ post_install
+}
+
+read -d '' scmindent <<'EOF'
+In Vim, set the equalprg option to the filter name, which causes the
+indenting command = to invoke the filter rather than the built-in
+indenter.
+
+You might want to make the equalprg setting local to the files based on
+their extensions:
+
+ autocmd bufread,bufnewfile *.lisp,*.rkt,*.scm setlocal equalprg=scmindent
+
+or their filetypes:
+
+ autocmd filetype lisp,racket,scheme setlocal equalprg=scmindent
+
+In vi's other than Vim, use the ! command to invoke the filter on part
+or all of your buffer: Type ! to declare you'll be filtering; a movement
+command to scoop up the lines you'll be filtering; then the filter name
+(scmindent.rkt) followed by Return.
+EOF