updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mic2 / PKGBUILD
blob2a1119aebee82ecf4cd1be5bcabbb536355a1058
1 # Maintainer: Fernando M <f[at]beford.net>
2 # Contributor: Ivo Benner <ivo.benner[at]web.de>
4 pkgname=mic2
5 pkgver=0.24.13
6 pkgrel=1
7 pkgdesc="MeeGo Image Creator"
8 arch=('i686' 'x86_64')
9 url="http://meego.gitorious.org/meego-developer-tools/image-creator"
10 license=('GPL2')
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.)')
14 conflicts=(mic2-git)
15 replaces=(moblin-image-creator-2)
16 backup=()
17 options=()
18 source=()
19 md5sums=()
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"
25 build() {
26         cd ${srcdir}
27         msg 'Connecting to GIT server....'
28         if [ -d ${x_gitname} ] ; then
29                 cd ${x_gitname}
30                 git checkout ${pkgver} -f
31                 git clean -f
32         else
33                 git clone ${x_gitroot} ${x_gitname}
34                 cd ${x_gitname}
35                 git checkout ${pkgver} -f
36                 git clean -f
37         fi
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...'
44         make || return 1
47 package() {
48         cd ${srcdir}/${x_gitname}
49         mkdir -p ${pkgdir}/usr/bin
50         make DESTDIR=${pkgdir} install