summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59c544f413fb2ee1a8c1cd492b6af7d46524c437 (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
# Contributor: XeCycle <xecycle@gmail.com>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=emacs-calfw-git
pkgver=1.6.r35.g8ff7e75
pkgrel=1
pkgdesc="A calendar framework for Emacs"
url="https://github.com/kiwanami/emacs-calfw"
arch=('any')
license=('GPL')
depends=('emacs')
install=emacs-calfw-git.install
source=(git://github.com/tumashu/emacs-calfw.git)
md5sums=('SKIP')
_gitname=emacs-calfw

pkgver() {
  cd $_gitname
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | tr -d v
}

build() {
  cd $_gitname
  for file in calfw{,-cal,-ical,-org}.el; do
    emacs -Q --batch -l calfw.el -f batch-byte-compile $file
  done
}

package() {
  cd $_gitname
  el_dir=/usr/share/emacs/site-lisp/
  doc_dir=/usr/share/doc/emacs-calfw
  install -m 755 -d "$pkgdir"{$el,$doc}_dir
  install -m 644 -t "$pkgdir"$el_dir *.el{,c}
  install -m 644 -t "$pkgdir"$doc_dir readme.md
}