1 # Maintainer: Fernando M f[at]beford.net
2 # Contributor: Ivo Benner <ivo.benner[at]web.de>
3 # Contributor: Luka Perkov <archlinux <at> lukaperkov <dOt> net>
8 pkgdesc="Yum is a popular channel based package manager for RPM distros."
11 url="http://yum.baseurl.org/"
13 depends=('python2' 'intltool' 'urlgrabber' 'rpm-org' 'python-pysqlite' 'yum-metadata-parser' 'python2-iniparse')
14 source=(http://yum.baseurl.org/download/3.4/yum-${pkgver}.tar.gz yum0.patch yum1.patch yum-updatesd.init)
15 md5sums=('7c8ea8beba5b4e7fe0c215e4ebaa26ed'
16 '8dfe6077c27c66fa10244ea31074bd5d'
17 '5c7dbcac530ec6efdf1979a256289c7d'
18 'e3cfa4ca3d6590eb92adc0aa77c5f91e')
21 cd ${srcdir}/${pkgname}-${pkgver}/po
22 # Apply patch to change Makefile in 'po' directory to use ArchLinux's 'install' path
23 patch < ${srcdir}/yum0.patch || return 1
25 cd ${srcdir}/${pkgname}-${pkgver}/etc
27 # Apply patch to remove the RedHat style init script from being installed
28 patch < ${srcdir}/yum1.patch || return 1
31 msg 'Patching python2 shebangs'
32 sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find ${srcdir} -name '*.py')
34 msg 'Patching Makefile'
36 sed -i -e "s/PYTHON=python/PYTHON=python2/" ${srcdir}/${pkgname}-${pkgver}/Makefile
38 cd ${srcdir}/${pkgname}-${pkgver}
40 make DESTDIR=${pkgdir} install || return 1
42 # Install the ArchLinux specific init script
43 #mkdir ${pkgdir}/etc/rc.d || return 1
44 install -m 755 ${srcdir}/yum-updatesd.init ${pkgdir}/etc/rc.d/yum-updatesd || return 1