summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8d44fb58fad0d0da5cd322cfdccba463adf50385 (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
# Maintainer: Lubosz Sarnecki <lubosz at gmail com>

pkgname=django-haystack-git
pkgver=20120918
pkgrel=1
pkgdesc="Modular search for Django."
arch=(any)
url="http://haystacksearch.org/"
license=('MIT')
depends=('python' 'django')
optdepends=('python2-pysolr-git: solr backend')
makedepends=('git')
source=()
md5sums=()

_gitroot="git://github.com/toastdriven/django-haystack.git"
_gitname="django-haystack"

build() {
  msg "Connecting to github...."
  if [[ -d ${srcdir}/${_gitname} ]] ; then
    cd ${_gitname}
    git pull origin
    msg "The local files are updated..."
  else
    git clone ${_gitroot}
  fi

  msg "git clone done."
  
  if [[ -d ${srcdir}/${_gitname}-build ]]; then
    msg "Cleaning the previous build directory..." 
    rm -rf ${srcdir}/${_gitname}-build
  fi

  git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build

  cd ${srcdir}/${_gitname}-build
  
	python2 setup.py build || return 1
}

package() {
	cd ${srcdir}/${_gitname}-build
	python2 setup.py install --root=$pkgdir --optimize=1 || return 1
}