blob: 167b7eb9a2b42c0bd642a2eb16559ec48795d472 (
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
|
# Original Contributor: Archie <xMickael@ifrance.com>
# Maintainer : blubbblubb
pkgname=phatch
pkgver=0.2.7.1
pkgmajorv=0.2.7
pkgrel=8
pkgdesc="Phatch is a simple to use cross-platform GUI Photo Batch Processor."
depends=('python2' 'wxpython' 'python2-pillow' 'mlocate')
optdepends=('python2-nautilus' 'pyexiv2')
arch=('i686' 'x86_64')
license=('GPL')
source=("https://launchpad.net/ubuntu/+archive/primary/+files/${pkgname}_${pkgver}.orig.tar.gz" )
url="http://photobatch.stani.be"
md5sums=('c0638bcc6510d340c03c40ddfb0a0c2f' )
install='phatch.install'
package() {
pushd ${srcdir}/${pkgname}-${pkgmajorv}
pushd ${pkgname}
pushd actions
sed -i 's|import Image|from PIL import Image|g' *.py
sed -i 's|from PIL from PIL|from PIL|g' convert_mode.py
popd
pushd core
sed -i 's|import Image|from PIL import Image|g' *.py
popd
pushd data
sed -i 's|import Image|from PIL import Image|g' *.py
popd
pushd lib
sed -i 's|import Image|from PIL import Image|g' *.py
sed -i 's|import PngImagePlugin|from PIL import PngImagePlugin|g' *.py
pushd pyWx
sed -i 's|import Image|from PIL import Image|g' *.py
sed -i 's|tostring()|tobytes()|g' wxPil.py
sed -i 's|fromstring(|frombytes(|g' wxPil.py
sed -i 's|wx_image.GetSize()|tuple(wx_image.GetSize())|g' wxPil.py
sed -i '/wx.InitAllImageHandlers()/d' dialogsInspector.py
sed -i '/wx.InitAllImageHandlers()/d' paint.py
popd
popd
pushd other
sed -i 's|import Image|from PIL import Image|g' *.py
popd
pushd pyWx
sed -i '/wx.InitAllImageHandlers()/d' gui.py
sed -i '/wx.InitAllImageHandlers()/d' dialogs.py
pushd wxGlade
sed -i '/wx.InitAllImageHandlers()/d' dialogs.py
sed -i '/wx.InitAllImageHandlers()/d' frame.py
popd
popd
pushd templates
sed -i 's|import Image|from PIL import Image|g' *.py
popd
sed -i '150a\ import phatch' app.py
popd
python2 setup.py install --root=${pkgdir}
}
|