summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 958394ed1b0c3d05b6e51c7eaf8fe0a7a186164b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: yuki-san <yuki.from.akita@gmail.com>

pkgname=auto-complete-nxml-git
pkgver=0.r28.ac7b09a
pkgrel=3
pkgdesc="An extension of Emacs provides completion on nXML-mode by auto-complete.el"
arch=('any')
url="https://github.com/aki2o/auto-complete-nxml"
license=('GPL')
depends=('emacs' 'emacs-auto-complete' 'emacs-popup-el')
makedepends=('git' 'emacs')
install=auto-complete-nxml-git.install
source=('auto-complete-nxml::git+https://github.com/aki2o/auto-complete-nxml.git')
md5sums=('SKIP')

_gitname='auto-complete-nxml'
_elfile='auto-complete-nxml'

pkgver() {
  cd "$_gitname"
  printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd $_gitname
  emacs -q -batch -f batch-byte-compile "$_elfile".el
}

package() {
  cd $_gitname
  install -d -m 755 "$pkgdir"/usr/share/emacs/site-lisp
  install -c -m 644 "$_elfile".el "$pkgdir"/usr/share/emacs/site-lisp
  install -c -m 644 "$_elfile".elc "$pkgdir"/usr/share/emacs/site-lisp

  install -d -m 755 "$pkgdir"/usr/share/doc/${pkgname}
  install -d -m 755 image "$pkgdir"/usr/share/doc/${pkgname}/image
  install -c -m 644 image/* "$pkgdir"/usr/share/doc/${pkgname}/image
  install -c -m 644 README.md "$pkgdir"/usr/share/doc/${pkgname}
}

# vim:set ts=2 sw=2 et: