| 3 | | == Restore Problems == |
| | 3 | = Building Packages for Debian (and Derivatives) = |
| | 4 | |
| | 5 | == Prepare == |
| | 6 | |
| | 7 | To be able to build Debian packages, install the following packages to start with: |
| | 8 | - '''build-essential''' |
| | 9 | - '''fakeroot''' |
| | 10 | |
| | 11 | == Download == |
| | 12 | |
| | 13 | Firstly, download the package sources from: |
| | 14 | |
| | 15 | [http://packages.debian.org/] |
| | 16 | |
| | 17 | or my download site for the bleeding edge (in Debian packages): |
| | 18 | |
| | 19 | [http://people.debian.org/~andree/packages/] |
| | 20 | |
| | 21 | You need to download the following three files for every package you want to build: |
| | 22 | - '''<package>_<upstream version>.orig.tar.gz''' |
| | 23 | - '''<package>_<upstream version>-<package version>.diff.gz''' |
| | 24 | - '''<package>_<upstream version>-<package version>.dsc''' |
| | 25 | |
| | 26 | == Unpack == |
| | 27 | |
| | 28 | To create the build directory with the package source run: |
| | 29 | {{{ |
| | 30 | dpkg-source -x <package>_<upstream version>-<package version>.dsc |
| | 31 | }}} |
| | 32 | |
| | 33 | == Build == |
| | 34 | |
| | 35 | Change into the newly create directory named '''<package>-<upstream version>''' and run: |
| | 36 | {{{ |
| | 37 | dpkg-buildpackage -rfakeroot -us -uc > /tmp/build-<package>.log |
| | 38 | }}} |
| | 39 | |
| | 40 | '''Note:''' The above command may fail because build dependencies are not fulfilled. If the build fails, read the error message carefully and install any missing packages. |
| | 41 | |
| | 42 | '''Note:''' Appart from missing build-dependencies, there may be other issues building the packages on Debian derivatives or older versions of Debian. Often, toning down the dependencies defined in '''debian/control''' inside the build directory can help here. However, this is a bit more advanced. |
| | 43 | |
| | 44 | == Install == |
| | 45 | |
| | 46 | In the parent of the build directory run: |
| | 47 | {{{ |
| | 48 | dpkg -i mindi_<package>-<upstream version>_<arch>.deb |
| | 49 | }}} |
| | 50 | |
| | 51 | '''Note:''' The above command may fail because binary dependencies are not fulfilled. If the install fails, read the error message carefully and install any missing packages. |
| | 52 | |
| | 53 | == Further Reading == |
| | 54 | |
| | 55 | For more, information about the fascinating world of Debian packaging, please have a look here: |
| | 56 | |
| | 57 | [http://www.debian.org/doc/maint-guide/] |
| | 58 | |
| | 59 | and for a more comprehensive overview here: |
| | 60 | |
| | 61 | [http://www.debian.org/doc/developers-reference/] |
| | 62 | |
| | 63 | For all information about Debian development including but not limited to package manangement, please see here: |
| | 64 | |
| | 65 | [http://www.debian.org/devel/] |
| | 66 | |
| | 67 | = Restore Problems = |