Debian package source
One a Debian upstream is ready, it is possible to make a package source from it. This is the role of the maintainer.
Requesting help
You can request one with an RFP bug: https://wiki.debian.org/RFP
It will be useful to the maintainer to know about the dependencies necessary to compile a Lazarus project:
- fpc, lcl, lazarus for all projects
- libqt5pas-dev if the project uses Qt5
debian directory
If you will do the role of the maintainer, or if you would like to check required dependencies, you will need to add the debian folder (in lowercase). Here is the minimal structure:
debian ├─ changelog # changes with previous version ├─ control # description of Debian packages ├─ copyright # copyright information of the source code ├─ rules # build script ├─ watch # file to check for latest version ├─ source │ └─ format # format of this package source └─ upstream └─ metadata # upstream repository information
changelog
The first changelog of your program should be something like (spaces are important):
myproject (1.0-1) unstable; urgency=medium * Initial release. (Closes: #ITP_NUMBER) -- Firstname Lastname <email@server.com> Sun, 1 Nov 2020 15:01:00 +0100
Of course you need to specify myproject, ITP_NUMBER, Firstname, Lastname, email and date. The version of the upstream program here is supposed to be 1.0 but it can be otherwise. The "-1" specifies the version of the package source as there a may be newer version of the package source but based on the same upstream version, in order to fix bugs for example.
You may not have an ITP number yet, as it is a number you will get when you make the request for your package to be added to Debian. If you would like to be the maintainer, here is an example of e-mail to send. In this case the ITP number is 972503: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972503
control
This file gives all the information on the Debian packages, what is needed to build it, etc. This format is a bit different from the one found inside the .deb files.
Source: myproject Section: graphics Priority: optional Maintainer: Firstname Lastname <email@server.com> Build-Depends: fpc, lcl, lazarus, libqt5pas-dev, debhelper-compat (= 13) Rules-Requires-Root: no Standards-Version: 4.5.0 Homepage: https://mywebsite/myproject Vcs-Git: https://github.com/myorg/myproject.git Vcs-Browser: https://github.com/myorg/myproject Package: myproject Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: myoldproject Description: Short description More details, blablabla
Here we suppose it is a graphics application using qt5 and with its repository on GitHub. If the project does not use qt5, you can remove the build-dependency libqt5pas-dev.
Note that the empty line is important. It introduces one package and there can be multiple packages in one package source, for example one for each widgetset and one common package.
copyright
Basically a copyright file contains a reference to all copyrights in the source code, as well as a global copyright for the package and for the debian folder. The first part of the file looks like this:
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: mypackage Upstream-Contact: Firstname Lastname <email@server.com> Source: https://github.com/myorg/myproject Files: * Copyright: 2011-2020 Firstname Lastname <email@server.com> License: GPL-3+ Files: debian/* Copyright: 2011-2020 Maintainer <email@server.com> License: GPL-3+ Files: custompackage1/* Copyright: 2012 Author <mail@server.com> License: LGPL-2+
Then the file contains a new line and the description of the licenses:
License: LGPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2. . 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 Lesser General Public License for more details. . You should have received a copy of the GNU Lesser 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 Lesser General Public License version 2 can be found in the file '/usr/share/common-licenses/LGPL-2'. License: LGPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. . You should have received a copy of the GNU Lesser 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 Lesser General Public License version 2 can be found in the file '/usr/share/common-licenses/LGPL-2'. License: GPL-3+ 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 3 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
Make sure you look for all mention of copyright in the source code (using grep or search in files).
See documentation: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/