summaryrefslogtreecommitdiff
path: root/~xihh/notmuch-address/PKGBUILD
blob: 908f40b229241aee68044a5e177cc9d24ebbee9a (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
57
58
# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
# Maintainer: Joshua Ismael Haase Hernandez <joshpar@stravy>
pkgname=notmuch-address
pkgver=20120201
pkgrel=1
epoch=
pkgdesc="Address completion for notmuch"
arch=('any')
url=""
license=('GPL')
groups=()
depends=(python2)
makedepends=(git)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=()
md5sums=()
noextract=()
#generate with 'makepkg -g'
_gitroot=http://commonmeasure.org/~jkr/git/notmuch_addresses.git
_gitname=notmuch-adress

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"

  #
  # BUILD HERE
  #
}

package() {
  cd "$srcdir/$_gitname-build"
  sed -i "s_#!/usr/bin/env python_#!/usr/bin/env python2_" notmuch_addresses.py
  install -d $pkgdir/usr/bin
  install -m755 notmuch_addresses.py $pkgdir/usr/bin/notmuch_addresses.py
}