Editing PyMaemo/How to build
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
+ | = How to build PyMaemo packages= | ||
+ | |||
+ | |||
+ | == Introduction == | ||
+ | |||
To build PyMaemo packages from the source, you'll need: | To build PyMaemo packages from the source, you'll need: | ||
* Maemo 5 SDK | * Maemo 5 SDK | ||
* Rootstraps for X86 and ARMEL targets | * Rootstraps for X86 and ARMEL targets | ||
- | * pymaemo- | + | * sbdmock |
+ | * grep-dctrl | ||
+ | * pymaemo-builder | ||
- | The scripts from pymaemo- | + | The scripts from pymaemo-builder are used to download packages' sources and build them using sbdmock, one at a time. sbdmock, in turn, uses the SDK and the rootstraps to create a clean environment for building every package. |
- | The | + | The scripts can be used to build the entire set of packages or only some of them, for x86 or ARMEL targets. It is advised to first build and test in the X86 target and use ARMEL target only for cross-compiling for the device. |
== Overview of the build process == | == Overview of the build process == | ||
- | |||
- | |||
* Download phase: | * Download phase: | ||
Line 35: | Line 40: | ||
* http://repository.maemo.org/stable/5.0/i386/maemo-sdk-rootstrap_5.0_i386.tgz | * http://repository.maemo.org/stable/5.0/i386/maemo-sdk-rootstrap_5.0_i386.tgz | ||
- | Clone the pymaemo- | + | Clone the pymaemo-builder project inside $BASE: |
- | $ git clone git | + | $ git clone [git repo] |
- | This will create the directory pymaemo- | + | This will create the directory pymaemo-builder under $BASE. |
- | Edit the | + | Edit the fremantle_i386.cfg and fremantle_armel.cfg under $BASE/pymaemo-builder/sbdmock, |
+ | putting the rootstrap path correspondent to each: | ||
* i386: config_opts['rootstrap'] = "$BASE/rootstraps/maemo-sdk-rootstrap_5.0_i386.tgz" | * i386: config_opts['rootstrap'] = "$BASE/rootstraps/maemo-sdk-rootstrap_5.0_i386.tgz" | ||
* armel: config_opts['rootstrap'] = "$BASE/rootstraps/maemo-sdk-rootstrap_5.0_armel.tgz" | * armel: config_opts['rootstrap'] = "$BASE/rootstraps/maemo-sdk-rootstrap_5.0_armel.tgz" | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
== Building == | == Building == | ||
- | For building all the packages for the X86 target, enter $BASE/pymaemo- | + | For building all the packages for the X86 target, enter $BASE/pymaemo-builder and run: |
- | $ ./build_packages.sh sbdmock: | + | $ ./build_packages.sh sbdmock:fremantle_i386 packages_fremantle.ini |
- | The same can be done to ARMEL target, just replacing "i386" with " | + | The same can be done to ARMEL target, just replacing "i386" with "armel". The |
+ | build script does everything automatically: it downloads all the sources and | ||
+ | builds the packages with sbdmock in the proper order. The file packages_fremantle.ini contains all data necessary for obtaining the sources. | ||
You can build individual packages too, specifying them as parameters. If you want to build only, let's say, pyopenssl and pycurl for the ARMEL target, run: | You can build individual packages too, specifying them as parameters. If you want to build only, let's say, pyopenssl and pycurl for the ARMEL target, run: | ||
- | $ ./build_packages.sh sbdmock: | + | $ ./build_packages.sh sbdmock:fremantle_armel packages_fremantle.ini pyopenssl,pycurl |
Be advised that any PyMaemo dependency for these packages must be built first, as build_packages.sh will attempt to build only the packages provided at the command line. | Be advised that any PyMaemo dependency for these packages must be built first, as build_packages.sh will attempt to build only the packages provided at the command line. | ||
- | There are other options for the build; for more information, run build_packages.sh with no parameters or refer to the README file inside pymaemo- | + | There are other options for the build; for more information, run ./build_packages.sh |
+ | with no parameters or refer to the README file inside pymaemo-builder. | ||
- | When the build finishes the resultant Debian packages will be placed at $BASE/pymaemo- | + | When the build finishes the resultant Debian packages will be placed at |
+ | $BASE/pymaemo-builder/workdir/fremantle_<target>/repo, where <target> is i386 or armel,and the build logs placed in $BASE/pymaemo-builder/workdir/fremantle_<target>/logs. | ||
+ | From that point on, they can be installed on the targets and the ARMEL ones | ||
+ | can be copied to the device to be installed there. | ||
- | + | == Directories created == | |
- | * $BASE/pymaemo- | + | * $BASE/pymaemo-builder/download_cache: all downloaded files are placed here, one directory by package, so you don't have to download everything again in |
- | * $BASE/pymaemo- | + | every build. If the sources are updated, though, you will have to erase the corresponding |
- | + | entry on download_cache for allow them to be downloaded again. | |
- | + | * $BASE/pymaemo-builder/workdir: the generated files (prepared sources, logs, built packages) are placed under this directory, grouped by the name of the | |
- | + | sbdmock config file used to build them. Inside each group, the logs and repo | |
- | + | directories will contain, respectively, the build logs and the built packages. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
== Tips == | == Tips == | ||
- | + | If you want to quickly make a Debian repository for easy installation, | |
- | + | run the following command at $BASE/pymaemo-builder/workdir/fremantle_<target>/repo: | |
- | If you want to quickly make a Debian repository for easy installation, run the following command at $BASE/pymaemo- | + | |
$ apt-ftparchive packages . | gzip -9c > Packages.gz | $ apt-ftparchive packages . | gzip -9c > Packages.gz | ||
- | Now you have to expose the packages' path to the Web server and add the repository in the target machine accordingly. | + | Now you have to expose the packages' path to the Web server and add the repository |
- | + | in the target machine accordingly. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Learn more about Contributing to the wiki.