updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sorl-thumbnail-git / PKGBUILD
blob6958a8d68975c2c8e7f441beef4992e4096bbca4
1 #Contributor: Melvin Laplanche <melvin.laplanche at gmail dot com>
2 pkgname=sorl-thumbnail-git
3 pkgver=20110813
4 pkgrel=1
5 pkgdesc='Thumbnailer library, mainly for Django.'
6 arch=('any')
7 url='https://github.com/sorl/sorl-thumbnail'
8 license=('custom')
9 depends=('python' 'django')
10 makedepends=('git')
11 optdepends=('imagemagick' 'wv2')
12 provides=('sorl-thumbnail')
13 md5sums=()
15 _gitroot="https://github.com/sorl/sorl-thumbnail.git"
16 _gitname="sorl-thumbnail"
18 build() {
19   cd "$srcdir"
20   msg "Connecting to GIT server...."
22   if [ -d $_gitname ] ; then
23     cd $_gitname && git pull origin
24     msg "The local files are updated."
25   else
26     git clone $_gitroot $_gitname
27   fi
29   msg "GIT checkout done or server timeout"
30   msg "Starting make..."
32   rm -rf "$srcdir/$_gitname-build"
33   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
34   cd "$srcdir/$_gitname-build"
36   python2 setup.py build
39 package() {
40   cd "$srcdir/$_gitname-build"
42   python2 setup.py install --prefix=/usr --root="$pkgdir"
43   install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_gitname}/COPYING"