summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c438a299d480aef15ea18727bdf95a0f4b671fd9 (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
# Maintainer: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Daichi Shinozaki <dsdseg@gmail.com>
pkgname=emacs-moonscript-mode
pkgver=r39.56f9047
_commit=56f90471e2ced2b0a177aed4d8c2f854797e9cc7
pkgrel=1
pkgdesc="Emacs major mode for the MoonScript programming language"
arch=('any')
url="https://github.com/k2052/moonscript-mode"
license=('MIT')
depends=('emacs')
makedepends=('git')
install=$pkgname.install
source=("git+https://github.com/k2052/moonscript-mode.git#commit=${_commit}")
md5sums=('SKIP')
_pkgname=${pkgname#emacs-}

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

build() {
  cd $srcdir/$_pkgname
  emacs --batch --eval '(progn
			(push "." load-path)
			(byte-compile-file "moonscript.el")
			(byte-compile-file "moonscript-repl.el"))'
}

package() {
  mkdir -p $pkgdir/usr/share/emacs/site-lisp
  cd $srcdir/$_pkgname
  install -m644 *.el* $pkgdir/usr/share/emacs/site-lisp
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}