wok view python-pygame/receipt @ rev 25503

f3: include extra programs
author Hans-G?nter Theisgen
date Fri Jan 27 10:37:43 2023 +0100 (15 months ago)
parents 870e1ce31226
children
line source
1 # SliTaz package receipt.
3 PACKAGE="python-pygame"
4 SOURCE="pygame"
5 VERSION="1.9.1release"
6 CATEGORY="development"
7 SHORT_DESC="Python game library."
8 MAINTAINER="claudinei@slitaz.org"
9 LICENSE="LGPL"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="https://pypi.org/project/pygame/"
12 WGET_URL="https://github.com/pygame/pygame/archive/refs/tags/release_${VERSION//./_}.tar.gz"
14 DEPENDS="python libsdl libsdl-image libsdl-mixer libsdl-ttf python-numpy \
15 libsmpeg gcc-lib-base"
16 BUILD_DEPENDS="python-dev libsmpeg-dev libsdl-dev libsdl-image-dev \
17 libsdl-mixer-dev libsdl-ttf-dev libv4l-dev"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - https://github.com/pygame/pygame/releases 2>/dev/null | \
23 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 patch -Np0 -i $stuff/config.patch
30 sed -i "s|linux/videodev.h|libv4l1-videodev.h|" src/camera.h
31 python config.py -auto &&
32 python setup.py install --root=$DESTDIR
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
39 mkdir -p $fs/usr
40 cp -a $install/usr/lib $fs/usr
41 chmod 644 $fs/usr/lib/$PYTHON_LIB/site-packages/pygame/freesansbold.ttf
42 # examples and tests in python-pygame-dev
43 rm -rf $fs/usr/lib/$PYTHON_LIB/site-packages/pygame/examples
44 rm -rf $fs/usr/lib/$PYTHON_LIB/site-packages/pygame/tests
45 }
47 # Remove old package.
48 post_install()
49 {
50 [ ! -d "$1/var/lib/tazpkg/installed/pygame/examples" ] ||
51 rm -rf "$1/var/lib/tazpkg/installed/pygame/examples"
52 }