updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / emacs-calfw-git / PKGBUILD
blob5fb0a0736d95ab2a8ae6868bc617555b047635df
1 # Maintainer: XeCycle <xecycle@gmail.com>
3 pkgname=emacs-calfw-git
4 pkgver=20111209
5 pkgrel=1
6 pkgdesc="A calendar framework for Emacs"
7 url="https://github.com/kiwanami/emacs-calfw"
8 arch=('any')
9 license=('GPL')
10 depends=('emacs')
11 makedepends=('perl-text-markdown') # remove if don't want html doc
12 install=emacs-calfw-git.install
13 source=()
14 md5sums=()
16 _gitroot=git://github.com/kiwanami/emacs-calfw.git
17 _gitname=emacs-calfw
19 build() {
20   cd $srcdir
21   msg "Connecting to GIT server...."
23   if [[ -d "$_gitname" ]]; then
24     cd "$_gitname" && git pull origin
25     msg "The local files are updated."
26   else
27     git clone "$_gitroot" "$_gitname"
28   fi
30   msg "GIT checkout done or server timeout"
31   msg "Starting build..."
33   rm -rf "$srcdir/$_gitname-build"
34   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
35   cd "$srcdir/$_gitname-build"
37   for file in calfw{,-cal,-ical,-org}.el; do
38     emacs -Q --batch -l calfw.el -f batch-byte-compile $file
39   done
41   # html doc
42   Markdown.pl readme.md > readme.html
45 package() {
46   cd $srcdir/$_gitname-build
47   el_dir=/usr/share/emacs/site-lisp/emacs-calfw
48   doc_dir=/usr/share/doc/emacs-calfw
49   install -m 755 -d $pkgdir{$el,$doc}_dir
50   install -m 644 -t $pkgdir$el_dir *.el{,c}
51   install -m 644 -t $pkgdir$doc_dir readme.*