summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbc131b5843aa535cbe9329df40ed4500a316779 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Vain <aurmaint1 on host: uninformativ dot de>
pkgname=gitodo-git
pkgver=20120619
pkgrel=1
pkgdesc="Manage your TODO items using Git as a backend"
arch=('any')
url='http://www.uninformativ.de/projects/?q=gitodo'
license=('custom:PIZZA-WARE')
makedepends=('git')
depends=('git')
optdepends=(
  'ncurses: Colored output'
  'cron: Reminder functionality'
  'python: Overview of your TODO items in `highcal`'
  'vim: A reasonable editor, syntax files are provided'
)

_gitroot='git://github.com/vain/gitodo.git'
_gitname='master'

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [[ -d "$_gitname" ]]; then
    cd "$_gitname" && git pull origin
    msg "The local files are updated."
  else
    git clone "$_gitroot" "$_gitname"
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"
}

package() {
  cd "$srcdir/$_gitname-build"

  install -Dm755 gitodo "$pkgdir"/usr/bin/gitodo
  install -Dm755 highcal "$pkgdir"/usr/bin/highcal

  install -Dm644 man1/gitodo.1 "$pkgdir"/usr/share/man/man1/gitodo.1
  install -Dm644 man1/highcal.1 "$pkgdir"/usr/share/man/man1/highcal.1
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  install -Dm644 vim/ftdetect/gitodo.vim \
    "$pkgdir"/usr/share/vim/vimfiles/ftdetect/gitodo.vim
  install -Dm644 vim/syntax/gitodo.vim \
    "$pkgdir"/usr/share/vim/vimfiles/syntax/gitodo.vim
}

# vim:set ts=2 sw=2 et: