pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_comp: MOUNT_HOOKS example?



Hi,

On Tue, 30 Sep 2008 16:21:42 +0900, Emmanuel Dreyfus 
<manu%netbsd.org@localhost> wrote:

> Is there an example of how pkg_comp hooks should work? I tried various
> thing, but it seems to be ignored anyway.
>
> My goal is to add a directory of local patches in the chroot area. I
> want to use them with mk.conf's LOCALPATCHES. But perhaps there is another
> was than using the hooks?

My config to cross build with pkg_comp may help you:

% cat ~/pkg_comp/cross.conf
DESTDIR=/var/chroot/pkg_comp/cross
DISTRIBDIR=/var/pub/NetBSD/NetBSD-4.0/i386
NETBSD_RELEASE=4.0
REAL_PACKAGES=/usr/pkgsrc/packages/4.0/m68k
MOUNT_HOOKS=~/bin/crossmount.sh
UMOUNT_HOOKS=~/bin/crossmount.sh

%cat ~/bin/crossmount.sh
#! /bin/sh
toolsdir=/var/tmp/obj/tooldir.NetBSD-4.0-i386
destdir=/var/tmp/obj/destdir.mac68k
DESTDIR="$1"
case "$2" in
        mount)
mkdir -p ${toolsdir}
mount -t null -o ro ${toolsdir} ${DESTDIR}${toolsdir}
mkdir -p ${destdir}
mount -t null -o rw ${destdir} ${DESTDIR}${destdir}
        ;;
        umount)
umount ${DESTDIR}${toolsdir}
umount ${DESTDIR}${destdir}
        ;;
        *)
esac
exit 0

-- 
"Of course I love NetBSD":-)
OBATA Akio / obache%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index