Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


Pkgsrc configuration (cross UNICES)
pkgsrc is NetBSD's package system. It may nevertheless be used on other operating systems.
Note. some pkgsrc managers :
- pkgmanager (
- pkgin, a tool to manage pkgsrc binary packages (
Usage -- binaries
To install a binary package from the official NetBSD repository,
export PKG_PATH=ftp: //
export PASSIVE_FTP=yes
pkg_add -v pwgen
Fetch the pkgsrc tree by FTP
Get pkgsrc by FTP,
ftp -a ftp: //
tar xzf pkgsrc.tar.gz -C /usr
Fetch the pkgsrc tree by CVS
Or to get it from CVS,
export CVS_RSH=ssh
cd /usr
cvs -q co -P pkgsrc
and then,
cd /usr/pkgsrc
cvs -q up -dP
Pkgsrc configuration
Configure pkgsrc,
cd /etc
ln -s /usr/pkg/etc/pkg_install.conf
vi mk.conf  #new file
add/adapt those variables accordinly, \ \ \
Note. I heard a more recent way to deal with master sites is to use those,
Define your prefered mirror for daily vulnerability list download,
vi /usr/pkg/etc/audit-packages.conf  #new file
VUL_SOURCE="ftp: //"
Building binaries
Build a package binary
cd /usr/pkgsrc/sysutils/pwgen
make package
ls -l /usr/pkgsrc/packages
Note. it's possible to build quite a repository like this without even messing with the bulk script
Note you can now make it available through FTP and use that binary from another slackware
To build the whole tree, edit bulk.conf and execute Here's a little wrapper,
export PATH
cd /usr/pkgsrc/mk/bulk
sh build --config /usr/pkgsrc/mk/bulk/build.conf -r
Note. some trick to show package dependencies quite quickly,
make clean-depends
Native NetBSD Firefox package works (linux emul doesn't as of today : segfault), use Flash via "nspluginwrapper". Works even on NetBSD/amd64.
Additional mk.conf examples
Some more options (most of them are probably outdated),
CPU flags
Note. you may play with CPU optimizations too. Those are just examples, it might break things,
#CFLAGS+=-O2 -march=i686 -mcpu=i386
#CXXFLAGS=-O2 -march=i686 -mcpu=i386
#COPTS+=-O2 -mcpu=i686 -fexpensive-optimizations -ffast-math -msoft-float \
# -fmemoize-lookups -fthread-jumps -m486 -fomit-frame-pointer \
# -finline-functions
but it's preferable to use the relevant cpuflags package but I'm hearing it doesn't work for the latest CPUs,
note. gentoo's optimization pages may be worth visiting too :
- Gentoo Compilation Optimization Guide :
- Gentoo CFLAGS :
Pkgsrc's Home Page :
Pkgsrc's CVS frontend :
Pkgsrc guide :
Some great web pkgsrc browser :
pkgmanager :
pkgin, a tool to manage pkgsrc binary packages :

(obsolete, see the new doc)