Refer to The pkgsrc guide as necessary. Section 4.2 (Building packages from source) in particular is useful. Pre-compiled binaries for the latest version of NetBSD/atari aren't currently available.
NetBSD 6+ provides the ability to download/install pkgsrc during installation. To update pkgsrc, perform the following steps:
- su to root.
- cd ~
- ftp ftp://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.gz (If you're behind a proxy, a mirror such as ftp2.us.NetBSD.org tends to work better.)
- cd /usr
- If the pkgsrc was already installed, delete the old installation.
- rm -rf pkgsrc
- progress -zf ~/pkgsrc.tar.gz tar xpf -
- Exit out of root.
To set up package vulnerability checking, perform the following steps:
- su to root.
- If /var/db/pkg doesn't already exist:
- mkdir /var/db/pkg
- pkg_admin rebuild
- pkg_admin fetch-pkg-vulnerabilities
- To enable optimized builds with pkgsrc / make, see the note in Basic post-install about editing your /etc/mk.conf file.
- To update the vulnerability database daily, vi /etc/daily.conf and add:
- fetch_pkg_vulnerabilities=YES
- Exit out of root.
Now you're ready to start building / installing packages! Generally speaking, to build/install something, do this:
The dash preceding the third option above disables that option.
- cd /usr/pkgsrc/[package dir]/[package name]
- make show-options
- sudo make PKG_OPTIONS.[package name]="option1 option2 -option3" install
(The dash preceding the third option above disables that option.) - To clean up after an install, run "sudo make clean" and "sudo make clean-depends" as necessary.
Notes:
- After any particular package is installed, use "rehash" as necessary to run binaries that were installed into the search path without a logon/logoff.
- After building, binary packages will land in /usr/pkgsrc/packages/All. These can be saved off to an FTP or HTTP server and then re-installed later as necessary. To install these packages later, do this:
- su to root
- setenv PKG_PATH ftp://server/path
- pkg_add [package name]
- Exit out of root.