2 # Maintainer: Fernando M <f[at]beford.net>
3 # Contributor: Ivo Benner <ivo.benner[at]web.de>
5 pkgname=pykickstart-git
8 pkgdesc="A python library that is used for reading and writing kickstart files"
10 url="http://fedoraproject.org/wiki/Pykickstart"
18 source=(install.patch)
19 md5sums=('cdf686f20a9bdb72995465b6a6c0901a')
21 _gitroot="git://git.fedorahosted.org/git/pykickstart.git"
22 _gitname="pykickstart"
26 msg 'Connecting to GIT server....'
28 if [ -d ${_gitname} ] ; then
29 cd ${_gitname} && git pull origin
30 msg 'The local files are updated.'
32 git clone ${_gitroot} ${_gitname}
36 msg 'GIT checkout done or server timeout'
38 msg 'Patching install paths in po makefile...'
40 patch < ${srcdir}/install.patch
43 msg 'Patching for python2'
45 sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find ${srcdir} -name '*.py')
47 sed -i -e "s/python setup/python2 setup/" ${srcdir}/${_gitname}/Makefile
49 msg 'Starting make...'
52 # make DESTDIR=${pkgdir} install || return 1
56 cd ${srcdir}/${_gitname}
57 mkdir -p ${pkgdir}/usr/bin
58 make DESTDIR=${pkgdir} install