Be sure to replace ppa:yourppa/name with your PPA. Finally you upload the package with dput to launchpad. Then the package is created from within the folder “greet-the-world”. tar.gz of your original source code and name it greet-the-world_0.1. Now you’re ready to upload your first package to launchpad! Just a few steps are needed to do so. Create and personalise your launchpad account.You will have to do some nasty stuff then - like uploading RSA-keys, signing the Ubuntu Code of Conduct and sharing OpenPGP-keys - but this is well documented at the launchpad help pages. If you don’t already have one, please create one now. The project is ready to be uploaded to launchpad! Therefore you will have to have a launchpad account. Now, all necessary files have been created. You should have received a copy of the GNU General Public LicenseĪlong with this program. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. WITHOUT ANY WARRANTY without even the implied warranty of This program is distributed in the hope that it will be useful, but The Free Software Foundation, either version 3 of the License, or It under the terms of the GNU General Public License as published by This program is free software: you can redistribute it and/or modify It does not follow any structure and can contain everything you want. The last file contains your copyright information. The date string can be obtained by the terminal command date -R. Please change the date and the e-mail address accordingly. Mind the two spaces after your e-mail address! Without them, your package will be rejected! The last line has to be exactly like it is shown there. Then there can be multiple lines containing the change log information. The first line specifies for what distribution your package is made and its version. wget greet-the-world (0.1-0ppa0 ) oneiric urgency =low It contains some information on what you have done since the last release. You don’t need to alter the content of this file. When this succeeds, the package will be build with the target “binary-arch”. It will create a build directory, change to it, execute CMake (with the install prefix set to a directory inside the debian directory) and compile the application. Then launchpad will execute “build”, which does the same thing as we tested above. PHONY: binary binary-arch binary-indep clean Make -C $(BUILDDIR ) # thirdly called by launchpadĬd $(BUILDDIR ) cmake -P cmake_install.cmake Mkdir $(BUILDDIR ) cd $(BUILDDIR ) cmake -DCMAKE_INSTALL_PREFIX =./debian/tmp/usr. It is basically a normal makefile with some special targets, which are invoked by launchpad. It tells launchpad how to exactly compile your application. The second file, “rules”, is very important, too. You’ll have to write your name and e-mail address to the appropriate fields. The second part is the configuration for the resulting binary package. The first section of the file describes the source package. It specifies which packages are needed for building your package, what it is called and some information on you. Open a text editor of your choice and paste the following code into it. A minimal application with CMakeįirst create an empty directory called “greet-the-world”. You can install them with the following command: sudo apt-get install build-essential cmake devscripts 2. The software requirements are CMake, the GCC and some packaging scripts. Even if I will provide copy&paste code snippets, I won't explain how CMake works on a general basis. The tutorial assumes you have knowledge in a programming language supported by CMake and in CMake itself. This source package will contain a minimal application written in C++ which gets configured with CMake. This tutorial will show you how to create and upload a source package to launchpad. These archives can easily be added to the software sources of any Ubuntu-based Linux distribution, making it very easy to install the software on end-user systems. Developers can upload source code to this archive which then will be build automatically for various releases of Ubuntu in a 32 bit and a 64 bit version. So first of all - for those not knowing it - what is a PPA?Ī PPA is a Personal Package Archive hosted on launchpad. Please remark that I don’t have inside knowledge on what is going on here - it is the result of trial and error, but it works as supposed! So let’s get started… 1. With this tutorial I want to help those being in a similar situation I was some months ago. uses CMake and I did not find any resource how to create a source package which launchpad would compile. It was barely documented, unnecessarily complex and - the worst thing of all - if there was a tutorial, it employed rather old build tools and no guide covered code generated with CMake. When I first wanted to create a PPA for Ubuntu, it was a pain.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |