# Maintainer: Jorge Navarro <[email protected]>
# Contributor: Joshua (xihh) <[email protected]>
pkgname=kervala-luabind-hg
pkgver=1.0
pkgrel=1
pkgdesc="a LUA dependencie for the game Ryzom"
arch=('i686' 'x86_64')
url="http://hg.kervala.net/";
license=('custom:BSD')
depends=('lua')
makedepends=('mercurial' 'cmake')
provides=('kervala-luabind')
md5sums=() #generate with 'makepkg -g'

_hgroot="http://hg.kervala.net";
_hgrepo="packaging"
_hgpkg="luabind"

build() {
  msg "Connecting to $_hgroot"
  if [ -d $_hgrepo ]; then
    cd $_hgrepo
    hg pull -u || return 1
    msg2 "Finished updating the local repository!"
  else
    hg clone ${_hgroot} "${srcdir}/${_hgrepo}" || return 1
    msg2 "Initiall pull complete!"
  fi

  if [ -d "${srcdir}/${_hgrepo}/${_hgpkg}/${_hgpkg}-build" ]; then
    cd "${srcdir}/${_hgrepo}/${_hgpkg}/${_hgpkg}-build"
    make clean || return 1
    hg pull -u "${srcdir}/${_hgrepo}" || return 1
  else
    hg clone "${srcdir}/${_hgrepo}" "${srcdir}/{_hgrepo}" || return 1
    cd "${srcdir}/${_hgrepo}/${_hgpkg}"
  fi

  mkdir ${_hgpkg}-build
  cd ${_hgpkg}-build
  cmake ..
  make
}

package() {
  cd "$srcdir/$_hgrepo/$_hgpkg/$_hgpkg-build"
  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et:
On Mon, 13 Feb 2012 14:08:47 -0600, Jorge Araya Navarro <[email protected]> 
wrote:
> I want to package the game Ryzom, it is a pain in the ass to install it
> on Parabola/Arch, I even submit a bug some months ago, I think I'm the

Nice to have more packagers... I attach some corrections for the
PKGBUILD.

> http://dev.ryzom.com/projects/ryzom/wiki/BuildForLinuxCmake ). All these
> source code came from one single repository, so, if you can explain to
> me that stuff of "Splitting packages" it would be helpful in order to
> build every package with a single PKGBUILD.

Split packages is a way to create different packages from a single
source, for example is package A also compiles some optional plugins,
and you provide A(core) and A(plugins) in different packages.

Hope this helps

> so, here is the PKGBUILD http://ompldr.org/vY3Q0Ng I use an already
> created PKGBUILD who use a mercurial repository as example. This is the
> output of makepkg -s http://pastie.org/private/hlrq5nqe0kjdptmkit1q0w

The output says what to correct, when using [ ] for comparations you
must use them separated from it's expresion:

incorrect:   if [ -d $_hgrepo]; then
correct  :   if [ -d $_hgrepo ]; then

_______________________________________________
Dev mailing list
[email protected]
http://lists.parabolagnulinux.org/mailman/listinfo/dev

Reply via email to