summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6279711ecb721578cf45a17830be614d59e0b5af (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
42
43
# Maintainer: LinRs <LinRs at users.noreply.github.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=emacs-yasnippet-git
epoch=1
pkgver=0.13.0.r38.ga66f15e
pkgrel=1
pkgdesc="Yet another template system for Emacs - git version"
arch=('any')
url="https://github.com/joaotavora/yasnippet"
license=('GPL')
depends=('emacs')
makedepends=('git' 'ruby-rake')
provides=('emacs-yasnippet')
conflicts=('emacs-yasnippet')
install=yasnippet.install
source=("git+${url}.git")
sha256sums=('SKIP')
_gitname=yasnippet

pkgver() {
    cd $_gitname
    ( set -o pipefail
      git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
      printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

build() {
    cd "${_gitname}"
    rake yasnippet.elc
    rake yasnippet-debug.elc
    rake yasnippet-tests.elc #emacs=24.3 tests_Werror=nil
}
check() {
    cd "${_gitname}"
    rake tests
}
package () {
    cd "${_gitname}"
    install -d "${pkgdir}/usr/share/emacs/site-lisp/${_gitname}"
    cp -r * "${pkgdir}/usr/share/emacs/site-lisp/${_gitname}"
}