desktop/tuxpaint/PKGBUILD
2018-09-15 15:56:30 +02:00

59 lines
1.6 KiB
Bash

pkgname=tuxpaint
pkgver=0.9.23
pkgrel=1
pkgdesc="Tux Paint is a free drawing program designed for young children."
arch=('x86_64')
url="http://www.tuxpaint.org"
license=('GPL3')
depends=('fribidi' 'libpaper' 'librsvg' 'python2' 'sdl_image'
'sdl_mixer' 'sdl_pango' 'sdl_ttf')
makedepends=('gperf' 'optipng' 'setconf')
backup=('etc/tuxpaint/tuxpaint.conf')
categories=('education')
source=("https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
md5sums=('5dfc5a710b5550c54bbc8cb7cf06d594')
prepare() {
cd "$pkgname-$pkgver"
# python2 fix
for f in docs/zh_tw/mkTuxpaintIM.py fonts/locale/zh_tw_docs/maketuxfont.py; do
sed -i '0,/on/s//on2/' $f
done
# libpng16 fix
find -name '*.png' -exec optipng -quiet -force -fix {} +
# desktop shortcut categories
setconf src/tuxpaint.desktop Categories='Game;KidsGame;Graphics;RasterGraphics;'
# fullscreen by default
setconf -u src/tuxpaint.conf fullscreen=true
# location of bash completion files
setconf Makefile COMPLETIONDIR='$(DESTDIR)/usr/share/bash-completion/completions'
# no KDE4-related requirements at installation-time
setconf Makefile ARCH_INSTALL=''
}
build() {
make -C "$pkgname-$pkgver" PREFIX=/usr clean translations all -j1
}
package() {
make -C "$pkgname-$pkgver" \
PREFIX=/usr \
DESTDIR=$pkgdir \
CONFDIR=$pkgdir/etc \
MAN_PREFIX=$pkgdir/usr/share/man \
X11_ICON_PREFIX=$pkgdir/usr/share/pixmaps \
KDE_PREFIX="" \
KDE_ICON_PREFIX="" \
install -j1
# bash completions
mv "$pkgdir/usr/share/bash-completion/completions/tuxpaint-completion.bash" \
"$pkgdir/usr/share/bash-completion/completions/tuxpaint"
}