updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / swatchbooker-bzr / PKGBUILD
blobaab902233a2a34296c25104d78e9f12df89b5bd2
1 # Creator: Cristóvão Duarte Sousa <crisjss@gmail.com>
2 pkgname=swatchbooker-bzr
3 pkgver=145
4 pkgrel=3
5 pkgdesc="Swatch book viewer/convertor/editor (with patch for pantone bridge colors)"
6 arch=('i686' 'x86_64')
7 url="http://www.selapa.net/swatchbooker/"
8 license=('GPL')
9 groups=()
10 depends=('python2' 'pyqt' 'lcms' 'python-imaging')
11 makedepends=('bzr')
12 provides=()
13 conflicts=('swatchbooker')
14 replaces=()
15 backup=()
16 options=()
17 install=
18 source=('pantone.py.diff')
19 noextract=()
20 md5sums=('660a0a7153c557f1809e9151c674c2a3')
24 _bzrtrunk='http://bazaar.launchpad.net/~olivier-berten/swatchbooker/trunk'
25 _bzrmod='swatchbooker'
27 build() {
28   cd "$srcdir"
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."
34   else
35     bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
36   fi
38   msg "Bazaar checkout done or server timeout"
39   
40   msg "Applying patch..."
41   cd "$srcdir"
42   patch "$_bzrmod/src/swatchbook/websvc/pantone.py" pantone.py.diff || return 1
43   
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
53 package() {
54   cd "$srcdir/$_bzrmod-build"
55   
56   python2 ./setup.py install --prefix ${pkgdir}/usr/
57   
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: