summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Weiman <mark.weiman@markzz.com>2016-01-07 00:56:39 -0500
committerMark Weiman <mark.weiman@markzz.com>2016-01-07 00:56:39 -0500
commitc8a92464c6eabba32e21e5f0280c30c1c0c5500e (patch)
tree71515223acd309b8d65ebb6834f3696b1ff7c558
parent5c3b7276abf0d01b53662f38db5b4d52377343ed (diff)
downloadmarkzz-c8a92464c6eabba32e21e5f0280c30c1c0c5500e.tar.gz
markzz-c8a92464c6eabba32e21e5f0280c30c1c0c5500e.zip
added rpm/yum tools
-rw-r--r--python2-pyliblzma/.SRCINFO17
-rw-r--r--python2-pyliblzma/PKGBUILD39
-rw-r--r--python2-pyliblzma/pyliblzma-0.5.3.tar.bz2bin0 -> 43498 bytes
-rw-r--r--rpm-org/.SRCINFO34
-rw-r--r--rpm-org/.gitignore8
-rw-r--r--rpm-org/PKGBUILD74
-rw-r--r--rpm-org/lua-5.3.patch64
-rw-r--r--rpm-org/rpmextract.sh6
-rw-r--r--rpm-org/rpmlib-filesystem-check.patch125
-rw-r--r--yum-metadata-parser/.SRCINFO16
-rw-r--r--yum-metadata-parser/.gitignore4
-rw-r--r--yum-metadata-parser/PKGBUILD27
-rw-r--r--yum/.AURINFO26
-rw-r--r--yum/.SRCINFO26
-rw-r--r--yum/.gitignore3
-rw-r--r--yum/PKGBUILD53
-rw-r--r--yum/remove-init-dir-makefile.patch12
17 files changed, 534 insertions, 0 deletions
diff --git a/python2-pyliblzma/.SRCINFO b/python2-pyliblzma/.SRCINFO
new file mode 100644
index 0000000..776b7eb
--- /dev/null
+++ b/python2-pyliblzma/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = python2-pyliblzma
+ pkgdesc = Python 2 bindings for liblzma
+ pkgver = 0.5.3
+ pkgrel = 7
+ url = https://pypi.python.org/pypi/pyliblzma
+ arch = i686
+ arch = x86_64
+ license = LGPL3
+ makedepends = python2-setuptools
+ depends = python2
+ depends = xz
+ source = https://pypi.python.org/packages/source/p/pyliblzma/pyliblzma-0.5.3.tar.bz2
+ sha256sums = 08d762f36d5e59fb9bb0e22e000c300b21f97e35b713321ee504cfb442667957
+ sha512sums = 272983aac426e86d6d636ccba4fe78a07d7282560081df937114162bfd317bd8023814693b8d473d0f7884e38a968ebeaf8f954a5a27c1f7e5da084f3fd05c65
+
+pkgname = python2-pyliblzma
+
diff --git a/python2-pyliblzma/PKGBUILD b/python2-pyliblzma/PKGBUILD
new file mode 100644
index 0000000..0019689
--- /dev/null
+++ b/python2-pyliblzma/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: William J. Bowman <aur@williamjbowman.com>
+# Contributor: Levente Polyak <levente[at]leventepolyak[dot]net>
+# Contributor: Daniel Strandberg <esodax!nospam!@gmail.com>
+
+_relname=pyliblzma
+pkgname=python2-${_relname}
+pkgver=0.5.3
+pkgrel=7
+pkgdesc='Python 2 bindings for liblzma'
+arch=('i686' 'x86_64')
+url='https://pypi.python.org/pypi/pyliblzma'
+license=('LGPL3')
+depends=('python2' 'xz')
+makedepends=('python2-setuptools')
+source=(https://pypi.python.org/packages/source/p/${_relname}/${_relname}-${pkgver}.tar.bz2)
+sha256sums=('08d762f36d5e59fb9bb0e22e000c300b21f97e35b713321ee504cfb442667957')
+sha512sums=('272983aac426e86d6d636ccba4fe78a07d7282560081df937114162bfd317bd8023814693b8d473d0f7884e38a968ebeaf8f954a5a27c1f7e5da084f3fd05c65')
+
+prepare() {
+ cd ${_relname}-${pkgver}
+ sed -e 's/env python$/env python2/g' -i liblzma.py
+}
+
+build() {
+ cd ${_relname}-${pkgver}
+ python2 setup.py build
+}
+
+check() {
+ cd ${_relname}-${pkgver}
+ python2 setup.py test
+}
+
+package() {
+ cd ${_relname}-${pkgver}
+ python2 setup.py install -O1 --root="${pkgdir}" --prefix=/usr
+}
+
+# vim:ts=2:sw=2:et:
diff --git a/python2-pyliblzma/pyliblzma-0.5.3.tar.bz2 b/python2-pyliblzma/pyliblzma-0.5.3.tar.bz2
new file mode 100644
index 0000000..3491680
--- /dev/null
+++ b/python2-pyliblzma/pyliblzma-0.5.3.tar.bz2
Binary files differ
diff --git a/rpm-org/.SRCINFO b/rpm-org/.SRCINFO
new file mode 100644
index 0000000..a1b713b
--- /dev/null
+++ b/rpm-org/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = rpm-org
+ pkgdesc = RPM Package Manager - RPM.org fork, used in major RPM distros
+ pkgver = 4.12.0.1
+ pkgrel = 3
+ url = http://www.rpm.org/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = python2
+ makedepends = python
+ depends = lua>=5.1
+ depends = file
+ depends = nss>=3.12
+ depends = popt
+ depends = elfutils
+ depends = libarchive
+ depends = libcap
+ optdepends = libdbus: systemd inhibit plugin
+ provides = rpm=4.12.0.1
+ provides = rpmextract=1.0-4
+ conflicts = rpm
+ conflicts = rpmextract
+ options = !libtool
+ source = http://rpm.org/releases/rpm-4.12.x/rpm-4.12.0.1.tar.bz2
+ source = rpmextract.sh
+ source = rpmlib-filesystem-check.patch
+ source = lua-5.3.patch
+ sha1sums = d416bdb249b246b00b2d5d34c66e7f5a68a62524
+ sha1sums = 74849919207885ae024f1ab8ed68a76474d67ad7
+ sha1sums = 0c5fa516dde1f10211af896c729e4b00c313e12b
+ sha1sums = e8efa065eb42648ac431a48b083888ae77e8ae4b
+
+pkgname = rpm-org
+
diff --git a/rpm-org/.gitignore b/rpm-org/.gitignore
new file mode 100644
index 0000000..bd9b4a4
--- /dev/null
+++ b/rpm-org/.gitignore
@@ -0,0 +1,8 @@
+*.tar.gz
+*.tar.xz
+*.tgz
+*.rpm
+*.zip
+*.bz2
+src/
+pkg/
diff --git a/rpm-org/PKGBUILD b/rpm-org/PKGBUILD
new file mode 100644
index 0000000..9967a46
--- /dev/null
+++ b/rpm-org/PKGBUILD
@@ -0,0 +1,74 @@
+# Contributor: Johannes Dewender arch at JonnyJD dot net
+# Contributor: Konrad <konrad AT knauber DOT name>
+# Contributor: Luka Perkov <archlinux <at> lukaperkov <dOt> net>
+# Contributor: Fernando M <f <at> beford.net>
+# Author: Wintershade <Wintershade AT google mail DOT com>
+
+pkgname=rpm-org
+pkgver=4.12.0.1
+_pkgver=$pkgver
+#_pkgver=4.12.0-rc1
+pkgrel=3
+pkgdesc="RPM Package Manager - RPM.org fork, used in major RPM distros"
+arch=('i686' 'x86_64')
+url=("http://www.rpm.org/")
+license=('GPL2')
+depends=('lua>=5.1' 'file' 'nss>=3.12' 'popt' 'elfutils' 'libarchive' 'libcap')
+makedepends=('python2' 'python')
+optdepends=('libdbus: systemd inhibit plugin')
+conflicts=('rpm' 'rpmextract')
+options=('!libtool')
+provides=("rpm=${pkgver}" 'rpmextract=1.0-4')
+#source=(http://rpm.org/releases/testing/rpm-${_pkgver}.tar.bz2
+source=(http://rpm.org/releases/rpm-4.12.x/rpm-${pkgver}.tar.bz2
+ rpmextract.sh rpmlib-filesystem-check.patch lua-5.3.patch)
+sha1sums=('d416bdb249b246b00b2d5d34c66e7f5a68a62524'
+ '74849919207885ae024f1ab8ed68a76474d67ad7'
+ '0c5fa516dde1f10211af896c729e4b00c313e12b'
+ 'e8efa065eb42648ac431a48b083888ae77e8ae4b')
+
+prepare() {
+ cd ${srcdir}/rpm-${_pkgver}
+ patch -p1 < ../rpmlib-filesystem-check.patch
+ patch -p1 < ../lua-5.3.patch
+}
+
+
+build() {
+ cd ${srcdir}/rpm-${_pkgver}
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-python \
+ --with-external-db \
+ --with-lua \
+ --with-cap \
+ CPPFLAGS="`pkg-config --cflags nss`" \
+ PYTHON=python2
+ make
+}
+
+package() {
+ cd ${srcdir}/rpm-${_pkgver}
+ make prefix=${pkgdir}/usr localstatedir=${pkgdir}/var install
+ rmdir ${pkgdir}/var/tmp
+ rmdir ${pkgdir}/var
+ # rpmextract using bsdtar, needs libarchive
+ install -m755 ${srcdir}/rpmextract.sh ${pkgdir}/usr/bin/
+
+ # move rpm from /bin to /usr/bin
+ mv ${pkgdir}/bin/rpm ${pkgdir}/usr/bin/
+ rm ${pkgdir}/usr/bin/rpm{query,verify}
+ cd ${pkgdir}/usr/bin
+ ln -s rpm rpmquery
+ ln -s rpm rpmverify
+ rm -r ${pkgdir}/bin/
+
+ # also install python 3 files
+ # building with python 3 files as default doesn't seem to work
+ cd ${srcdir}/rpm-${_pkgver}
+ cd python
+ python setup.py install --root="$pkgdir/" --optimize=1
+}
diff --git a/rpm-org/lua-5.3.patch b/rpm-org/lua-5.3.patch
new file mode 100644
index 0000000..dd8062a
--- /dev/null
+++ b/rpm-org/lua-5.3.patch
@@ -0,0 +1,64 @@
+From 82c0aa33c904274d9d62b629c2d15990aab45050 Mon Sep 17 00:00:00 2001
+From: Johannes Dewender <rpm@JonnyJD.net>
+Date: Mon, 18 May 2015 10:11:13 +0200
+Subject: [PATCH] remove luaL_checkint, deprecated in lua 5.3
+
+luaL_checkint and luaL_optint are deprecated in lua 5.3
+The variants luaL_checkinteger and luaL_optinteger work
+the same with an implicit typecast (lua_integer -> int).
+---
+ luaext/lposix.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/luaext/lposix.c b/luaext/lposix.c
+index a59be3e..51ea2b3 100644
+--- a/luaext/lposix.c
++++ b/luaext/lposix.c
+@@ -361,22 +361,22 @@ static int Pfork(lua_State *L) /** fork() */
+
+ static int Pwait(lua_State *L) /** wait([pid]) */
+ {
+- pid_t pid = luaL_optint(L, 1, -1);
++ pid_t pid = luaL_optinteger(L, 1, -1);
+ return pushresult(L, waitpid(pid, NULL, 0), NULL);
+ }
+
+
+ static int Pkill(lua_State *L) /** kill(pid,[sig]) */
+ {
+- pid_t pid = luaL_checkint(L, 1);
+- int sig = luaL_optint(L, 2, SIGTERM);
++ pid_t pid = luaL_checkinteger(L, 1);
++ int sig = luaL_optinteger(L, 2, SIGTERM);
+ return pushresult(L, kill(pid, sig), NULL);
+ }
+
+
+ static int Psleep(lua_State *L) /** sleep(seconds) */
+ {
+- unsigned int seconds = luaL_checkint(L, 1);
++ unsigned int seconds = luaL_checkinteger(L, 1);
+ lua_pushnumber(L, sleep(seconds));
+ return 1;
+ }
+@@ -529,7 +529,7 @@ static int Pgetprocessid(lua_State *L) /** getprocessid([selector]) */
+
+ static int Pttyname(lua_State *L) /** ttyname(fd) */
+ {
+- int fd=luaL_optint(L, 1, 0);
++ int fd=luaL_optinteger(L, 1, 0);
+ lua_pushstring(L, ttyname(fd));
+ return 1;
+ }
+@@ -880,7 +880,7 @@ static int exit_override(lua_State *L)
+ if (!have_forked)
+ return luaL_error(L, "exit not permitted in this context");
+
+- exit(luaL_optint(L, 1, EXIT_SUCCESS));
++ exit(luaL_optinteger(L, 1, EXIT_SUCCESS));
+ }
+
+ static const luaL_Reg os_overrides[] =
+--
+2.1.3
+
diff --git a/rpm-org/rpmextract.sh b/rpm-org/rpmextract.sh
new file mode 100644
index 0000000..f9d4e5b
--- /dev/null
+++ b/rpm-org/rpmextract.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ "$1" = "" -o ! -e "$1" ]; then
+ echo "no package supplied" 1>&2
+ exit 1
+fi
+bsdtar xf $1
diff --git a/rpm-org/rpmlib-filesystem-check.patch b/rpm-org/rpmlib-filesystem-check.patch
new file mode 100644
index 0000000..984d8c4
--- /dev/null
+++ b/rpm-org/rpmlib-filesystem-check.patch
@@ -0,0 +1,125 @@
+diff -up rpm-4.10.90.git11978/lib/depends.c.rpmlib-filesystem-check rpm-4.10.90.git11978/lib/depends.c
+--- rpm-4.10.90.git11978/lib/depends.c.rpmlib-filesystem-check 2012-11-01 09:40:26.000000000 +0200
++++ rpm-4.10.90.git11978/lib/depends.c 2012-11-05 10:53:42.294733695 +0200
+@@ -589,6 +589,109 @@ static int rpmdbProvides(rpmts ts, depCa
+ return rc;
+ }
+
++/*
++ * Temporary support for live-conversion of the filesystem hierarchy
++ * mailto: kay@redhat.com, harald@redhat.com
++ * https://fedoraproject.org/wiki/Features/UsrMove
++ *
++ * X-CheckUnifiedSystemdir:
++ * /bin, /sbin, /lib, /lib64 --> /usr
++ *
++ * X-CheckUnifiedBindir:
++ * /usr/sbin -> /usr/bin
++ *
++ * X-CheckMultiArchLibdir:
++ * /usr/lib64 /usr/lib/<platform tuple> (e.g. x86_64-linux-gnu)
++ *
++ * This code is not needed for new installations, it can be removed after
++ * updates from older systems are no longer supported: Fedora 19 / RHEL 8.
++ */
++
++static int CheckLink(const char *dir, const char *root)
++{
++ char *d = NULL;
++ struct stat sbuf;
++ int rc = 0;
++
++ if (!root)
++ root = "/";
++
++ rasprintf(&d, "%s%s", root, dir);
++ if (!d) {
++ rc = -1;
++ goto exit;
++ }
++
++ /* directory or symlink does not exist, all is fine */
++ if (lstat(d, &sbuf) < 0) {
++ rc = 1;
++ goto exit;
++ }
++
++ /* if it is a symlink, all is fine */
++ if (S_ISLNK(sbuf.st_mode))
++ rc = 1;
++
++exit:
++ free(d);
++ return rc;
++}
++
++static int CheckFilesystemHierarchy(rpmds * dsp, const char *root)
++{
++ static const char *dirs[] = { "bin", "sbin", "lib", "lib64" };
++ int check;
++ int i;
++ rpmds ds;
++ rpmstrPool pool = rpmdsPool(*dsp);
++ int rc = 0;
++
++ for (i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
++ check = CheckLink(dirs[i], root);
++ if (check < 0) {
++ rc = -1;
++ goto exit;
++ }
++
++ if (check == 0)
++ goto exit;
++ }
++ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
++ "rpmlib(X-CheckUnifiedSystemdir)", "1",
++ RPMSENSE_EQUAL);
++ rpmdsMerge(dsp, ds);
++ rpmdsFree(ds);
++
++ check = CheckLink("usr/lib64", root);
++ if (check < 0) {
++ rc = -1;
++ goto exit;
++ }
++ if (check > 0) {
++ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
++ "rpmlib(X-CheckMultiArchLibdir)", "1",
++ RPMSENSE_EQUAL);
++ rpmdsMerge(dsp, ds);
++ rpmdsFree(ds);
++ }
++
++ check = CheckLink("usr/sbin", root);
++ if (check < 0) {
++ rc = -1;
++ goto exit;
++ }
++ if (check > 0) {
++ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
++ "rpmlib(X-CheckUnifiedBindir)", "1",
++ RPMSENSE_EQUAL);
++ rpmdsMerge(dsp, ds);
++ rpmdsFree(ds);
++ }
++
++exit:
++ return rc;
++}
++
+ /**
+ * Check dep for an unsatisfied dependency.
+ * @param ts transaction set
+@@ -612,8 +715,10 @@ retry:
+ * Check those dependencies now.
+ */
+ if (dsflags & RPMSENSE_RPMLIB) {
+- if (tsmem->rpmlib == NULL)
++ if (tsmem->rpmlib == NULL) {
+ rpmdsRpmlibPool(rpmtsPool(ts), &(tsmem->rpmlib), NULL);
++ CheckFilesystemHierarchy(&(tsmem->rpmlib), rpmtsRootDir(ts));
++ }
+
+ if (tsmem->rpmlib != NULL && rpmdsSearch(tsmem->rpmlib, dep) >= 0) {
+ rpmdsNotify(dep, "(rpmlib provides)", rc);
diff --git a/yum-metadata-parser/.SRCINFO b/yum-metadata-parser/.SRCINFO
new file mode 100644
index 0000000..1d8e46b
--- /dev/null
+++ b/yum-metadata-parser/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = yum-metadata-parser
+ pkgdesc = C-based metadata parser to quickly parse xml metadata into sqlite databases.
+ pkgver = 1.1.4
+ pkgrel = 8
+ url = http://yum.baseurl.org/download/yum-metadata-parser/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = python2
+ depends = libxml2
+ depends = glib2
+ source = http://yum.baseurl.org/download/yum-metadata-parser/yum-metadata-parser-1.1.4.tar.gz
+ sha256sums = f1560a284541feb720c3ae35b6b31f80c2be5cb9ca86b3a1ee9459846f821ada
+
+pkgname = yum-metadata-parser
+
diff --git a/yum-metadata-parser/.gitignore b/yum-metadata-parser/.gitignore
new file mode 100644
index 0000000..99a6c4e
--- /dev/null
+++ b/yum-metadata-parser/.gitignore
@@ -0,0 +1,4 @@
+*.tar.gz
+*.pkg.tar.xz
+pkg/
+src/
diff --git a/yum-metadata-parser/PKGBUILD b/yum-metadata-parser/PKGBUILD
new file mode 100644
index 0000000..697f5a0
--- /dev/null
+++ b/yum-metadata-parser/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Patrick McCarty <pnorcks at gmail dot com>
+# Contributor: Mariusz Libera <mariusz.libera@gmail.com>
+# Contributor: Chris Tusa <linisys@gmail.com>
+# Contributor: Thore Bunde <root [at] netpimp [dot] de>
+
+pkgname=yum-metadata-parser
+pkgver=1.1.4
+pkgrel=8
+pkgdesc="C-based metadata parser to quickly parse xml metadata into sqlite databases."
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://yum.baseurl.org/download/yum-metadata-parser/"
+depends=('python2' 'libxml2' 'glib2')
+source=(http://yum.baseurl.org/download/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+sha256sums=('f1560a284541feb720c3ae35b6b31f80c2be5cb9ca86b3a1ee9459846f821ada')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ python2 setup.py build
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ python2 setup.py install --root="${pkgdir}/" --optimize=1
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/yum/.AURINFO b/yum/.AURINFO
new file mode 100644
index 0000000..b579c16
--- /dev/null
+++ b/yum/.AURINFO
@@ -0,0 +1,26 @@
+pkgbase = yum
+ pkgdesc = a popular channel based package manager for RPM distros.
+ pkgver = 3.4.3
+ pkgrel = 5
+ url = http://yum.baseurl.org/
+ arch = i686
+ arch = x86_64
+ groups = system
+ license = GPL
+ depends = python2
+ depends = intltool
+ depends = urlgrabber
+ depends = rpm-org
+ depends = python2-pysqlite
+ depends = yum-metadata-parser
+ depends = python2-iniparse
+ depends = python2-pyliblzma
+ source = http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz
+ source = http://pkgs.fedoraproject.org/cgit/yum.git/plain/yum-HEAD.patch?h=f21
+ source = yum0.patch
+ md5sums = 7c8ea8beba5b4e7fe0c215e4ebaa26ed
+ md5sums = 057b511555104257c4422c54fb4ed089
+ md5sums = 5c7dbcac530ec6efdf1979a256289c7d
+
+pkgname = yum
+
diff --git a/yum/.SRCINFO b/yum/.SRCINFO
new file mode 100644
index 0000000..d5046d7
--- /dev/null
+++ b/yum/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = yum
+ pkgdesc = a popular channel based package manager for RPM distros.
+ pkgver = 3.4.3
+ pkgrel = 6
+ url = http://yum.baseurl.org/
+ arch = i686
+ arch = x86_64
+ groups = system
+ license = GPL
+ depends = python2
+ depends = intltool
+ depends = urlgrabber
+ depends = rpm-org
+ depends = python2-pysqlite
+ depends = yum-metadata-parser
+ depends = python2-iniparse
+ depends = python2-pyliblzma
+ source = http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz
+ source = yum.patch::http://pkgs.fedoraproject.org/cgit/yum.git/plain/yum-HEAD.patch?h=f21
+ source = remove-init-dir-makefile.patch
+ md5sums = 7c8ea8beba5b4e7fe0c215e4ebaa26ed
+ md5sums = 3ed35721daf75fd56590bd2d2b993ddc
+ md5sums = 14d68bd689ea76a44567bc2dd0e64cb1
+
+pkgname = yum
+
diff --git a/yum/.gitignore b/yum/.gitignore
new file mode 100644
index 0000000..a9405dc
--- /dev/null
+++ b/yum/.gitignore
@@ -0,0 +1,3 @@
+*gz
+*xz
+yum.patch
diff --git a/yum/PKGBUILD b/yum/PKGBUILD
new file mode 100644
index 0000000..b3335d2
--- /dev/null
+++ b/yum/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer : Achilleas Pipinellis <axilleas archlinux info>
+# Contributor: William Giokas <1007380@gmail.com>
+# Contributor: Fernando M f[at]beford.net
+# Contributor: Ivo Benner <ivo.benner[at]web.de>
+# Contributor: Luka Perkov <archlinux <at> lukaperkov <dOt> net>
+# Contributor: Rob Taylor <robtaylor[at]floopily.org>
+
+pkgname=yum
+pkgver=3.4.3
+pkgrel=6
+pkgdesc="a popular channel based package manager for RPM distros."
+arch=('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/"
+}
diff --git a/yum/remove-init-dir-makefile.patch b/yum/remove-init-dir-makefile.patch
new file mode 100644
index 0000000..671efdf
--- /dev/null
+++ b/yum/remove-init-dir-makefile.patch
@@ -0,0 +1,12 @@
+--- Makefile.dist 2009-01-08 13:36:04.598489682 -0700
++++ Makefile 2009-01-08 13:40:23.116347817 -0700
+@@ -13,9 +13,6 @@
+ mkdir -p $(DESTDIR)/etc/logrotate.d
+ install -m 644 yum.logrotate $(DESTDIR)/etc/logrotate.d/yum
+
+- mkdir -p $(DESTDIR)/etc/rc.d/init.d
+- install -m 755 yum-updatesd.init $(DESTDIR)/etc/rc.d/init.d/yum-updatesd
+-
+ mkdir -p $(DESTDIR)/etc/dbus-1/system.d/
+ install -m 755 yum-updatesd-dbus.conf $(DESTDIR)/etc/dbus-1/system.d/yum-updatesd.conf
+