Wiki copymirror

This is a mirror of the wiki at pascal.chat. Editing, history and sign-in are there.

Publish project on Launchpad

Launchpad is default Ubuntu build system. It allows us to register own project and let build server build our application. But web interface is overcomplicated and it is not easy to setup build of Lazarus project. Here this wiki pages can help.

It is not simply possible to get own application package immediately directly to standard Ubuntu packages. Such package needs to comply with several rules to be accepted as standard distribution package. But Launchpad also supports PPA (Personal Package Archives) which is place where non distribution packages can be prepared.

Build package on Launchpad

control file:

pascal
Source: project-name
Maintainer: Username <email@email.xx>
Section: utils
Priority: optional
Standards-Version: 1.0.0
Build-Depends: fpc, lazarus, lcl, lcl-utils, debhelper (>= 8)
pascal
Package: project-name
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
Description: Short description of package.
HomePage: http://project-homepage.xx/

For section you can use only predefined strings. See question here http://askubuntu.com/questions/722597/what-packages-sections-are-available-for-trusty

rules file:

make
#!/usr/bin/make -f

# Set temporary HOME for lazarus primary config directory
export HOME=$(CURDIR)/tmphome

ROOT = $(CURDIR)/debian/project-name

override_dh_auto_clean:
    $(RM) -r lib
    $(RM) lib *.res project-name

override_dh_auto_build:
    lazbuild --build-mode=Release project-name.lpi

override_dh_auto_install:
    install -d -m 755 $(ROOT)/usr/bin
    install -s -m 755 project-executable $(ROOT)/usr/bin
    install -d -m 755 $(ROOT)/usr/share/applications
    install -m 644 project-name.desktop $(ROOT)/usr/share/applications
    install -d -m 755 $(ROOT)/usr/share/pixmaps
    install -m 644 project-name.png $(ROOT)/usr/share/pixmaps
    install -d -m 755 $(ROOT)/usr/share/project-name/i18n
    install -D -m 644 i18n/*.po $(ROOT)/usr/share/project-name/i18n

%:
    dh $@

changelog file:

pascal
project-name (1.0.0-1) precise; urgency=low
pascal
* Original version 1.0.0 packaged with lazdebian
pascal
-- Username <email@email.xx>  Sun, 27 Nov 2016 00:51:08 +0100

copyright file:

pascal
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
pascal
Files: *
Copyright: 2016 Creator name
License: GPL-2+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 at your option) any later version.
 .
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.
 .
 You should have received a copy of the GNU General Public License along
 with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 .
 On Debian systems, the full text of the GNU General Public
 License version 2 can be found in the file
 /usr/share/common-licenses/GPL-2

compact file:

pascal
8

source/format:

pascal
3\.0 (quilt)

Build package locally

You can also build your deb package locally outside of launchpad. Just create script called for example build.sh. This script will copy your project files with debian subdirectory to temporary directory where build process will be started and new deb package created.

bash
#!/bin/bash

BUILD_ROOT=/tmp/build-root/application-name
mkdir -p $BUILD_ROOT
cp -r -f . $BUILD_ROOT
cd $BUILD_ROOT
dpkg-buildpackage -b -rfakeroot -us -uc

After execution new package will be placed in /tmp/build-root.

LazPackager

Is Lazarus IDE extension which helps to create and build deb packages.

Download: https://github.com/prof7bit/LazPackager

See also

External links


From the Free Pascal wiki, page "Publish project on Launchpad", as it stood on 2020-02-29 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .