summaryrefslogtreecommitdiff
path: root/community/tuxpaint/PKGBUILD
blob: fb55d868de60423ac4f59438ce349c4275b820a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# $Id: PKGBUILD 91097 2013-05-19 11:35:37Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Sergio Jovani Guzman <moret.sjg@gmail.com>
# Contributor: royrocks <royrocks13@gmail.com>

pkgname=tuxpaint
pkgver=0.9.21
pkgrel=9
pkgdesc='Drawing program designed for young children'
arch=('x86_64' 'i686' 'mips64el')
url='http://www.tuxpaint.org/'
license=('GPL')
backup=('etc/tuxpaint/tuxpaint.conf')
depends=('python2' 'fribidi' 'sdl_ttf' 'sdl_mixer' 'sdl_image' 'sdl_pango'
         'libpaper' 'librsvg')
makedepends=('setconf' 'optipng')
optdepends=('tuxpaint-stamps: more stamps'
            'tuxpaint-conf: configuration manager')
source=("http://downloads.sourceforge.net/sourceforge/tuxpaint/$pkgname-$pkgver.tar.gz"
        'tuxpaint-0.9.21-libpng1.5.patch')
sha256sums=('6d4f2b981643b5c937708e5e6cdaf318ae7b5562375327b4b1cb84611e65ede9'
            '6d572467fce710c9323ba53bb3309eb7ed1401b4fee2c1f56533e871558a7f20')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  setconf src/tuxpaint.desktop Categories 'Game;KidsGame;Graphics;RasterGraphics;'
  sed -i 's:# fu:fu:' src/tuxpaint.conf

  # 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

  # libpng15 fix
  patch -p0 -i ../tuxpaint-0.9.21-libpng1.5.patch
  sed -i 's:$(ARCH_LINKS):$(ARCH_LINKS) -lpng:' Makefile

  # libpng16 fix
  find -name '*.png' -exec optipng -quiet -force -fix {} +
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  make PREFIX=/usr
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make \
    PREFIX=/usr \
    DESTDIR="$pkgdir" \
    GNOME_PREFIX=/usr \
    X11_ICON_PREFIX="$pkgdir/usr/share/pixmaps" \
    install
  chmod -R 644 "$pkgdir/usr/share/doc/tuxpaint-dev/"*
  chmod 755 "$pkgdir/usr/share/doc/tuxpaint-dev/html"
}

# vim:set ts=2 sw=2 et: