1 # Creator: Cristóvão Duarte Sousa <crisjss@gmail.com>
2 pkgname=swatchbooker-bzr
5 pkgdesc="Swatch book viewer/convertor/editor (with patch for pantone bridge colors)"
7 url="http://www.selapa.net/swatchbooker/"
10 depends=('python2' 'pyqt' 'lcms' 'python-imaging')
13 conflicts=('swatchbooker')
18 source=('pantone.py.diff')
20 md5sums=('660a0a7153c557f1809e9151c674c2a3')
24 _bzrtrunk='http://bazaar.launchpad.net/~olivier-berten/swatchbooker/trunk'
25 _bzrmod='swatchbooker'
29 msg "Connecting to Bazaar server...."
31 if [[ -d "$_bzrmod" ]]; then
32 cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
33 msg "The local files are updated."
35 bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
38 msg "Bazaar checkout done or server timeout"
40 msg "Applying patch..."
42 patch "$_bzrmod/src/swatchbook/websvc/pantone.py" pantone.py.diff || return 1
44 msg "Starting build..."
46 rm -rf "$srcdir/$_bzrmod-build"
47 cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build"
48 cd "$srcdir/$_bzrmod-build"
50 python2 ./setup.py build
54 cd "$srcdir/$_bzrmod-build"
56 python2 ./setup.py install --prefix ${pkgdir}/usr/
58 for i in ${pkgdir}/usr/bin/*; do sed -i 's/which python/which python2/g' $i; done
59 for i in ${pkgdir}/usr/bin/*; do chmod +x $i; done
60 for i in ${pkgdir}/usr/share/applications/*.desktop; do sed -i 's/Icon=swatchbooker/Icon=\/usr\/share\/icons\/swatchbooker.svg/g' $i; done
63 # vim:set ts=2 sw=2 et: