summaryrefslogtreecommitdiff
path: root/pcr/vim-ifdef
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/vim-ifdef')
-rw-r--r--pcr/vim-ifdef/PKGBUILD23
-rw-r--r--pcr/vim-ifdef/vimdoc.install14
2 files changed, 37 insertions, 0 deletions
diff --git a/pcr/vim-ifdef/PKGBUILD b/pcr/vim-ifdef/PKGBUILD
new file mode 100644
index 000000000..1fb983cb3
--- /dev/null
+++ b/pcr/vim-ifdef/PKGBUILD
@@ -0,0 +1,23 @@
+# Contributor: Manuel Mendez <mmendez534 at gmail dot com>
+# Author: Laszlo Papp <djszapi @ gmail at com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=vim-ifdef
+pkgver=3.2
+_scriptid=16097
+pkgrel=1
+pkgdesc="C Preprocessor Highlighting"
+arch=(any)
+url="http://www.vim.org/scripts/script.php?script_id=7"
+license=('custom')
+depends=(vim)
+install=vimdoc.install
+source=(ifdef.vim::http://www.vim.org/scripts/download_script.php?src_id=${_scriptid})
+
+build() {
+ cd "$srcdir"
+ install -Dm644 ifdef.vim "$pkgdir"/usr/share/vim/syntax/ifdef.vim
+ sed -n '/^" Copyright/,/^\s*$/ p' ifdef.vim |
+ sed -e 's|^" ||' -e '/^\s*$/ d' > extracted-license.txt
+ install -Dm644 extracted-license.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt
+}
diff --git a/pcr/vim-ifdef/vimdoc.install b/pcr/vim-ifdef/vimdoc.install
new file mode 100644
index 000000000..61c4b3a81
--- /dev/null
+++ b/pcr/vim-ifdef/vimdoc.install
@@ -0,0 +1,14 @@
+post_install() {
+ echo -n "Updating vim help tags..."
+ /usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags /usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install
+}