pkgsrc is a “ports tree” developed by the NetBSD project and portable to several other operating systems. Support for MirOS has existed since 2006 in the form of a private patch. Since January 2011, MirOS support is contained in the upstream pkgsrc repository.
pkgsrc allows the easy installation of third-party software not contained in the base system. It is very similar to MirPorts, the ports framework developed by the MirOS project, “native” on MirOS. However, pkgsrc generally contains more and newer software.
For more information on pkgsrc, see http://www.pkgsrc.org/.
MirPorts and pkgsrc can be installed and used in parallel. However, there is one caveat: the package tools are incompatible but they have the same names. Thus, when installing packages, you must assure that the right ones are used. Moreover, when bootstrapping pkgsrc on MirOS, the MirPorts directories (normally /usr/mpkg/bin and /usr/mpkg/sbin) must not be in your PATH.
Pre-built binary packages of the pkgsrc-2013Q1 branch (from April 2013), built for recent MirOS-current, are available. They can be used even if you did not install a compiler on the system. The binary repository contains about 7000 packages. The packages have been built with /usr/pkg as the prefix and /usr/pkg/var as VARBASE so that they are self-contained. You need root rights to use these packages. pkgsrc can also be installed as an unprivileged user but you will need to build from source in this case.
To install pkgsrc from binary packages, follow these steps:
- Download the bootstrap kit:
- Extract the file:
cd / ; sudo tar xvpzf /path/to/bootstrap.tar.gz
- Set the PATH:
(Add this line to your .profile to make the change permanent.)
- Update the package list for pkgin, the binary package manager:
- Install the desired package(s), for example:
pkgin install python27
Installation from source
- Check out pkgsrc, for example to /usr/pkgsrc:
cd /usr ; cvs -qd firstname.lastname@example.org:/cvsroot co -P pkgsrc
- As above, prepend the pkgsrc directories to the PATH: export PATH=/usr/pkg/bin:/usr/pkg/sbin:$PATH
- Bootstrap pkgsrc. In this example, we install (using sudo) into
/usr/pkg. The dbdir should be inside the prefix to avoid conflicts
./bootstrap --prefix /usr/pkg --pkgdbdir /usr/pkg/db
- pkgsrc can be configured by editing the /usr/pkg/etc/mk.conf file. See the pkgsrc Guide for details.
- To build and install a package, use the bmake command. For example,
to install Perl:
bmake package-install clean