summaryrefslogtreecommitdiff
path: root/community/python2-pmw/PKGBUILD
blob: 739d1cfd3343c50b35a431ded1686807be4650e3 (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
# $Id: PKGBUILD 105149 2014-02-01 19:59:28Z arcanis $
# Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com>
# Contributor: kfgz <kfgz at interia dot pl>
# Contributor: Michael Krauss <hippodriver at gmx dot net>
# Contributor: dsa

pkgname=python2-pmw
pkgver=1.3.3b
pkgrel=1
pkgdesc="A toolkit for high-level compound widgets in Python using the Tkinter module"
arch=('i686' 'x86_64')
url="http://pmw.sourceforge.net/doc/index.html"
license=('MIT')
depends=('python2' 'tk')
source=(${pkgname}-${pkgver}.tar.gz::http://sourceforge.net/projects/pmw/files/Pmw/Pmw.1.3.3/Pmw_1_3_3b.tar.gz/download
        "LICENSE.txt")
md5sums=('d8b998b921584db32a5eeeddc6bc606c'
         '28b047a148c1780eddcf4bed6b150123')

prepare() {
  # change python to python2
  sed -i "s|python|python2|g" "${srcdir}/Pmw/Pmw/Pmw_1_3_3/tests/ManualTests.py"
  sed -i "s|python|python2|g" "${srcdir}/Pmw/Pmw/Pmw_1_3_3/demos/All.py"
  sed -i "s|python|python2|g" "${srcdir}/Pmw/Pmw/Pmw_1_3_3/tests/All.py"
  sed -i "s|python|python2|g" "${srcdir}/Pmw/Pmw/Pmw_1_3_3/bin/bundlepmw.py"
}

build() {
  cd "Pmw"
  python2 setup.py build
}

package() {
  cd "Pmw"
  python2 setup.py install --prefix=/usr --root="${pkgdir}"
  install -D -m644 "${srcdir}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}