wok-next view python-pygame/receipt @ rev 20674
Up putty (0.70)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat May 12 05:17:48 2018 +0300 (2018-05-12) |
parents | 10df65db91ad |
children | 92698cd69f34 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="python-pygame"
4 VERSION="1.9.1release"
5 CATEGORY="development"
6 SHORT_DESC="Python game library"
7 MAINTAINER="claudinei@slitaz.org"
8 LICENSE="LGPL"
9 WEB_SITE="http://www.pygame.org/"
11 TARBALL="pygame-$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE/ftp/$TARBALL"
14 BUILD_DEPENDS="python-dev libsmpeg-dev libsdl-dev libsdl-image-dev \
15 libsdl-mixer-dev libsdl-ttf-dev v4l-utils-dev"
16 SPLIT="python-pygame-dev"
18 compile_rules() {
19 sed -i "s|linux/videodev.h|libv4l1-videodev.h|" src/camera.h
20 python config.py -auto &&
21 python setup.py install --root=$DESTDIR
22 }
24 genpkg_rules() {
25 case $PACKAGE in
26 python-pygame)
27 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
28 mkdir -p $fs/usr
29 cp -a $install/usr/lib $fs/usr
30 chmod 644 $fs/usr/lib/$PYTHON_LIB/site-packages/pygame/freesansbold.ttf
31 # examples and tests in python-pygame-dev
32 rm -rf $fs/usr/lib/$PYTHON_LIB/site-packages/pygame/examples
33 rm -rf $fs/usr/lib/$PYTHON_LIB/site-packages/pygame/tests
34 DEPENDS="python libsdl libsdl-image libsdl-mixer libsdl-ttf \
35 python-numpy libsmpeg gcc-lib-base"
36 ;;
37 *-dev)
38 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
39 mkdir -p $fs/usr/lib/$PYTHON_LIB/site-packages/pygame
40 cp -a $install/usr/include $fs/usr
41 cp -a $install/usr/lib/$PYTHON_LIB/site-packages/pygame/examples \
42 $fs/usr/lib/$PYTHON_LIB/site-packages/pygame
43 cp -a $install/usr/lib/$PYTHON_LIB/site-packages/pygame/tests \
44 $fs/usr/lib/$PYTHON_LIB/site-packages/pygame
45 ;;
46 esac
47 }
49 # Remove old package.
50 post_install_python_pygame() {
51 [ ! -d "$1/var/lib/tazpkg/installed/pygame/examples" ] ||
52 rm -rf "$1/var/lib/tazpkg/installed/pygame/examples"
53 }