Skip to content

Instantly share code, notes, and snippets.

@alibitek
Last active October 31, 2017 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alibitek/ca1f589de260c7fd2e690fd41247497c to your computer and use it in GitHub Desktop.
Save alibitek/ca1f589de260c7fd2e690fd41247497c to your computer and use it in GitHub Desktop.
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Lev Lybin <lev.lybin@gmail.com>
# Contributor: lagrange <flkazemakase@gmail.com>
# Contributor: mid-kid <esteve.varela@gmail.com>
pkgbase=python-kivy
pkgname=('python-kivy' 'python2-kivy')
pkgver=master
pkgrel=1
pkgdesc="A software library for rapid development of hardware-accelerated multitouch applications."
arch=('i686' 'x86_64')
url="http://kivy.org/"
license=('MIT')
makedepends=('python-setuptools' 'python2-setuptools' 'cython' 'cython2' 'gstreamer' 'sdl2_ttf'
'sdl2_mixer' 'sdl2_image')
checkdepends=('python-nose' 'python2-nose' 'python2-mock' 'python-coverage' 'python2-coverage'
'python-gobject' 'python2-gobject' 'xorg-server-xvfb' 'opencv' 'python-pyenchant'
'python2-pyenchant' 'git' 'mtdev' 'xclip' 'xsel' 'gtk3' 'gst-plugins-base'
'gst-plugins-good' 'python-dbus' 'python2-dbus')
source=("https://github.com/kivy/kivy/archive/$pkgver.zip"
"3b85f3e1c292b3f6c3f226490f52a2ab78251730.patch")
prepare() {
# For better metadata
export KIVY_USE_SETUPTOOLS=1
export LC_CTYPE=en_US.UTF-8
cp -a kivy-$pkgver{,-py2}
}
build() {
cd "$srcdir"/kivy-$pkgver
patch -Np1 -i ../3b85f3e1c292b3f6c3f226490f52a2ab78251730.patch
python setup.py build build_ext --inplace
cd "$srcdir"/kivy-$pkgver-py2
patch -Np1 -i ../3b85f3e1c292b3f6c3f226490f52a2ab78251730.patch
python2 setup.py build build_ext --inplace
}
check() {
cd "$srcdir"/kivy-$pkgver
xvfb-run -s "-screen 0 1280x720x24 -ac +extension GLX" nosetests3 kivy/tests
cd "$srcdir"/kivy-$pkgver-py2
xvfb-run -s "-screen 0 1280x720x24 -ac +extension GLX" nosetests2 kivy/tests
}
package_python-kivy() {
depends=('python' 'gstreamer' 'sdl2_ttf' 'sdl2_mixer' 'sdl2_image')
cd kivy-$pkgver
python setup.py install --prefix=/usr --root="$pkgdir"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-kivy() {
depends=('python2' 'gstreamer' 'sdl2_ttf' 'sdl2_mixer' 'sdl2_image')
cd kivy-$pkgver-py2
python2 setup.py install --prefix=/usr --root="$pkgdir"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
mv "$pkgdir"/usr/share/kivy{,2}-examples
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment