You are not logged in.

#1 2010-12-03 13:47:23

skwid
Member
Registered: 2009-09-20
Posts: 105

[SOLVED] Patching Help

Hello there,

This patching thing is all new to me.  I've read through many threads but I am not getting it I think.

I am trying to patch "shifty-git" from AUR with a patch from:   http://awesome.naquadah.org/wiki/Talk:Shifty    at the top of the page.

I download the PKGBUILD, and saved the patch code to the directory as "rename.patch". 

I am stuck from there?


Thanks,
J

Last edited by skwid (2010-12-03 15:19:56)

Offline

#2 2010-12-03 14:36:43

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Patching Help

If you can apply the patch by using the command line, then applying the patch by using the PKGBUILD file is easy. Are you having a hard time understanding how patches work?

To apply a patch use, of course, the "patch" command. You can read about it here: http://www.linuxtutorialblog.com/post/i … h-tutorial The section you are most interested in is probably "Patching multiple files".

To see an example of how to put it in the PKGBUILD file, you can look at an example here: http://aur.archlinux.org/packages/wmnet … d/PKGBUILD (from the wmnetload package.

If something goes wrong and you can't figure it out, please let me know.

Offline

#3 2010-12-03 15:03:21

skwid
Member
Registered: 2009-09-20
Posts: 105

Re: [SOLVED] Patching Help

Thanks for the reply!

Does this apply any different when im using a PKGBUILD that uses GIT for the source?

Here is my PKGBUILD so far.   I've added the path to the patch in the source() and the md5sum.  I am not sure where to put the patch line.

# Contributor: Anton S <fluffylime at gmail dot com>
pkgname=shifty-git
pkgver=20101203
pkgrel=1
pkgdesc="Dynamic tagging library for Awesome window manager"
arch=("i686" "x86_64")
url="http://awesome.naquadah.org/wiki/Shifty"
license=("unknown")
depends=("awesome")
makedepends=("git")
conflicts=("shifty")
provides=("shifty")
source=(/home/skwid/Builds/shifty-git/rename.patch)
md5sums=(b7ed3bbf2da315cc6abc84ed058b2936)

_gitroot=git://git.mercenariesguild.net/awesome.git
_gitbranch=shifty-master
_gitname=awesome

build() {
  cd "${srcdir}"

# Update the library
  msg "Connecting to GIT server...."
  if [[ -d "${_gitname}" ]]; then
      (cd "${_gitname}" && git pull origin)
      msg "The local files are updated."
  else
      git clone "${_gitroot}" -b "${_gitbranch}" "${_gitname}"
  fi
  msg "GIT checkout done or server timeout"

# Install the library
  install -d "${pkgdir}/usr/share/awesome/lib" || return 1
  cp -a "${_gitname}/lib/shifty.lua.in" "${pkgdir}/usr/share/awesome/lib/shifty.lua" || return 1
}

Offline

#4 2010-12-03 15:19:42

skwid
Member
Registered: 2009-09-20
Posts: 105

Re: [SOLVED] Patching Help

ahh, hell.  I figured it out.   

Thanks for your help.

Offline

Board footer

Powered by FluxBB