====== Installing Source Packages ====== ===== pkgsrc ===== [[http://www.netbsd.org/docs/software/packages.html|pkgsrc]] is used to build third-party software. This page describes how to use pkgsrc. Before diving in, you should be aware of a few things: * precompiled binary packages are available for many applications. This can save a lot of time and headaches. See [[.:installingbinarypackages|Installing Binary Packages]] for details. * pkgsrc tracks MINIX. For best results, update the base system to [[.:..:developersguide:trackingcurrent|tracking current MINIX]]. We have currently the following manually maintained lists: * **[[http://git.minix3.org/?p=pkgsrc-ng.git;a=blob;f=minix/limited_list.minimal;h=d904e2228405c6c05937b557580ad1d92ab3b96c;hb=3.3.0|minix/limited_list.minimal]]** Packages which are required for a release of MINIX. * **[[http://git.minix3.org/?p=pkgsrc-ng.git;a=blob;f=minix/limited_list.patched;h=815ba1af1670b270032fd59b126793a675519e25;hb=3.3.0|minix/limited_list.patched]]** Packages which have been explicitly patched for MINIX. ===== Requirements ===== * 1 GB of hard disk space for the pkgsrc tree (as of August 29, 2014). Additional space is required to build software. * 512MB of RAM or more. Some applications such as gcc need more than 512MB of RAM to build. ==== Setting up pkgsrc on MINIX ==== To retrieve the current official repository, type the following as root: # pkgin install git-base digest # cd /usr # make pkgsrc To build software, you will also need to install the development tools (pkgin_sets contains bmake, clang, etc): # pkgin_sets This is all that is needed to prepare the system to build software with pkgsrc. The MINIX installation comes pre-bootstrapped. Do NOT run the bootstrap script that comes with pkgsrc. ==== Updating the pkgsrc Tree ==== To update the pkgsrc tree in the future: # cd /usr # make pkgsrc-update This will download any changes (new versions of packages, patches, etc.). It is important to update your copy of the pkgsrc tree using this method, instead of //git pull//. This update method may perform additional steps, such as updating your //mk.conf// file. ==== Compiling a Package ==== All pkgsrc operations should be done with //bmake//. To build a package, //misc/figlet// in this example, you need to //cd// to that directory and do a //bmake install//. # cd /usr/pkgsrc/misc/figlet # bmake install This installs //figlet// in ///usr/pkg/bin//. If you receive a message "install: exec of strip failed: /usr/bin/strip" test your environmental values: # which strip /usr/pkg/bin/strip # export STRIP=/usr/pkg/bin/strip The default for ///usr/bin/install -s// (as provided in the Makefile) is to use ///usr/bin/strip//, unless an alternative is provided in the environmental value STRIP. ===== Additional Documentation ===== ==== General pkgsrc documentation ==== See the official [[http://www.netbsd.org/docs/pkgsrc/|pkgsrc guide]] for complete details. ==== Contributing ==== If you wish to contribute fixes and patches to pkgsrc, please see [[:HowToContribute]].