summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1d26afcc58a66aad6a59ee2bc785889a7f95eaf4 (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
# Maintainer: Andrés Rodríguez - mixedCase <andres.rodriguez __at__ lithersoft.com>

pkgname=python2-buildozer-git
pkgver=20160211
pkgrel=1
pkgdesc="Generic Python packager for Android / iOS and Desktop"
url="https://github.com/kivy/buildozer"
arch=('any')
license=('MIT')
install=''
source=()
depends=('python2' 'python2-pexpect' 'python2-markupsafe' 'python-virtualenv' 'python2-virtualenv' 'python-sh' 'python-appdirs')
optdepends=('android-sdk-build-tools: For building Android projects')
conflicts=()
provides=()
makedepends=('cmake' 'libusb>=1.0')

_gitname="buildozer"
_gitroot="https://github.com/kivy/${_gitname}.git"
 
 
build() {
  cd $srcdir
  msg "Connecting to GIT (${_gitroot}) ..."
 
  if [ -d $_gitname ]; then
    cd $_gitname && git pull origin
    msg "The local files of ${_gitname} were updated."
  else
    git clone $_gitroot $_gitname
  fi  
 
  msg "GIT checkout done or server timeout"
 
  cd $srcdir/${_gitname}/
  msg 'Fixing Cython version...'
  find . -type f -print0 | xargs -0 sed -i 's#Cython#Cython2#g'
  find . -type f -print0 | xargs -0 sed -i 's#cython#cython2#g'

  msg 'Fixing Python version...'
  find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/python#/usr/bin/python2#g'
  find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/env python#/usr/bin/env python2#g'
  python2 setup.py build
}
 
package() {
    cd $srcdir/${_gitname}
    python2 setup.py install -f --root="$pkgdir"
}