| | 1 | This guide is for rebuilding IPlinux from scratch, without using any repositories. You probably want the [wiki:Porting] instead. |
| | 2 | |
| | 3 | == host/tools == |
| | 4 | |
| | 5 | 1. Install the Debian Lenny chroot (all the following steps are to be performed in this chroot): |
| | 6 | {{{ |
| | 7 | sudo debootstrap lenny ip http://ftp.de.debian.org/debian |
| | 8 | sudo sh -c "echo LANG=C >> ip/etc/bash.bashrc" |
| | 9 | sudo chroot ip /bin/bash |
| | 10 | }}} |
| | 11 | 1. Install a few development packages: |
| | 12 | {{{ |
| | 13 | apt-get update |
| | 14 | apt-get install git-core build-essential dpkg-cross debhelper pkg-config po4a libncursesw5-dev zlib1g-dev libbz2-dev flex libselinux1-dev libio-string-perl quilt autoconf automake cvs gawk dpatch texinfo sharutils libgmp3-dev libmpfr-dev lsb-release realpath cdbs docbook-to-man sudo dbs |
| | 15 | }}} |
| | 16 | 1. Create a new user account and give it a passwordless sudo. It's a chroot, but your gut feeling probably won't let you compile as root anyway: |
| | 17 | {{{ |
| | 18 | useradd -m build |
| | 19 | echo 'build ALL=NOPASSWD: ALL' >> /etc/sudoers |
| | 20 | #echo 'export DEB_BUILD_OPTIONS="parallel=3"' >> /home/build/.bashrc |
| | 21 | su - build |
| | 22 | }}} |
| | 23 | |
| | 24 | 1. Clone our `dpkg`, `dpkg-cross`, `debootstrap` and `toolchain-package` gits, build and install them (using regular tools): |
| | 25 | {{{ |
| | 26 | for i in dpkg dpkg-cross debootstrap toolchain-package; do |
| | 27 | git clone git://git.iplinux.org/$i.git |
| | 28 | done |
| | 29 | }}} |
| | 30 | {{{ |
| | 31 | for i in dpkg dpkg-cross toolchain-package debootstrap; do |
| | 32 | (cd $i; dpkg-buildpackage -b -us -uc) |
| | 33 | done |
| | 34 | sudo dpkg -i dpkg_*.deb dpkg-dev_*.deb toolchain-package_*.deb dpkg-cross_*.deb libdebian-dpkgcross-perl_*.deb debootstrap_*.deb |
| | 35 | }}} |