mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
53 lines
1.9 KiB
Bash
53 lines
1.9 KiB
Bash
#
|
|
# Games Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: Adrian Chaves Fernandez (Gallaecio) <adriyetichaves@gmail.com>
|
|
|
|
pkgname=paintown
|
|
pkgver=3.6.0
|
|
pkgrel=4
|
|
pkgdesc="An open source fighting game in the same genre as Streets of Rage and Teenage Mutant Ninja Turtles."
|
|
arch=('x86_64')
|
|
url="http://paintown.sourceforge.net/"
|
|
license=('GPL')
|
|
depends=('python2' 'freetype2' 'sdl' 'libpng' 'mpg123' 'libogg' 'libvorbis' 'harfbuzz')
|
|
makedepends=('cmake')
|
|
source=("http://downloads.sourceforge.net/sourceforge/paintown/${pkgname}-${pkgver}.tar.bz2")
|
|
sha256sums=('81392d353e533dee9d5199be17798d796adff56d5c69814d4508c3e9c3a2034a')
|
|
|
|
prepare() {
|
|
cd ${pkgname}-${pkgver}
|
|
# fix python2 header
|
|
for file in $(find . -name '*.py' -print); do
|
|
sed -i "s#/usr/bin/python#/usr/bin/env python2#" $file
|
|
done
|
|
|
|
sed -i "s/find_package(FREETYPE)/find_package(Freetype)/g" CMakeLists.txt
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname}-${pkgver}
|
|
# not needed as cmake is used instead of scons
|
|
# sed -i "s#python#python2#" Makefile
|
|
mkdir -p build && cd build
|
|
cmake \
|
|
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
|
|
-DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
|
|
-DFREETYPE_INCLUDE_DIR=/usr/include/freetype2 \
|
|
..
|
|
make
|
|
cp bin/paintown ..
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}-${pkgver}
|
|
mkdir -p "${pkgdir}"/usr/{bin,share/{paintown,pixmaps,applications,licenses/paintown}}
|
|
sh install.sh -d "${pkgdir}"/usr/share/paintown -b "${pkgdir}"/usr/bin
|
|
# correct the gnerated file to remove the wrong path (because ${pkgdir}/usr/bin is written in the file)
|
|
sed -i "s#${pkgdir}##g" "${pkgdir}/usr/bin/paintown"
|
|
install -m644 misc/paintown.desktop "${pkgdir}/usr/share/applications/paintown.desktop"
|
|
install -m644 misc/logo-256x256.png "${pkgdir}/usr/share/pixmaps/paintown.png"
|
|
install -m644 LICENSE "${pkgdir}/usr/share/licenses/paintown/LICENSE"
|
|
install -m644 LEGAL "${pkgdir}/usr/share/licenses/paintown/LEGAL"
|
|
}
|