summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD38
-rw-r--r--vimdoc.install19
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c54f45c8593
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = vim-toml-git
+ pkgdesc = Vim syntax for TOML
+ pkgver = 20150403
+ pkgrel = 1
+ url = https://github.com/cespare/vim-toml
+ install = vimdoc.install
+ arch = any
+ groups = vim-plugins
+ license = MIT
+ makedepends = git
+ depends = vim
+ provides = vim-toml
+ conflicts = vim-toml
+ source = vim-toml::git+https://github.com/cespare/vim-toml
+ sha256sums = SKIP
+
+pkgname = vim-toml-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..604f8b17671
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Jeremy Ruten <jeremy.ruten@gmail.com>
+# Contributor: Andy Weidenbaum <archbaum@gmail.com>
+pkgname=vim-toml-git
+pkgver=20150403
+pkgrel=1
+pkgdesc="Vim syntax for TOML"
+arch=('any')
+depends=('vim')
+makedepends=('git')
+groups=('vim-plugins')
+url="https://github.com/cespare/vim-toml"
+license=('MIT')
+source=(${pkgname%-git}::git+https://github.com/cespare/vim-toml)
+sha256sums=('SKIP')
+provides=('vim-toml')
+conflicts=('vim-toml')
+install=vimdoc.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/vim-toml/README.md"
+
+ msg 'Installing appdirs...'
+ install -dm 755 "$pkgdir/usr/share/vim/vimfiles"
+ for _appdir in ftdetect syntax; do
+ cp -dpr --no-preserve=ownership $_appdir "$pkgdir/usr/share/vim/vimfiles/$_appdir"
+ done
+
+ msg 'Cleaning up pkgdir...'
+ find "$pkgdir" -type d -name .git -exec rm -r '{}' +
+}
diff --git a/vimdoc.install b/vimdoc.install
new file mode 100644
index 00000000000..220693cc8af
--- /dev/null
+++ b/vimdoc.install
@@ -0,0 +1,19 @@
+post_install() {
+ echo -n "Updating vim help tags..."
+ /usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install
+}
+
+op=$1
+shift
+
+$op $*