You are not logged in.

#1 2011-03-21 12:41:04

W.F.Cody
Member
From: Ghent
Registered: 2010-11-18
Posts: 155

[Request] [Brainstorm] Using pkgsrc as a makedepend / NetBSD Rump

Hi all

I have been trying to work out a way to make a PKGBUILD for the Rump anykernel (http://www.netbsd.org/docs/puffs/rump.html).
To read more about this project, see the recent NetBSD blog post about it:
http://blog.netbsd.org/tnf/entry/rump_d … rvices_for

In principle, one should be able to install Rump on linux via pkgsrc, which is available in AUR (https://aur.archlinux.org/packages.php?ID=47392)
http://www.netbsd.org/~stacktic/rumpabroad.html

pkgsrc is however a rather heavy dependency, so it would be nice if pkgsrc could be used only as a makedepend (which will make binary redistribution much easier and ported packages far more native to Arch).

This is a PKGBUILD I have been trying to play with, but it still does not work.
Suggestions/ideas/improvements welcome!

pkgname="netbsd-rump"
_pkgid="rump"
pkgver="2010Q4"
pkgrel=1
pkgdesc="An implementation of the anykernel paradigm: some NetBSD kernel functions in userland"
arch=('i686' 'x86_64')
url="http://www.netbsd.org/docs/rump/index.html"
license=('BSD')
depends=('libnbcompat')
makedepends=('cvs' 'unionfs-fuse' 'netbsd-pkgsrc')


__cvsroot="anoncvs@anoncvs.NetBSD.org:/cvsroot"
__cvsmod="pkgsrc/misc/$_pkgid/"

build() {
      cd $srcdir

        if [ -d $__cvsmod/CVS ]; then
                CVSROOT=$__cvsroot CVS_RSH=ssh cvs -f -z3 up -r pkgsrc-$pkgver -Pd $__cvsmod
        else
                CVSROOT=$__cvsroot CVS_RSH=ssh cvs -f -z3 co -r pkgsrc-$pkgver -P $__cvsmod
        fi

        rm -rf $srcdir/work # starting fresh every time
        rm -rf $srcdir/out # starting fresh every time
        rm -rf $srcdir/build # starting fresh every time
        mkdir $srcdir/out
        mkdir $srcdir/build

msg "setting up build environment"

        unionfs -o cow -o umask=000 $srcdir/out=RW:$srcdir/pkgsrc=RO:/usr/pkgsrc=RO $srcdir/build

msg "building $_pkgid"
        cd $srcdir/build/misc/$_pkgid

        bmake LIBS=-lnbcompat -I /usr/include/libnbcompat install clean

        fusermount -u $srcdir/build
}

Last edited by W.F.Cody (2011-03-21 12:41:30)


My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!

Offline

Board footer

Powered by FluxBB