diff options
Diffstat (limited to 'doc/pkg')
-rw-r--r-- | doc/pkg/dev-env.mdwn | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/doc/pkg/dev-env.mdwn b/doc/pkg/dev-env.mdwn new file mode 100644 index 0000000..a507e84 --- /dev/null +++ b/doc/pkg/dev-env.mdwn @@ -0,0 +1,96 @@ +[[!meta title="Setting up a ProteanOS Package Development Environment"]] + +This guide will explain how to set up a ProteanOS development system for +building software packages under chroot. + +Note that to build packages under chroot 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 or FTP, e.g.: + + $ wget http://files.proteanos.com/pub/prokit/1.0.0-beta1/prokit-1.0.0-beta1.tar.gz + $ tar -xzf prokit-1.0.0-beta1.tar.gz + $ cd prokit-1.0.0-beta1/ + +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 + +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: + + $ man prokit + +Or, if you didn't install prokit, run: + + $ man man/prokit.1 + +[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. + +[ob-gencontrol-bug]: http://git.proteanos.com/opkbuild/opkbuild.git/commit/?id=bbbbd29 |