(Pre-requisites: Remove required OSes hint and mention web interface alternative) |
(restructuring of page) |
||
| Line 10: | Line 10: | ||
* As an alternative to osc you may use the web interface to upload your files | * As an alternative to osc you may use the web interface to upload your files | ||
| - | =Setting up your home project= | + | =Preparations= |
| + | |||
| + | 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'''. | ||
| + | |||
| + | ==Setting up your home project== | ||
Your home project is like a home directory in which you can create sub-projects, repositories, etc. | Your home project is like a home directory in which you can create sub-projects, repositories, etc. | ||
| Line 16: | Line 20: | ||
* Visit the OBS page (https://build.pub.meego.com) | * Visit the OBS page (https://build.pub.meego.com) | ||
* Log in and click on 'create home project' (down at the bottom of the page iirc) | * Log in and click on 'create home project' (down at the bottom of the page iirc) | ||
| - | |||
| - | |||
| - | |||
==Creating a project== | ==Creating a project== | ||
| Line 30: | Line 31: | ||
* Click "Save Changes" | * Click "Save Changes" | ||
| - | ==Setting up a sub-project== | + | ==Setting up a sub-project (optional)== |
A sub-project allows you to group related activities together. | A sub-project allows you to group related activities together. | ||
| Line 42: | Line 43: | ||
As Harmattan OBS support is still in development, you can [http://forum.meego.com/showpost.php?p=25005&postcount=29 add it through the advanced interface]. | As Harmattan OBS support is still in development, you can [http://forum.meego.com/showpost.php?p=25005&postcount=29 add it through the advanced interface]. | ||
| - | + | =Adding files to a package and building them= | |
| + | |||
| + | ==Needed files== | ||
| + | |||
| + | ===MeeGo=== | ||
| + | For MeeGo you need a .spec file and a tarball containing your source code, etc. | ||
| + | |||
| + | ===Harmattan=== | ||
| + | For Harmattan you need a <code>.dsc</code> file, source tarball and <code>.debian.tar.gz</code> (this allows one to keep the debian directory out of the source). The source is extracted using <code>dpkg-source -x ....dsc</code>, so restrictions on file formats apply (e.g. <code>mypkg_1.0.0.tar.gz</code>, <code>mypkg_1.0.0.dsc</code>, <code>mypkg_1.0.0.debian.tar.gz</code>) | ||
| + | |||
| + | Alternatively, you may just use the <code>.dsc</code> together with a <code>.tar.gz</code> file containing both, the sources and the debian directory. | ||
| + | |||
| + | ==Start building== | ||
===From the terminal=== | ===From the terminal=== | ||
| Line 49: | Line 62: | ||
* Add files to your local copy | * Add files to your local copy | ||
| - | |||
| - | |||
osc add [filename] | osc add [filename] | ||
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.
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.