From bf84d7c8b2db76e9cf1830ea475a3626af39951c Mon Sep 17 00:00:00 2001 From: David P Date: Wed, 5 Apr 2017 14:42:46 -0300 Subject: Added yum to [pcr] --- pcr/yum/PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pcr/yum/PKGBUILD (limited to 'pcr/yum/PKGBUILD') diff --git a/pcr/yum/PKGBUILD b/pcr/yum/PKGBUILD new file mode 100644 index 000000000..2ee872220 --- /dev/null +++ b/pcr/yum/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: David P. +# Contributor: Achilleas Pipinellis +# Contributor: William Giokas <1007380@gmail.com> +# Contributor: Fernando M f[at]beford.net +# Contributor: Ivo Benner +# Contributor: Luka Perkov lukaperkov net> +# Contributor: Rob Taylor + +pkgname=yum +pkgver=3.4.3 +pkgrel=6 +pkgdesc="a popular channel based package manager for RPM distros." +arch=('armv7h' 'i686' 'x86_64') +license=('GPL') +url="http://yum.baseurl.org/" +groups=('system') +depends=('python2' 'intltool' 'urlgrabber' 'rpm-org' 'python2-pysqlite' 'yum-metadata-parser' 'python2-iniparse' 'python2-pyliblzma') +source=("http://yum.baseurl.org/download/3.4/yum-${pkgver}.tar.gz" + "yum.patch::http://pkgs.fedoraproject.org/cgit/yum.git/plain/yum-HEAD.patch?h=f21" + 'remove-init-dir-makefile.patch') +md5sums=('7c8ea8beba5b4e7fe0c215e4ebaa26ed' + '3ed35721daf75fd56590bd2d2b993ddc' + '14d68bd689ea76a44567bc2dd0e64cb1') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Patch up to Fedora current + patch -p1 < "${srcdir}/yum.patch" + + cd "etc" + + # Apply patch to remove the RedHat style init script from being installed + patch < "${srcdir}/remove-init-dir-makefile.patch" +} + +build() { + # Patching python2 shebangs + sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find ${srcdir} -name '*.py') + sed -i -e "s/PYTHON=python/PYTHON=python2/" "${srcdir}/${pkgname}-${pkgver}/Makefile" + + cd "${srcdir}/${pkgname}-${pkgver}" + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" INIT=systemd install + + mv "${pkgdir}/usr/sbin/"* "${pkgdir}/usr/bin/" + rmdir "${pkgdir}/usr/sbin/" +} -- cgit v1.2.3