blob: 3cf4c2a3cf2f77d23cedef10ddbe2313bb7cae55 (
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
64
65
66
67
68
|
# $Id: PKGBUILD 97882 2013-09-30 13:00:41Z bgyorgy $
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: minder
pkgbase=python-pillow
pkgname=(python-pillow python2-pillow)
_appname=Pillow
pkgver=2.1.0
pkgrel=5
pkgdesc="Python Imaging Library (PIL) fork. Python3 version."
arch=('i686' 'x86_64')
url="http://python-imaging.github.io/"
license=('BSD')
makedepends=('python-setuptools' 'python2-setuptools' 'lcms' 'libwebp' 'tk' 'sane')
# remove pull325.diff on 2.1.1 release, fixes FS#36945
source=("http://pypi.python.org/packages/source/P/$_appname/$_appname-$pkgver.zip"
"pull325.diff")
md5sums=('ec630d8ae15d4a3c4ae7b7efdeac8200'
'aa3fa12bd2d61041f6d01fedddab39fb')
build() {
cd "$srcdir"
cp -r "$srcdir/$_appname-$pkgver" "$srcdir/${_appname}2-$pkgver"
}
package_python-pillow() {
depends=('python' 'lcms' 'libwebp')
optdepends=('tk: for the ImageTK module'
'sane: for the Sane module'
'python-pyqt4: for the ImageQt module')
cd "$srcdir/$_appname-$pkgver"
python3 setup.py install --root="$pkgdir/" --optimize=0
pushd Sane
python3 setup.py install --root="$pkgdir/" --optimize=0
popd
install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# clean up bins
cd "$pkgdir/usr/bin"
for f in *.py; do
mv "$f" "${f%.py}"
done
}
package_python2-pillow() {
pkgdesc="Python Imaging Library (PIL) fork. Python2 version."
depends=('python2' 'lcms' 'libwebp')
optdepends=('tk: for the ImageTK module'
'sane: for the Sane module'
'python2-pyqt4: for the ImageQt module')
provides=('python-imaging' 'python2-imaging')
conflicts=('python-imaging' 'python2-imaging')
replaces=('python2-imaging')
cd "$srcdir/${_appname}2-$pkgver"
patch -Np1 -i ../pull325.diff
python2 setup.py install --root="$pkgdir/" --optimize=0
pushd Sane
python2 setup.py install --root="$pkgdir/" --optimize=0
popd
install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# clean up bins
cd "$pkgdir/usr/bin"
for f in *.py; do
mv "$f" "${f%.py}2"
done
}
|