[[!meta title="Setting up a ProteanOS Package Development Environment"]] [[← Back to Package Development Tutorials|doc/pkg]] This guide will explain how to set up a ProteanOS development system for building software packages under **chroot**(8). Note that to run ProteanOS under **chroot**(8) you need a system running Linux 3.4 or later. These instructions have been tested on a Debian GNU/Linux 7.0 (wheezy) system with Linux 3.12 from wheezy-backports. The ProteanOS Development Kit uses the **chroot**(8) and **mount**(8) commands, which on Linux require superuser access. This guide assumes the use of **sudo**(8) for running commands with superuser privileges. Adjust where necessary if you don't use **sudo**(8). Installing the ProteanOS Development Kit ======================================== First you'll need to get prokit, the [[ProteanOS_Development_Kit|dev/prokit]]. This toolkit can install a ProteanOS system, run a ProteanOS shell and other commands, manage software packages on an installed ProteanOS system, and build packages for ProteanOS (with build dependencies automatically installed and removed). Ensure you have a **make**(1) utility such as GNU Make installed. No C or C++ compiler or other development tools are necessary to build prokit. Download a released version of prokit from the files site by [HTTP][prokit-http] or [FTP][prokit-ftp], e.g.: $ wget http://files.proteanos.com/pub/prokit/1.0.0/prokit-1.0.0.tar.gz $ tar -xzf prokit-1.0.0.tar.gz $ cd prokit-1.0.0/ Or clone it from the [Git repository][prokit-git]: $ git clone git://git.proteanos.com/prokit/prokit.git $ cd prokit/ Configure and build prokit: $ ./configure $ make Or, if you cloned the Git repository, run: $ ./autogen.sh $ make To build from the repository you'll need to have GNU Autoconf and Automake installed. It is recommended but not necessary that you install prokit to your system: $ sudo make install Check that the installation was successful: $ prokit version Or, if you didn't install prokit, run: $ src/prokit version Refer to the [[**prokit**(1)_manual_page|dev/prokit/prokit.1]]: $ man prokit Or, if you didn't install prokit, run: $ man man/prokit.1 [prokit-http]: http://files.proteanos.com/pub/prokit/ [prokit-ftp]: ftp://files.proteanos.com/pub/prokit/ [prokit-git]: http://git.proteanos.com/prokit/prokit.git/ Install a ProteanOS Development System ====================================== Now you can install a ProteanOS system into a directory in your file system. Decide where to install ProteanOS and run: $ sudo prokit install dev/trunk $root `$root` is the directory you chose. You may see some warnings such as: prokit: Warning: root/var/lib/opkg/lists/proteanos_dev_trunk_i686-linux-glibc_all_base(l324): badly formatted control field prokit: Warning: root/var/lib/opkg/lists/proteanos_dev_trunk_all_all_base(l689): badly formatted control field prokit: Warning: root/var/lib/opkg/lists/proteanos_dev_trunk_all_all_base(l709): badly formatted control field prokit: Warning: root/var/lib/opkg/lists/proteanos_dev_trunk_src_all_base(l310): badly formatted control field This is an issue in opkbuild which has been [fixed in the Git repository][ob-gencontrol-bug] and will be fixed in ProteanOS soon. It can safely be ignored. Next install all of the toolchain packages commonly used to build ProteanOS packages: $ sudo prokit shell $root 'opkg install build-essential-$(cat /etc/proteanos_arch)' This may take a while, depending on your network connection. Now you're ready to [[build_ProteanOS_packages|doc/pkg/basic-expat]]! [ob-gencontrol-bug]: http://git.proteanos.com/opkbuild/opkbuild.git/commit/?id=bbbbd29