summaryrefslogtreecommitdiff
path: root/community/sk1/PKGBUILD
blob: ed0920ac3ab44a4cfec994cc34ad4ae31d8680f0 (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
# $Id: PKGBUILD 98434 2013-10-10 11:32:25Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: ConnorBehan <connor.behan@gmail.com>

pkgname=sk1
pkgver=0.9.1
pkgrel=12
pkgdesc="Fork of skencil with improved CMYK support"
arch=(i686 x86_64)
url="http://sk1project.org/modules.php?name=Products&product=sk1"
depends=('tcl' 'tk' 'python2-lcms' 'python2-pillow' 'zenity' 'sk1libs')
license=('GPL' 'LGPL')
source=(http://sk1project.org/downloads/sk1/${pkgver}pre_rev905/sK1-${pkgver}pre_rev905.tar.gz
	sk1.desktop
        fix_pillow_import.patch
	build-fix.patch)

package() {
  local _tclver=`pacman -Q tcl`
  local _tclnum=${tclver:4:3}
  local _tcldir='tcl'${tclnum}

  cd $srcdir/sK1-${pkgver}pre

  # pillow import fix
  patch -Np1 -i $srcdir/fix_pillow_import.patch

  # python2 fix
  sed -i 's_#! /usr/bin/python_#! /usr/bin/python2_' src/__init__.py

  patch -p1 <$srcdir/build-fix.patch
  python2 setup.py install --prefix=/usr --root=$pkgdir

  mkdir -p $pkgdir/usr/share/pixmaps
  mkdir -p $pkgdir/usr/share/applications

  cp $pkgdir/usr/lib/python2.7/site-packages/sk1/share/icons/CrystalSVG/icon_sk1_32.png \
   $pkgdir/usr/share/pixmaps/sk1.png

  cp $srcdir/sk1.desktop $pkgdir/usr/share/applications

  mkdir $pkgdir/usr/lib/${_tcldir}
  cp -r $pkgdir/usr/lib/python2.7/site-packages/sk1/share/ttk-themes/Plastik \
    $pkgdir/usr/lib/${_tcldir}/Plastik

  sed -i 's#^python#python2#' $pkgdir/usr/bin/sk1
}
md5sums=('43b82fd85049b078dcf98e9dd81fdc6a'
         'bbf6f10b8155838eede93b5abed724f5'
         '4a44dd89707b19fe58f4c124ed321236'
         'b22c3c7b6a979c0a4e59ecaa2bd2182b')