Debwright Documentation
The user manual of Debwright, which makes a Debian package (.deb) of your program, checks it, builds it and tests it. This page says what Debwright is, how to build and install it, and how to make your first package. Then it lists the other pages of the manual.
What Debwright is
A Debian package is the file that apt and dpkg install: your program's files, and a few files that describe them. Making one by hand means learning dpkg-deb, dpkg-shlibdeps, the format of the control file, the changelog and the copyright file, and the rules that lintian checks. Debwright knows those rules. You fill in what only you can know, such as the package's name, its description and its license, and Debwright does the rest.
The main window with the Dark theme: the pages at the left, the Description page with how apt show will show the text, and lintian's report of the last build under it.
Debwright keeps everything about one package in a project: a plain text file called <name>.debwright in your program's folder. Keep it in version control with your code, and anyone who has your code can make the same package.
Building and installing
Debwright needs a C compiler, make, pkg-config and the X11 development files:
sudo apt install build-essential pkg-config libx11-dev libxft-dev libxrender-dev libxext-dev \
libxpm-dev libxcursor-dev libfontconfig-dev libfreetype-dev
In Debwright's folder:
make # makes ./debwright
sudo make install # installs it to /usr/bin, with its menu entry and manual page
make clean # removes what make made
To make packages, Debwright runs dpkg-deb (package dpkg), dpkg-shlibdeps (package dpkg-dev), strip (package binutils) and gzip. When lintian is installed, each package is checked with it at the end of the build. Test Install needs mmdebstrap.
Starting
debwright # an empty window: make a new project or open one
debwright myprog.debwright # open this project
debwright ~/src/myprog # a program's folder: its project, or New Project for it
debwright -v # print the version
debwright -h # print the options
man debwright # the manual page, once Debwright is installed
Your first package
- Choose File > New Project (
Control+N) and pick your program's folder. Debwright looks at it: the folder's name becomes the package's name, aMakefile,CMakeLists.txt,meson.buildorconfigurescript gives the build and install commands, and aLICENSEorCOPYINGfile gives the license. If the folder already has a project, that project opens instead. - The guided start asks what the folder can't say, a question at a time: the package's name and maintainer, what the program is, its license, and how it is built. Finish opens the project with your answers.
- Go through the pages at the left. The Problems list at the bottom says what is still missing; click a problem to go to its page.
- Choose File > Save (
Control+S). The project is saved as<name>.debwrightin your program's folder. - Click Build (
Control+B). The Build Log tab at the bottom shows each step as it runs. When the build ends well, the status bar names the .deb. - Click Test Install (
Control+T) to try it in a throwaway Debian, or install it yourself:sudo apt install ./myprog_1.0_amd64.deb. Useapt, notdpkg -i: apt also installs the packages your package depends on.
A program that already has a package can start from it: File > Import from a .deb or File > Import from a debian/ Folder (see Importing).
The pages of the manual
-
How a project begins: the guided start, which asks what the program's folder can't say, one page at a time, and importing a project from a .deb or a debian/ folder that a program already has.
-
The parts of Debwright's window: the menus, the toolbar, the list of pages, the page shown, and the panel under it with the Problems list, the Build Log and the Lintian tab.
-
Every page of a project and every field on it: Package, Description, Build, Files, Desktop, Dependencies, Scripts, Legal, Changelog and Publish.
-
What Build does, step by step, from the clean copy of the source to lintian's report, and how Test Install tries the package in a throwaway system.
-
How one project gets a package for each release of Debian, Devuan and Ubuntu: where the releases come from, sysroots for C programs, build environments for C++ programs, and when they are made again.
-
Sending the packages to folders, signed apt repositories and Forgejo or Gitea package registries, and building many projects at once with Build Several.
-
Debwright's own settings, page by page: The Look, New Projects, Test Install, Downloaded Releases and Publishing Places; and the About window.
-
Every menu item and its key, and the options for using Debwright without its window, from a terminal, an editor or a script.
-
What a project file keeps, section by section, with an example: the file Debwright writes in your program's folder.
Known limitations
- Packages are built for this machine's architecture only.
- A build environment is unpacked for each build, which takes a few seconds.
- Publish doesn't make release entries on a Forgejo, Gitea or GitLab repository's page; the Publish page gives the release notes to paste.
- Test Install downloads the throwaway system each time it runs.
- A build for another release checks Depends against that release's own archive: a package that only your own repository has (such as another of your programs) fails that check, though apt would find it with your repository added.
