Subject: Re: using NetBSD pkgsrc on Linux/Solaris
To: None <tech-pkg@netbsd.org>
From: Kimmo Suominen <kim@tac.nyc.ny.us>
List: tech-pkg
Date: 09/20/1999 04:26:34
I just bootstrapped zoularis and pkgsrc on Solaris 2.6, and while doing
that fixed a couple of things in zoularis and made notes for writing some
documentation about the process.

You'll need gcc installed properly to start with, and either GNU patch or
GNU tar.  You'll also need a copy of NetBSD basesrc available (or at least
selected bits).  This will get you (more than) enough bits of basesrc via
rsync:

    for d in \
	src/bin/ls \
	src/include \
	src/lib/libc \
	src/lib/libedit \
	src/lib/libskey \
	src/lib/libterm \
	src/lib/libutil \
	src/share/me \
	src/share/mk \
	src/share/tmac \
	src/sys/arch/sparc \
	src/sys/netinet \
	src/sys/sys \
	src/usr.bin/cksum \
	src/usr.bin/man \
	src/usr.bin/make \
	src/usr.bin/ftp \
	src/usr.sbin/mtree \
	src/usr.sbin/pkg_install
    do
	mkdir -p ${d}
	rsync -CHrltz --delete -v \
	    rsync.netbsd.org::NetBSD/NetBSD-current/${d}/ \
	    ${d}
    done

Check zoularis/bsd/Makefile.inc (set install patsh and other options per
your host operating system -- be sure to use gcc).  Then you can compile
zoularis (it installs itself, too).

Make sure your mk.conf (in /etc, or wherever MKCONF points to in your
environment) sets CC=gcc (or I use "gcc -pipe" for speed), and make sure
you are not asking for compressed man pages (bsd.pkg.mk cannot handle
that on Solaris, i.e. no MANZ or MANCOMPRESSED settings).  You can set
LOCALBASE (I like /usr/pkg) and X11BASE, if you wish.

Then install the following packages for the normal pkgsrc tree:

    (cd archivers/gzip-base && bmake install)
    (cd archivers/gtar-base && bmake install PATCH=patch)
    (cd devel/patch && bmake install)
    (cd devel/gtexinfo && bmake install)

If you install patch before gtar-base you'll need to use this:

    (cd devel/patch && bmake install GTAR=gtar)

If patch or gtar are not on your PATH please specify the full pathname for
them instead (e.g. PATCH=/usr/local/gnu/bin/patch).

At this point you are up and running well.  The following two are optional
but I like to have the docs:

    (cd archivers/gzip && bmake install)
    (cd archivers/gtar && bmake install)

Now you can install any packages you wish.  However, as Hubert already
noted, not all packages compile without problems on non-NetBSD systems.
Contributions to fix those are most welcome.

I've made binary packages available (using /usr/pkg as the base) at

    ftp://ftp.gw.com/pub/unix/zoularis/

Note, however, that with the current base available you will not be able
to install binary packages (there is a slight problem with how pkg_add
calls gtar).  I'm hoping to have a new base snapshot available by Tuesday.

Cheers,
+ Kim


itojun@iijlab.net writes:

| 	Sorry for dumb question....
| 	Looking at bsd.pkg.mk, the pkgsrc collection seess to work on Linux
| 	and Solaris.  Are there any instructions on doing these?  A friend
| 	of mine is doing pkgsrc/ports-alike for bsdi, and it would be better
| 	if we can use NetBSD pkgsrc on top of bsdi.
| 	I could not find documentation on www.netbsd.org (maybe my search
| 	keyword is wrong).
| 
| itojun
-- 
Kimmo Suominen