summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 53eb4b99819244fc1cad130233a57ef8f0a1a0c6 (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
# Maintainer: sballert <sballert@posteo.de>

pkgname=emacs-expand-region-git
pkgver=r486.ed32924
pkgrel=1
pkgdesc="Emacs extension to increase selected region by semantic units."
url="https://github.com/magnars/expand-region.el"
arch=('any')
license=('GPL3')
depends=('emacs')
makedepends=('git')
provides=('emacs-expand-region')
conflicts=('emacs-expand-region')
source=("git+https://github.com/magnars/expand-region.el.git")
sha256sums=('SKIP')
_gitname="expand-region.el"

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

build() {
  cd "$_gitname"
  emacs -Q -batch -L . -f batch-byte-compile *.el
}

package() {
  cd "$_gitname"
  install -d "${pkgdir}/usr/share/emacs/site-lisp/expand-region"
  install -m644 *.el{c,} "${pkgdir}/usr/share/emacs/site-lisp/expand-region/"
}