1 # Maintainer: Fernando M <f[at]beford.net>
2 # Contributor: Ivo Benner <ivo.benner[at]web.de>
7 pkgdesc="MeeGo Image Creator"
9 url="http://meego.gitorious.org/meego-developer-tools/image-creator"
11 depends=('yum>=3.2.27' 'multipath-tools>=0.4.8' 'parted>=2.2' 'syslinux>=3.85' 'isomd5sum>=1.0.4' 'zlib>=1.2.4' 'python2' 'pykickstart-git' 'squashfs-tools>=4.0' 'cpio>=2.0' 'dbus-python' 'udisks')
12 makedepends=('git' 'python2')
13 optdepends=('qemu-arm-static: To create ARM images (beagleboard, n900, n950, n9, etc.)')
15 replaces=(moblin-image-creator-2)
21 #### no _gitroot/_gitname is used here to prevent automatic pkgver
22 x_gitroot="git://gitorious.org/meego-developer-tools/image-creator.git"
23 x_gitname="image-creator"
27 msg 'Connecting to GIT server....'
28 if [ -d ${x_gitname} ] ; then
30 git checkout ${pkgver} -f
33 git clone ${x_gitroot} ${x_gitname}
35 git checkout ${pkgver} -f
38 msg 'GIT checkout done or server timeout'
39 msg 'Patching python2 shebangs'
40 sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find ${srcdir} -name '*.py')
41 msg 'Patching Makefile'
42 sed -i -e "s|python setup.py|python2 setup.py|" ${srcdir}/${x_gitname}/Makefile
43 msg 'Starting make...'
48 cd ${srcdir}/${x_gitname}
49 mkdir -p ${pkgdir}/usr/bin
50 make DESTDIR=${pkgdir} install