The MeeGo Open Build System (OBS) seems rather complicated, this page will attempt to make it nice and easy to get started. See also the Mer project's documentation on application building with OBS.
It's a work in progress, feel free to add and modify!
Contents |
apt-get install osc may work out-of-the-box on recent versions of Ubuntu & Debian, other repositories are available on openSUSE tools)
OBS is based around projects, packages and repositories. Packages have a set of files (source code, packaging meta-data, etc.) which are compiled by build servers against particular distributions. Each distribution results in your code being available in a repository.
Your home project is like a home directory in which you can create sub-projects, repositories, etc.
A project is required before anything can be built.
A sub-project allows you to group related activities together.
As Harmattan OBS support is still in development, you can add it through the advanced interface.
For MeeGo you need a .spec file and a tarball containing your source code, etc.
For Harmattan you need a .dsc file, source tarball and .debian.tar.gz (this allows one to keep the debian directory out of the source). The source is extracted using dpkg-source -x ....dsc, so restrictions on file formats apply (e.g. mypkg_1.0.0.tar.gz, mypkg_1.0.0.dsc, mypkg_1.0.0.debian.tar.gz)
Alternatively, you may just use the .dsc together with a .tar.gz file containing both, the sources and the debian directory.
To get the files needed for building you may add a custom build step:
C:\QtSDK\Madde\wbin\mad.cmd
%{buildDir}
-t harmattan-platform-api dpkg-buildpackage -sa -S -uc -us -Imoc -Iobj -Ircc -Iui -I.svn -I*.deb -I*.changes -Iqtc_packaging -IMakefile -I*.pro.user -I<packagename>
Notice that most of the command arguments remove unneccessary files from the tar package. They are not mandatory but reduce file size.
You will get the resulting <packagename>-<version>.tar.gz and <packagename>-<version>.dsc (together with a non-needed <packagename>-<version>.source.changes) in the directory above the source directory.
osc -A https://api.pub.meego.com co home:[username]
osc add [filename]
osc commit
At this point the OBS will try to build your project remotely. You can also build locally by doing osc build
If you add new packages later on or commit changes from another computer you can update your local copy by doing
osc update
Main article: Zypper#Adding_a_repository
zypper ar -f http://repo.pub.meego.com/home:/username/repository/ title zypper in <package>
/etc/apt/sources.list.d/project.list (where project is a memorable name, e.g. your username for your home project), containing the download link, prefixed with deb and suffixed by ./. For example:
deb http://repo.pub.meego.com/home:/jaffa/Harmattan/ ./
apt-get update apt-get install package
Updates to the installed applications will appear at Settings > Applications > Manage Applications > Updates
Enable Extras-devel.