PageSourceSearch

https://xbps-src-tutorials.github.io/packaging/j4-dmenu-desktop.html

html xbps-src-tutorials.github.io collected 2026-10-03 10:11:18 UTC 250,647 bytes, 3,948 lines download raw bytes

1<!DOCTYPE HTML>
2<html lang="en" class="ayu" dir="ltr">
3    <head>
4        <!-- Book generated using mdBook -->
5        <meta charset="UTF-8">
6        <title>Packaging j4-dmenu-desktop - xbps-src tutorials</title>
7
8
9        <!-- Custom HTML head -->
10        <!-- See https://github.com/darkreader/darkreader/blob/main/CONTRIBUTING.md#disabling-dark-reader-statically -->
11        <meta name="darkreader-lock">
12
13        <meta name="description" content="Collection of xbps-src packaging tutorials for Void Linux.">
14        <meta name="viewport" content="width=device-width, initial-scale=1">
15        <meta name="theme-color" content="#ffffff">
16
17        <link rel="icon" href="../favicon.svg">
18        <link rel="stylesheet" href="../css/variables.css">
19        <link rel="stylesheet" href="../css/general.css">
20        <link rel="stylesheet" href="../css/chrome.css">
21        <link rel="stylesheet" href="../css/print.css" media="print">
22
23        <!-- Fonts -->
24        <link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
25        <link rel="stylesheet" href="../fonts/fonts.css">
26
27        <!-- Highlight.js Stylesheets -->
28        <link rel="stylesheet" href="../highlight.css">
29        <link rel="stylesheet" href="../tomorrow-night.css">
30        <link rel="stylesheet" href="../ayu-highlight.css">
31
32        <!-- Custom theme stylesheets -->
33        <link rel="stylesheet" href=".././cache//catppuccin-admonish.css">
34        <link rel="stylesheet" href=".././cache//catppuccin.css">
35        <link rel="stylesheet" href=".././cache//mdbook-admonish.css">
36
37    </head>
38    <body class="sidebar-visible no-js">
39    <div id="body-container">
40        <!-- Provide site root to javascript -->
41        
41<script>
42            var path_to_root = "../";
43            var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "ayu" : "ayu";
44        </script>
44
45
46        <!-- Work around some values being stored in localStorage wrapped in quotes -->
47        
47<script>
48            try {
49                var theme = localStorage.getItem('mdbook-theme');
50                var sidebar = localStorage.getItem('mdbook-sidebar');
51
52                if (theme.startsWith('"') && theme.endsWith('"')) {
53                    localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
54                }
55
56                if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
57                    localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
58                }
59            } catch (e) { }
60        </script>
60
61
62        <!-- Set the theme before any content is loaded, prevents flash -->
63        
63<script>
64            var theme;
65            try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
66            if (theme === null || theme === undefined) { theme = default_theme; }
67            var html = document.querySelector('html');
68            html.classList.remove('ayu')
69            html.classList.add(theme);
70            var body = document.querySelector('body');
71            body.classList.remove('no-js')
72            body.classList.add('js');
73        </script>
73
74
75        <input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
76
77        <!-- Hide / unhide sidebar before it is displayed -->
78        
78<script>
79            var body = document.querySelector('body');
80            var sidebar = null;
81            var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
82            if (document.body.clientWidth >= 1080) {
83                try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
84                sidebar = sidebar || 'visible';
85            } else {
86                sidebar = 'hidden';
87            }
88            sidebar_toggle.checked = sidebar === 'visible';
89            body.classList.remove('sidebar-visible');
90            body.classList.add("sidebar-" + sidebar);
91        </script>
91
92
93        <nav id="sidebar" class="sidebar" aria-label="Table of contents">
94            <div class="sidebar-scrollbox">
95                <ol class="chapter"><li class="chapter-item expanded "><a href="../packaging/index.html"><strong aria-hidden="true">1.</strong> Xbps-src packaging tutorial</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../packaging/j4-dmenu-desktop.html" class="active"><strong aria-hidden="true">1.1.</strong> Packaging j4-dmenu-desktop</a></li><li class="chapter-item expanded "><a href="../packaging/bat.html"><strong aria-hidden="true">1.2.</strong> Packaging bat</a></li><li class="chapter-item expanded "><a href="../packaging/oniguruma.html"><strong aria-hidden="true">1.3.</strong> Packaging oniguruma</a></li><li class="chapter-item expanded "><a href="../packaging/rofimoji.html"><strong aria-hidden="true">1.4.</strong> Packaging rofimoji</a></li><li class="chapter-item expanded "><a href="../packaging/contributing.html"><strong aria-hidden="true">1.5.</strong> Contributing</a></li></ol></li><li class="chapter-item expanded "><a href="../package-update-tutorial.html"><strong aria-hidden="true">2.</strong> Package update tutorial</a></li><li class="chapter-item expanded "><a href="../pr-testing-tutorial.html"><strong aria-hidden="true">3.</strong> PR testing tutorial</a></li><li class="chapter-item expanded "><div><strong aria-hidden="true">4.</strong> Mini-tutorials</div></li><li><ol class="section"><li class="chapter-item expanded "><a href="../mini-tutors/completions.html"><strong aria-hidden="true">4.1.</strong> How to add completions?</a></li><li class="chapter-item expanded "><a href="../mini-tutors/git-submodules.html"><strong aria-hidden="true">4.2.</strong> How to fetch git submodules?</a></li></ol></li><li class="chapter-item expanded "><a href="../troubleshooting.html"><strong aria-hidden="true">5.</strong> Troubleshooting</a></li><li class="chapter-item expanded "><a href="../tips-and-tricks.html"><strong aria-hidden="true">6.</strong> Tips and tricks</a></li><li class="chapter-item expanded "><a href="../feedback.html"><strong aria-hidden="true">7.</strong> Feedback</a></li></ol>
96            </div>
97            <div id="sidebar-resize-handle" class="sidebar-resize-handle">
98                <div class="sidebar-resize-indicator"></div>
99            </div>
100        </nav>
101
102        <!-- Track and set sidebar scroll position -->
103        
103<script>
104            var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
105            sidebarScrollbox.addEventListener('click', function(e) {
106                if (e.target.tagName === 'A') {
107                    sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
108                }
109            }, { passive: true });
110            var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
111            sessionStorage.removeItem('sidebar-scroll');
112            if (sidebarScrollTop) {
113                // preserve sidebar scroll position when navigating via links within sidebar
114                sidebarScrollbox.scrollTop = sidebarScrollTop;
115            } else {
116                // scroll sidebar to current active section when navigating via "next/previous chapter" buttons
117                var activeSection = document.querySelector('#sidebar .active');
118                if (activeSection) {
119                    activeSection.scrollIntoView({ block: 'center' });
120                }
121            }
122        </script>
122
123
124        <div id="page-wrapper" class="page-wrapper">
125
126            <div class="page">
127                                <div id="menu-bar-hover-placeholder"></div>
128                <div id="menu-bar" class="menu-bar sticky">
129                    <div class="left-buttons">
130                        <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
131                            <i class="fa fa-bars"></i>
132                        </label>
133                        <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
134                            <i class="fa fa-paint-brush"></i>
135                        </button>
136                        <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
137                            <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
138                            <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
139                            <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
140                            <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
141                            <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
142                            <li role="none"><button role="menuitem" class="theme" id="latte">Latte</button></li>
143                            <li role="none"><button role="menuitem" class="theme" id="frappe">Frappé</button></li>
144                            <li role="none"><button role="menuitem" class="theme" id="macchiato">Macchiato</button></li>
145                            <li role="none"><button role="menuitem" class="theme" id="mocha">Mocha</button></li>
146                        </ul>
147                        <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
148                            <i class="fa fa-search"></i>
149                        </button>
150                    </div>
151
152                    <h1 class="menu-title">xbps-src tutorials</h1>
153
154                    <div class="right-buttons">
155                        <a href="../print.html" title="Print this book" aria-label="Print this book">
156                            <i id="print-button" class="fa fa-print"></i>
157                        </a>
158                        <a href="https://github.com/xbps-src-tutorials/xbps-src-tutorials.github.io" title="Git repository" aria-label="Git repository">
159                            <i id="git-repository-button" class="fa fa-github"></i>
160                        </a>
161
162                    </div>
163                </div>
164
165                <div id="search-wrapper" class="hidden">
166                    <form id="searchbar-outer" class="searchbar-outer">
167                        <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
168                    </form>
169                    <div id="searchresults-outer" class="searchresults-outer hidden">
170                        <div id="searchresults-header" class="searchresults-header"></div>
171                        <ul id="searchresults">
172                        </ul>
173                    </div>
174                </div>
175
176                <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
177                
177<script>
178                    document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
179                    document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
180                    Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
181                        link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
182                    });
183                </script>
183
184
185                <div id="content" class="content">
186                    <main>
187                        <h1 id="packaging-j4-dmenu-desktop"><a class="header" href="#packaging-j4-dmenu-desktop">Packaging j4-dmenu-desktop</a></h1>
188<ul>
189<li><a href="#why-do-we-care-about-package-management">Why do we care about package management?</a></li>
190<li><a href="#the-better-way">The better way</a></li>
191<li><a href="#what-is-a-package-anyway">What is a package, anyway?</a></li>
192<li><a href="#before-we-begin">Before we begin…</a>
193<ul>
194<li><a href="#quality-requirements">Quality requirements</a></li>
195<li><a href="#has-it-been-packaged-already">Has it been packaged already?</a></li>
196</ul>
197</li>
198<li><a href="#xbps-src">xbps-src</a>
199<ul>
200<li><a href="#void-packages-structure">void-packages structure</a></li>
201<li><a href="#basic-usage-of-xbps-src">Basic usage of xbps-src</a></li>
202<li><a href="#introduction-to-templates-aka-the-return-of-j4-dmenu-desktop">Introduction to templates (aka the return of j4-dmenu-desktop)</a>
203<ul>
204<li><a href="#some-progress">Some progress</a></li>
205</ul>
206</li>
207<li><a href="#build-phases">Build phases</a>
208<ul>
209<li><a href="#some-progress-1">Some progress</a></li>
210</ul>
211</li>
212<li><a href="#cwd">CWD</a>
213<ul>
214<li><a href="#wrksrc">wrksrc</a></li>
215</ul>
216</li>
217<li><a href="#destdir">Destdir</a></li>
218<li><a href="#prefix">Prefix</a></li>
219<li><a href="#summary">Summary</a></li>
220</ul>
221</li>
222<li><a href="#improving-the-template">Improving the template</a>
223<ul>
224<li><a href="#what-is-cross-compilation">What is cross-compilation?</a></li>
225<li><a href="#how-does-cross-compilation-work">How does cross-compilation work?</a></li>
226<li><a href="#build-styles">Build styles</a></li>
227<li><a href="#how-to-cross-compile">How to cross-compile?</a>
228<ul>
229<li><a href="#some-progress-2">Some progress</a></li>
230</ul>
231</li>
232<li><a href="#downloading-source">Downloading source</a></li>
233<li><a href="#distfiles">distfiles</a></li>
234<li><a href="#dependencies">Dependencies</a>
235<ul>
236<li><a href="#some-progress-3">Some progress</a></li>
237</ul>
238</li>
239<li><a href="#version-and-distfiles"><code>version</code> and <code>distfiles</code></a></li>
240<li><a href="#checks">Checks</a></li>
241<li><a href="#when-their-build-system-is-broken">When their build system is broken…</a>
242<ul>
243<li><a href="#vsed"><code>vsed</code></a></li>
244<li><a href="#patches">Patches</a></li>
245</ul>
246</li>
247<li><a href="#linting">Linting</a></li>
248<li><a href="#summary-1">Summary</a></li>
249<li><a href="#what-now">What now?</a></li>
250</ul>
251</li>
252</ul>
253<div id="admonition-attention" class="admonition admonish-warning">
254<div class="admonition-title">
255<p>Attention</p>
256<p><a class="admonition-anchor-link" href="#admonition-attention"></a></p>
257</div>
258<div>
259<p>This section of the xbps-src packaging tutorial focuses on packaging
260j4-dmenu-desktop version <strong>r2.18</strong>. This version was the latest released version
261when this tutorial was written, but it has since been superseded by release
262<strong>r3.0</strong>, which addresses many of the issues discussed in this tutorial.</p>
263<p>As described in the <a href="index.html#obsolescence-of-this-tutorial">introduction of this
264tutorial</a>, specific packages discussed
265in this tutorial may be out of date by the time you are reading this. But the
266choice to package version r2.18 is deliberate here. This version showcases
267many useful features of xbps-src that help with fixing upstream packages.</p>
268</div>
269</div>
270<p>You’ve heard about a cool program called
271<a href="https://github.com/enkore/j4-dmenu-desktop">j4-dmenu-desktop</a>, a desktop menu
272that uses <code>dmenu</code> and you want to try it out. To do so, you have to:</p>
273<ol>
274<li>download it,</li>
275<li>build it and</li>
276<li>install it</li>
277</ol>
278<p>You read their README and come up with the following process to do this:</p>
279<pre><code class="language-sh">git clone https://github.com/enkore/j4-dmenu-desktop.git
280cd j4-dmenu-desktop
281# Setup a builddir (this is CMake specific stuff)
282mkdir build
283cd build
284# Configure j4-dmenu-desktop
285cmake ..
286# Build
287make
288# Install j4-dmenu-desktop to system directories
289sudo make install
290</code></pre>
291<p>All is well, everything works. But this approach has some disadvantages.</p>
292<h3 id="why-do-we-care-about-package-management"><a class="header" href="#why-do-we-care-about-package-management">Why do we care about package management?</a></h3>
293<p><code>sudo make install</code>
293 can do a lot of things. It can install the executable to the
294system (that’s why we’re running it), it can install some libraries needed for
295<code>j4-dmenu-desktop</code>, it can install configuration files, documentation, shell
296completions, examples, etc. You should keep track of all the files that have
297been installed.</p>
298<p>Why do you have to keep track of them? Let’s say that you have tried
299<code>j4-dmenu-desktop</code> out and you weren’t satisfied with its features, so you want
300to uninstall it. You will have to <code>sudo rm</code> each file that has been installed.
301If you don’t care much about a clean uninstall, you might choose to just <code>rm</code>
302the executable. The rest of <code>j4-dmenu-desktop</code>’s files will just sit there. They
303will still be installed, but unused. This can waste your storage if, for example,
304<code>j4-dmenu-desktop</code> includes a large pregenerated documentation collection like
305some programs do.</p>
306<p>But let’s say you’ve been diligent and you know which files to remove. Still,
307wandering around with <code>sudo rm</code> in your system directories isn’t the best idea.
308One typo, one poorly thought-out glob and you’ve bricked your system.</p>
309<p>Let’s consider another scenario. You’ve tried <code>j4-dmenu-desktop</code> and you were
310awestruck by its features, so you didn’t even think about uninstalling it. But
311a new version has been released. You don’t hesitate and clone the newer version
312and redo the download, build, and install process above.</p>
313<p>But the new version doesn’t install the same set of files to the system as
314the older one. There could be some files added and some files missing. This
315means that you will also have to keep track of these. You should also remove the
316files that were in the older version but are no longer in the new version. These
317files will not be overridden by the new install, so they will again just sit
318there.</p>
319<p>If you are a more knowledgeable Linux user, you could set up a separate destdir
320for <code>j4-dmenu-desktop</code>. You will have to add it to <code>$PATH</code> and potentially handle
321shared libraries. This is cumbersome.</p>
322<p>Let’s say that you were so amazed by <code>j4-dmenu-desktop</code> that you rushed to tell
323your friends and colleagues about it. They naturally want to try it out too. But
324the program could be big, it could take hours to build and its build system
325could be complicated and involved. All these problems are avoidable because
326your friends only need the executables (and shared libraries + possibly some
327supplementary data files like <code>/etc/</code> config). You already have all of this, you
328just need to send it to them. They don’t need the source.</p>
329<p>This means that you (again) have to know which files are installed by
330<code>j4-dmenu-desktop</code> to know what to send <em>and</em> they will also have to keep track
331of it for the same reasons you have to.</p>
332<p>But they have managed to install it with your provided build. But there’s a
333small problem: it doesn’t run! It’s missing dependencies. But which ones? No one
334knows.</p>
335<p><em>If only there was a better way…</em></p>
336<h3 id="the-better-way"><a class="header" href="#the-better-way">The better way</a></h3>
337<p>This is why we have package management. Each package <em>owns</em> its files and keeps
338track of them. This means that completely removing a package is as simple as
339running</p>
340<pre><code class="language-sh">sudo xbps-remove j4-dmenu-desktop
341</code></pre>
342<p>Because the package <em>owns</em> its files, it can verify their state. Let’s say that
343you have modified some <code>j4-dmenu-desktop</code> files by accident. If you have noticed
344it, you can uninstall it and reinstall it. However, you might not have even
345noticed.</p>
346<p>The package manager can check the state of the package and it can print all
347filenames which do not match the package. This is done with <code>xbps-pkgdb</code>. It can
348also detect missing files.</p>
349<p>You can see which files a package provides with <code>xbps-query -f</code>:</p>
350<pre><code class="language-sh">&gt;
350 xbps-query -Rf j4-dmenu-desktop
351/usr/bin/j4-dmenu-desktop
352/usr/share/man/man1/j4-dmenu-desktop.1
353</code></pre>
354<p>Another very important aspect of package management that I have partly
355overlooked until now is dependencies. Each package maintains a list of its
356dependencies. You can query then with <code>xbps-query -x</code>:</p>
357<pre><code class="language-sh">&gt; xbps-query -Rx j4-dmenu-desktop
358libstdc++&gt;=4.4.0_1
359libgcc&gt;=4.4.0_1
360glibc&gt;=2.32_1
361</code></pre>
362<p>You can’t<sup class="footnote-reference"><a href="#youcan">1</a></sup> install a package without its dependencies, so breakage cannot
363occur.</p>
364<h2 id="what-is-a-package-anyway"><a class="header" href="#what-is-a-package-anyway">What is a package, anyway?</a></h2>
365<p><em>You don’t necessarily have to know the internals of XBPS to be able to package,
366but it’s interesting to know nonetheless. Feel free to skip this section.</em></p>
367<p>An XBPS package is a file usually ending with <code>.xbps</code>. They are managed by the
368<code>xbps-*</code> utilities, mainly <code>xbps-install</code>. Packages are downloaded to
369<code>/var/cache/xbps</code>.</p>
370<p>Packages are signed and checksumed to prevent tampering and to verify
371authenticity. The signature is usually contained in a file with the same name as
372the package with <code>.sig</code> or the newer <code>.sig2</code> added to the end of the filename.</p>
373<p>A <code>.xbps</code> file (like most other “complicated” file formats) is just a disguised
374archive. At the time of writing this tutorial, mainly tar zstd archives are
375used, but <a href="https://github.com/void-linux/xbps/blob/master/README.md#xbps">XBPS supports many
376formats</a>. You can
377simply <code>tar -xf /var/cache/xbps/j4-dmenu-desktop-2.18_3.x86_64.xbps</code> (if you
378have it downloaded).</p>
379<p>For example, <code>j4-dmenu-desktop</code>’s package looks like this:</p>
380<pre><code>.
381├── files.plist
382├── props.plist
383└── usr
384    ├── bin
385    │   └── j4-dmenu-desktop
386    └── share
387        └── man
388            └── man1
389                └── j4-dmenu-desktop.1
390</code></pre>
391<p><code>files.plist</code> contains the list of files in a package and <code>props.plist</code> contains
392package metadata (version, homepage…). They are both in
393<a href="https://en.wikipedia.org/wiki/Property_list">plist</a> format, which is derived
394from XML.</p>
395<p>If you want to examine individual files of a package, you don’t have to extract them.
396You can use</p>
397<pre><code>xbps-query -R --cat /usr/share/man/man1/j4-dmenu-desktop.1 j4-dmenu-desktop
398</code></pre>
399<p>The archive can include additional special files like <code>INSTALL</code> and <code>REMOVE</code>. I
400won’t cover them, read the
401<a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#install_remove_files">Manual</a>
402for more info.</p>
403<p>A collection of packages is a repository. Official repositories are described
404<a href="https://docs.voidlinux.org/xbps/repositories/index.html">here</a>.</p>
405<p>A repository is characterized by its <code>repodata</code> file. It is named
406<code>&lt;architecture&gt;-repodata</code>. Repodata files are saved to <code>/var/db/xbps/</code> locally.
407They contain metadata for all packages in the repository.</p>
408<p>They are (again) tar zstd archives. They contain two files: <code>index.plist</code> and
409<code>index-meta.plist</code>. <code>index-meta.plist</code> contains the public key. <code>index.plist</code>
410contains metadata of all packages in the repository.</p>
411<p>Repodata is managed by <code>xbps-rindex</code>.</p>
412<h2 id="before-we-begin"><a class="header" href="#before-we-begin">Before we begin…</a></h2>
413<h3 id="quality-requirements"><a class="header" href="#quality-requirements">Quality requirements</a></h3>
414<p><em>This section is primarily intended for people who want to contribute their
415packages to
416<a href="https://github.com/void-linux/void-packages">void-packages</a>. If you want to use
417your package yourself and don’t want to publish them, you can ignore this
418section.</em></p>
419<p>Before I even begin describing <code>xbps-src</code>, I have to mention quality
420requirements. Not all packages get accepted. All new packages must fulfill the
421<strong>
421package requirements</strong>.</p>
422<p>Package requirements can be found in
423<a href="https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements">the package requirements section of
424CONTRIBUTING</a>.</p>
425<p>Namely, <strong><span style="color:red"><ins>software without a release or tag</ins></span>,
426cryptocurrency packages, browser forks, simple shell scripts, themes, prebuilt
427packages</strong>, and more won’t likely get accepted. I recommend you read the
428requirements in full linked above.</p>
429<h3 id="has-it-been-packaged-already"><a class="header" href="#has-it-been-packaged-already">Has it been packaged already?</a></h3>
430<p>You should check whether it has been packaged already, if a <a href="https://github.com/void-linux/void-packages/pulls">pull request
431providing the package is already
432open</a>, or if <a href="https://github.com/void-linux/void-packages/pulls?q=is%3Apr+is%3Aclosed">someone has
433already packaged it but it was rejected or
434abandoned</a>.
435If there already is a pull request but it has been abandoned, you can base your
436package off of it, which will save you time.</p>
437<h2 id="xbps-src"><a class="header" href="#xbps-src">xbps-src</a></h2>
438<p>Now, we really begin.</p>
439<p>First, you need to clone the
440<a href="https://github.com/void-linux/void-packages"><code>void-packages</code></a> repository.
441<a href="https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#creating-updating-and-modifying-packages-in-void-by-yourself"><code>CONTRIBUTING</code></a>
442recommends using SSH. <a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh">This needs to be set up for it to
443work.</a>
444If you have SSH set up, you can clone the repo with:</p>
445<pre><code>git clone [email protected]:void-linux/void-packages.git
446</code></pre>
447<p>If you do not want to set up SSH keys, you can clone with HTTPS:</p>
448<pre><code>git clone https://github.com/void-linux/void-packages.git
449</code></pre>
450<p>The git repository contains everything needed to build an XBPS package<sup class="footnote-reference"><a href="#deps">2</a></sup> and
451a collection of templates for packages in the official repositories.</p>
452<p>If you have experience with other package managers, I should note that
453<a href="https://github.com/void-linux/void-packages">void-packages</a> keep all package
454templates in one repository (it isn’t one repo per package like the AUR for
455example).</p>
456<p>The repo is pretty big because of this. There are also 189 334 commits of
457history at the time of writing. That’s a lot of commits.</p>
458<p>At the time of writing this tutorial, cloning the repo took me 15 minutes on my
459notebook. It had 626 MB.</p>
460<p><a href="../tips-and-tricks.html#different-ways-of-cloning">There are faster ways to clone, but this way should be
461preferred.</a></p>
462<p>While you wait for it to clone, you can learn more about
463<a href="https://github.com/void-linux/void-packages">void-packages</a>:</p>
464<h3 id="void-packages-structure"><a class="header" href="#void-packages-structure">void-packages structure</a></h3>
465<p>This is the <a href="https://github.com/void-linux/void-packages/blob/master/README.md#directory-hierarchy">directory
466hierarchy</a>
467of <a href="https://github.com/void-linux/void-packages">void-packages</a>:</p>
468<pre><code> /void-packages
469    |- xbps-src
470    |- common
471    |- etc
472    |- srcpkgs
473    |  |- &lt;PACKAGE NAME&gt;
474    |     |- template
475    |
476    |- hostdir
477    |  |- binpkgs ...
478    |  |- ccache ...
479    |  |- distcc-&lt;arch&gt; ...
480    |  |- repocache ...
481    |  |- sources ...
482    |
483    |- masterdir-&lt;arch&gt;
484    |  |- builddir -&gt; ...
485    |  |- destdir -&gt; ...
486    |  |- host -&gt; bind mounted from &lt;hostdir&gt;
487    |  |- void-packages -&gt; bind mounted from &lt;void-packages&gt;
488</code></pre>
489<p>Here is a more graphic and simplified version of it showing <code>j4-dmenu-desktop</code>,
490<code>bat</code>, <code>oniguruma</code> and <code>rofimoji</code> packages:</p>
491<?xml version="1.0" encoding="UTF-8"?>
492<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
493<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-0.5 -0.5 761 491">
494  <g>
495    <g data-cell-id="0">
496      <g data-cell-id="1">
497        <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-12">
498          <g>
499            <path d="M 0 20 L 0 0 L 760 0 L 760 20" fill="#4d4d4d" stroke="#36393d" stroke-miterlimit="10" pointer-events="all"/>
500            <path d="M 0 20 L 0 490 L 760 490 L 760 20" fill="#4d4d4d" stroke="#36393d" stroke-miterlimit="10" pointer-events="all"/>
501            <path d="M 0 20 L 760 20" fill="none" stroke="#36393d" stroke-miterlimit="10" pointer-events="all"/>
502          </g>
503          <g>
504            <g transform="translate(-0.5 -0.5)">
505              <switch>
506                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
507                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 758px; height: 1px; padding-top: 10px; margin-left: 1px;">
508                    <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
509                      <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
510                        <font color="#ffffff" style="">
510void-packages</font>
511                      </div>
512                    </div>
513                  </div>
514                </foreignObject>
515                <text x="380" y="14" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px" text-anchor="middle" font-weight="bold">void-packages</text>
516              </switch>
517            </g>
518          </g>
519          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-48">
520            <g>
521              <path d="M 190 150 L 200 150 Q 210 150 210 160 L 210 165 Q 210 170 220 170 L 273.63 170" fill="none" stroke="#808080" stroke-miterlimit="10" pointer-events="stroke"/>
522              <path d="M 278.88 170 L 271.88 173.5 L 273.63 170 L 271.88 166.5 Z" fill="#808080" stroke="#808080" stroke-miterlimit="10" pointer-events="all"/>
523            </g>
524          </g>
525          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-49">
526            <g>
527              <path d="M 190 230 L 200 230 Q 210 230 210 220 L 210 200 Q 210 190 220 190 L 273.63 190" fill="none" stroke="#808080" stroke-miterlimit="10" pointer-events="stroke"/>
528              <path d="M 278.88 190 L 271.88 193.5 L 273.63 190 L 271.88 186.5 Z" fill="#808080" stroke="#808080" stroke-miterlimit="10" pointer-events="all"/>
529            </g>
530          </g>
531          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-50">
532            <g>
533              <path d="M 190 310 L 220 310 Q 230 310 230 300 L 230 220 Q 230 210 240 210 L 273.63 210" fill="none" stroke="#808080" stroke-miterlimit="10" pointer-events="stroke"/>
534              <path d="M 278.88 210 L 271.88 213.5 L 273.63 210 L 271.88 206.5 Z" fill="#808080" stroke="#808080" stroke-miterlimit="10" pointer-events="all"/>
535            </g>
536          </g>
537          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-43">
538            <g>
539              <path d="M 360 46.64 L 383.55 58.58 L 383.55 82.25 L 360 70.31 Z M 361.16 44.39 L 371.45 39.09 L 395.35 51.18 L 384.94 56.43 Z M 398.26 49.65 L 374.36 37.61 L 385.06 32.25 L 408.78 44.29 Z M 410 46.69 L 410 70.26 L 386.51 82.2 L 386.51 58.63 Z" fill="#ffffff" stroke="none" pointer-events="all"/>
540            </g>
541          </g>
542          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-185">
543            <g>
544              <path d="M 550 113 L 550 90 L 750 90 L 750 113" fill="none" stroke="#36393d" stroke-width="3" stroke-miterlimit="10" pointer-events="all"/>
545              <path d="M 550 113 L 550 450 L 750 450 L 750 113" fill="none" stroke="#36393d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/>
546              <path d="M 550 113 L 750 113" fill="none" stroke="#36393d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/>
547            </g>
548            <g>
549              <g transform="translate(-0.5 -0.5)">
550                <switch>
551                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
552                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 193px; height: 1px; padding-top: 102px; margin-left: 557px;">
553                      <div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: left;">
554                        <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">masterdir-x86_64/</div>
555                      </div>
556                    </div>
557                  </foreignObject>
558                  <text x="557" y="105" fill="#ffffff" font-family="&quot;Source Code Pro&quot;" font-size="12px">masterdir-x86_64/</text>
559                </switch>
560              </g>
561            </g>
562            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-190">
563              <g>
564                <rect x="556.15" y="120" width="183.85" height="20" fill="none" stroke="none" pointer-events="all"/>
565              </g>
566              <g>
567                <g transform="translate(-0.5 -0.5)">
568                  <switch>
569                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
570                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 182px; height: 1px; padding-top: 130px; margin-left: 558px;">
571                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
572                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
573                            <font color="#ffffff">bin/</font>
574                          </div>
575                        </div>
576                      </div>
577                    </foreignObject>
578                    <text x="558" y="134" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">bin/</text>
579                  </switch>
580                </g>
581              </g>
582            </g>
583            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-191">
584              <g>
585                <rect x="556.15" y="140" width="183.85" height="20" fill="none" stroke="none" pointer-events="all"/>
586              </g>
587              <g>
588                <g transform="translate(-0.5 -0.5)">
589                  <switch>
590                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
591                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 182px; height: 1px; padding-top: 150px; margin-left: 558px;">
592                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
593                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
594                            <font color="#ffffff">boot/</font>
595                          </div>
596                        </div>
597                      </div>
598                    </foreignObject>
599                    <text x="558" y="154" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">boot/</text>
600                  </switch>
601                </g>
602              </g>
603            </g>
604            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-192">
605              <g>
606                <rect x="556.15" y="160" width="183.85" height="20" fill="none" stroke="none" pointer-events="all"/>
607              </g>
608              <g>
609                <g transform="translate(-0.5 -0.5)">
610                  <switch>
611                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
612                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 182px; height: 1px; padding-top: 170px; margin-left: 558px;">
613                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
614                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
615                            <font color="#ffffff">dev/</font>
616                          </div>
617                        </div>
618                      </div>
619                    </foreignObject>
620                    <text x="558" y="174" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">dev/</text>
621                  </switch>
622                </g>
623              </g>
624            </g>
625            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-193">
626              <g>
627                <rect x="556.15" y="180" width="183.85" height="20" fill="none" stroke="none" pointer-events="all"/>
628              </g>
629              <g>
630                <g transform="translate(-0.5 -0.5)">
631                  <switch>
632                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
633                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 182px; height: 1px; padding-top: 190px; margin-left: 558px;">
634                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
635                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
636                            <font color="#ffffff">etc/</font>
637                          </div>
638                        </div>
639                      </div>
640                    </foreignObject>
641                    <text x="558" y="194" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">etc/</text>
642                  </switch>
643                </g>
644              </g>
645            </g>
646            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-199">
647              <g>
648                <rect x="556.15" y="200" width="183.85" height="20" fill="none" stroke="none" pointer-events="all"/>
649              </g>
650              <g>
651                <g transform="translate(-0.5 -0.5)">
652                  <switch>
653                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
654                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 182px; height: 1px; padding-top: 210px; margin-left: 558px;">
655                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
656                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
657                            <font color="#ffffff">home/</font>
658                          </div>
659                        </div>
660                      </div>
661                    </foreignObject>
662                    <text x="558" y="214" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">home/</text>
663                  </switch>
664                </g>
665              </g>
666            </g>
667            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-200">
668              <g>
669                <rect x="556.15" y="220" width="183.85" height="20" fill="none" stroke="none" pointer-events="all"/>
670              </g>
671              <g>
672                <g transform="translate(-0.5 -0.5)">
673                  <switch>
674                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
675                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 182px; height: 1px; padding-top: 230px; margin-left: 558px;">
676                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
677                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
678                            <font color="#ffffff">root/</font>
679                          </div>
680                        </div>
681                      </div>
682                    </foreignObject>
683                    <text x="558" y="234" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">root/</text>
684                  </switch>
685                </g>
686              </g>
687            </g>
688            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-202">
689              <g>
690                <path d="M 640 130 L 632.5 130 Q 625 130 625 140 L 625 180 Q 625 190 617.5 190 L 613.75 190 Q 610 190 617.5 190 L 621.25 190 Q 625 190 625 200 L 625 240 Q 625 250 632.5 250 L 640 250" fill="none" stroke="#808080" stroke-miterlimit="10" transform="translate(625,0)scale(-1,1)translate(-625,0)" pointer-events="all"/>
691              </g>
692            </g>
693            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-246">
694              <g>
695                <rect x="640" y="180" width="100" height="20" fill="none" stroke="none" pointer-events="all"/>
696              </g>
697              <g>
698                <g transform="translate(-0.5 -0.5)">
699                  <switch>
700                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
701                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 98px; height: 1px; padding-top: 190px; margin-left: 642px;">
702                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
703                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
704                            <font color="#ffffff">chroot system</font>
705                          </div>
706                        </div>
707                      </div>
708                    </foreignObject>
709                    <text x="642" y="194" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">chroot system</text>
710                  </switch>
711                </g>
712              </g>
713            </g>
714            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-247">
715              <g>
716                <rect x="556.15" y="240" width="33.85" height="20" fill="none" stroke="none" pointer-events="all"/>
717              </g>
718              <g>
719                <g transform="translate(-0.5 -0.5)">
720                  <switch>
721                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
722                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 32px; height: 1px; padding-top: 250px; margin-left: 558px;">
723                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
724                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
725                            <font color="#ffffff">...</font>
726                          </div>
727                        </div>
728                      </div>
729                    </foreignObject>
730                    <text x="558" y="254" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">...</text>
731                  </switch>
732                </g>
733              </g>
734            </g>
735            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-293">
736              <g>
737                <rect x="556.15"
737 y="260" width="73.85" height="20" fill="none" stroke="none" pointer-events="all"/>
738              </g>
739              <g>
740                <g transform="translate(-0.5 -0.5)">
741                  <switch>
742                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
743                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 72px; height: 1px; padding-top: 270px; margin-left: 558px;">
744                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
745                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
746                            <font color="#ffffff">builddir/</font>
747                          </div>
748                        </div>
749                      </div>
750                    </foreignObject>
751                    <text x="558" y="274" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">builddir/</text>
752                  </switch>
753                </g>
754              </g>
755            </g>
756            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-294">
757              <g>
758                <rect x="580" y="280" width="170" height="20" fill="none" stroke="none" pointer-events="all"/>
759              </g>
760              <g>
761                <g transform="translate(-0.5 -0.5)">
762                  <switch>
763                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
764                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 168px; height: 1px; padding-top: 290px; margin-left: 582px;">
765                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
766                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
767                            <font color="#ffffff">j4-dmenu-desktop-2.18/</font>
768                          </div>
769                        </div>
770                      </div>
771                    </foreignObject>
772                    <text x="582" y="294" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">j4-dmenu-desktop-2.18/</text>
773                  </switch>
774                </g>
775              </g>
776            </g>
777            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-295">
778              <g>
779                <rect x="599.03" y="340" width="31.93" height="20" fill="none" stroke="none" pointer-events="all"/>
780              </g>
781              <g>
782                <g transform="translate(-0.5 -0.5)">
783                  <switch>
784                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
785                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 30px; height: 1px; padding-top: 350px; margin-left: 601px;">
786                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
787                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
788                            <font color="#ffffff">...</font>
789                          </div>
790                        </div>
791                      </div>
792                    </foreignObject>
793                    <text x="601" y="354" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">...</text>
794                  </switch>
795                </g>
796              </g>
797            </g>
798            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-344">
799              <g>
800                <rect x="557.11" y="360" width="63.85" height="20" fill="none" stroke="none" pointer-events="all"/>
801              </g>
802              <g>
803                <g transform="translate(-0.5 -0.5)">
804                  <switch>
805                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
806                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 62px; height: 1px; padding-top: 370px; margin-left: 559px;">
807                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
808                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
809                            <font color="#ffffff">destdir/</font>
810                          </div>
811                        </div>
812                      </div>
813                    </foreignObject>
814                    <text x="559" y="374" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">destdir/</text>
815                  </switch>
816                </g>
817              </g>
818            </g>
819            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-345">
820              <g>
821                <rect x="580.96" y="380" width="170" height="20" fill="none" stroke="none" pointer-events="all"/>
822              </g>
823              <g>
824                <g transform="translate(-0.5 -0.5)">
825                  <switch>
826                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
827                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 168px; height: 1px; padding-top: 390px; margin-left: 583px;">
828                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
829                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
830                            <font color="#ffffff">j4-dmenu-desktop-2.18/</font>
831                          </div>
832                        </div>
833                      </div>
834                    </foreignObject>
835                    <text x="583" y="394" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">j4-dmenu-desktop-2.18/</text>
836                  </switch>
837                </g>
838              </g>
839            </g>
840            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-346">
841              <g>
842                <rect x="599.03" y="400" width="31.93" height="20" fill="none" stroke="none" pointer-events="all"/>
843              </g>
844              <g>
845                <g transform="translate(-0.5 -0.5)">
846                  <switch>
847                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
848                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 30px; height: 1px; padding-top: 410px; margin-left: 601px;">
849                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
850                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
851                            <font color="#ffffff">usr/</font>
852                          </div>
853                        </div>
854                      </div>
855                    </foreignObject>
856                    <text x="601" y="414" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">usr/</text>
857                  </switch>
858                </g>
859              </g>
860            </g>
861            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-354">
862              <g>
863                <rect x="598.07" y="300" width="111.93" height="20" fill="none" stroke="none" pointer-events="all"/>
864              </g>
865              <g>
866                <g transform="translate(-0.5 -0.5)">
867                  <switch>
868                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
869                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 110px; height: 1px; padding-top: 310px; margin-left: 600px;">
870                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
871                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
872                            <font color="#ffffff">CMakeLists.txt<br/></font>
873                          </div>
874                        </div>
875                      </div>
876                    </foreignObject>
877                    <text x="600" y="314" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">CMakeLists.txt
878</text>
879                  </switch>
880                </g>
881              </g>
882            </g>
883            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-355">
884              <g>
885                <rect x="598.07" y="320" width="111.93" height="20" fill="none" stroke="none" pointer-events="all"/>
886              </g>
887              <g>
888                <g transform="translate(-0.5 -0.5)">
889                  <switch>
890                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
891                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 110px; height: 1px; padding-top: 330px; margin-left: 600px;">
892                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
893                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
894                            <font color="#ffffff">src/<br/></font>
895                          </div>
896                        </div>
897                      </div>
898                    </foreignObject>
899                    <text x="600" y="334" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">src/
900</text>
901                  </switch>
902                </g>
903              </g>
904            </g>
905            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-416">
906              <g>
907                <rect x="599.03" y="420" width="31.93" height="20" fill="none" stroke="none" pointer-events="all"/>
908              </g>
909              <g>
910                <g transform="translate(-0.5 -0.5)">
911                  <switch>
912                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
913                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 30px; height: 1px; padding-top: 430px; margin-left: 601px;">
914                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
915                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
916                            <font color="#ffffff">...</font>
917                          </div>
918                        </div>
919                      </div>
920                    </foreignObject>
921                    <text x="601" y="434" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">...</text>
922                  </switch>
923                </g>
924              </g>
925            </g>
926          </g>
927          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-188">
928            <g>
929              <g>
930                <svg xmlns="http://www.w3.org/2000/svg" viewBox="-0.00014960840053390712 -0.00046172208385542035 14.000299453735352 15.99292278289795" height="54.5" width="47.69" id="svg-image-JyWWj9cjXnHbLIcqP6y7" x="625.65" y="29.5" style="font-family: initial;">
931	<style type="text/css">#svg-image-JyWWj9cjXnHbLIcqP6y7 .st0 { fill: rgb(255, 255, 255); }
932</style>
933	<path d="M13.67 3.736L7.36.096a.72.72 0 0 0-.72 0L.33 3.736a.72.72 0 0 0-.33.62v7.28a.72.72 0 0 0 .36.62l6.28 3.64a.72.72 0 0 0 .72 0l6.31-3.64a.72.72 0 0 0 .33-.62v-7.28a.72.72 0 0 0-.33-.62zm-.87 7.2l-2.2-1.27v-3.34l-3.25 1.87v3.8l2.9-1.67 2.2 1.27-5.45 3.1-5.45-3.15 2.2-1.27 2.9 1.72v-3.8L3.4 6.326v3.34l-2.2 1.27v-6.29l5.45-3.14v2.49l-2.9 1.72L7 7.586l3.25-1.88-2.9-1.71v-2.49l5.45 3.14z" class="st0"/>
934</svg>
935              </g>
936            </g>
937          </g>
938          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-16">
939            <g>
940              <rect x="17.75" y="32.25" width="53" height="49" fill="none" stroke="none" pointer-events="all"/>
941              <path d="M 63.17 43.86 L 63.17 38.34 C 63.17 36.39 64.82 34.51 66.98 34.51 L 69.4 34.51 C 70.75 36.95 70.28 39.25 69.29 40.89 C 68.09 42.78 66.17 44.02 63.18 43.86 Z M 33.2 48 L 53.44 48 L 53.44 45.74 L 33.2 45.74 Z M 33.2 54.03 L 53.44 54.03 L 53.44 51.77 L 33.2 51.77 Z M 33.2 60.06 L 53.44 60.06 L 53.44 57.8 L 33.2 57.8 Z M 25.71 66.84 L 25.71 38.79 C 25.71 36.03 28.12 32.25 32.2 32.25 L 65.16 32.25 C 65.54 32.26 65.87 32.3 66.16 32.39 C 62.59 32.95 61 35.83 61 38.05 L 61 74.53 C 60.92 78.81 57.22 81.25 54.89 81.25 C 52.77 81.25 49.39 79.09 49.3 75.39 C 49.31 73.15 50.24 71.17 52.54 69.9 C 52.98 69.63 53.23 68.92 52.93 68.07 C 52.58 67.25 51.98 66.92 51.27 66.84 Z M 23.56 81.17 C 20.95 81.17 17.75 78.94 17.75 75 C 17.75 71.84 20.57 69.12 23.56 69.12 L 49.61 69.12 C 48.33 70.5 47.2 72.06 47.06 74.95 C 47.06 77.81 48.13 79.67 49.6 81.17 Z" fill="#ffffff" stroke="none" pointer-events="all"/>
942            </g>
943          </g>
944          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-13">
945            <g>
946              <rect x="10" y="90" width="68.5" height="20" fill="none" stroke="none" pointer-events="all"/>
947            </g>
948            <g>
949              <g transform="translate(-0.5 -0.5)">
950                <switch>
951                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
952                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 67px; height: 1px; padding-top: 100px; margin-left: 11px;">
953                      <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: ce
953nter;">
954                        <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
955                          <font color="#33ff00">xbps-src</font>
956                        </div>
957                      </div>
958                    </div>
959                  </foreignObject>
960                  <text x="44" y="104" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px" text-anchor="middle">xbps-src</text>
961                </switch>
962              </g>
963            </g>
964          </g>
965          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-423">
966            <g>
967              <path d="M 160.84 41.49 L 168.26 48.91 L 140.45 76.72 L 130.25 79.5 L 133.03 69.3 Z" fill="#ffffff" stroke="none" pointer-events="all"/>
968              <path d="M 161.77 40.56 L 167.33 35 L 174.75 42.42 L 169.19 47.98 Z" fill="#ffffff" stroke="none" pointer-events="all"/>
969            </g>
970          </g>
971          <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-28">
972            <g>
973              <rect x="140" y="180" width="25" height="20" fill="none" stroke="none" pointer-events="all"/>
974            </g>
975            <g>
976              <g transform="translate(-0.5 -0.5)">
977                <switch>
978                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
979                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 23px; height: 1px; padding-top: 190px; margin-left: 142px;">
980                      <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
981                        <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-style: italic; white-space: normal; overflow-wrap: normal;">
982                          <font color="#ffffff">...</font>
983                        </div>
984                      </div>
985                    </div>
986                  </foreignObject>
987                  <text x="142" y="194" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px" font-style="italic">...</text>
988                </switch>
989              </g>
990            </g>
991          </g>
992          <g data-cell-id="v_S-9-zrldfwNLv2zRYd-4">
993            <g>
994              <path d="M 190 350 L 240 350 Q 250 350 250 340 L 250 240 Q 250 230 260 230 L 273.63 230" fill="none" stroke="#808080" stroke-miterlimit="10" pointer-events="stroke"/>
995              <path d="M 278.88 230 L 271.88 233.5 L 273.63 230 L 271.88 226.5 Z" fill="#808080" stroke="#808080" stroke-miterlimit="10" pointer-events="all"/>
996            </g>
997          </g>
998          <g data-cell-id="v_S-9-zrldfwNLv2zRYd-7">
999            <g/>
1000            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-14">
1001              <g>
1002                <rect x="80" y="90" width="70" height="20" fill="none" stroke="none" pointer-events="all"/>
1003              </g>
1004              <g>
1005                <g transform="translate(-0.5 -0.5)">
1006                  <switch>
1007                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1008                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 68px; height: 1px; padding-top: 100px; margin-left: 82px;">
1009                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1010                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1011                            <font color="#ffffff">srcpkgs/</font>
1012                          </div>
1013                        </div>
1014                      </div>
1015                    </foreignObject>
1016                    <text x="82" y="104" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">srcpkgs/</text>
1017                  </switch>
1018                </g>
1019              </g>
1020            </g>
1021            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-17">
1022              <g>
1023                <rect x="100" y="120" width="130" height="20" fill="none" stroke="none" pointer-events="all"/>
1024              </g>
1025              <g>
1026                <g transform="translate(-0.5 -0.5)">
1027                  <switch>
1028                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1029                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 128px; height: 1px; padding-top: 130px; margin-left: 102px;">
1030                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1031                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1032                            <font color="#ffffff">j4-dmenu-desktop/</font>
1033                          </div>
1034                        </div>
1035                      </div>
1036                    </foreignObject>
1037                    <text x="102" y="134" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">j4-dmenu-desktop/</text>
1038                  </switch>
1039                </g>
1040              </g>
1041            </g>
1042            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-18">
1043              <g>
1044                <rect x="120" y="140" width="60" height="20" fill="none" stroke="none" pointer-events="all"/>
1045              </g>
1046              <g>
1047                <g transform="translate(-0.5 -0.5)">
1048                  <switch>
1049                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1050                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 58px; height: 1px; padding-top: 150px; margin-left: 122px;">
1051                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1052                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1053                            <font color="#ffffff">template</font>
1054                          </div>
1055                        </div>
1056                      </div>
1057                    </foreignObject>
1058                    <text x="122" y="154" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">template</text>
1059                  </switch>
1060                </g>
1061              </g>
1062            </g>
1063            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-19">
1064              <g>
1065                <rect x="120" y="160" width="60" height="20" fill="none" stroke="none" pointer-events="all"/>
1066              </g>
1067              <g>
1068                <g transform="translate(-0.5 -0.5)">
1069                  <switch>
1070                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1071                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 58px; height: 1px; padding-top: 170px; margin-left: 122px;">
1072                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1073                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-style: italic; white-space: normal; overflow-wrap: normal;">
1074                            <font color="#ffffff">patches/</font>
1075                          </div>
1076                        </div>
1077                      </div>
1078                    </foreignObject>
1079                    <text x="122" y="174" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px" font-style="italic">patches/</text>
1080                  </switch>
1081                </g>
1082              </g>
1083            </g>
1084            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-29">
1085              <g>
1086                <rect x="100" y="200" width="30" height="20" fill="none" stroke="none" pointer-events="all"/>
1087              </g>
1088              <g>
1089                <g transform="translate(-0.5 -0.5)">
1090                  <switch>
1091                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1092                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 28px; height: 1px; padding-top: 210px; margin-left: 102px;">
1093                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1094                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1095                            <font color="#ffffff">bat/</font>
1096                          </div>
1097                        </div>
1098                      </div>
1099                    </foreignObject>
1100                    <text x="102" y="214" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">bat/</text>
1101                  </switch>
1102                </g>
1103              </g>
1104            </g>
1105            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-30">
1106              <g>
1107                <rect x="120" y="220" width="60" height="20" fill="none" stroke="none" pointer-events="all"/>
1108              </g>
1109              <g>
1110                <g transform="translate(-0.5 -0.5)">
1111                  <switch>
1112                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1113                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 58px; height: 1px; padding-top: 230px; margin-left: 122px;">
1114                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1115                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1116                            <font color="#ffffff">template</font>
1117                          </div>
1118                        </div>
1119                      </div>
1120                    </foreignObject>
1121                    <text x="122" y="234" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">template</text>
1122                  </switch>
1123                </g>
1124              </g>
1125            </g>
1126            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-33">
1127              <g>
1128                <rect x="120" y="240" width="60" height="20" fill="none" stroke="none" pointer-events="all"/>
1129              </g>
1130              <g>
1131                <g transform="translate(-0.5 -0.5)">
1132                  <switch>
1133                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1134                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 58px; height: 1px; padding-top: 250px; margin-left: 122px;">
1135                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1136                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-style: italic; white-space: normal; overflow-wrap: normal;">
1137                            <font color="#ffffff">patches/</font>
1138                          </div>
1139                        </div>
1140                      </div>
1141                    </foreignObject>
1142                    <text x="122" y="254" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px" font-style="italic">patches/</text>
1143                  </switch>
1144                </g>
1145              </g>
1146            </g>
1147            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-34">
1148              <g>
1149                <rect x="140" y="260" width="25" height="20" fill="none" stroke="none" pointer-events="all"/>
1150              </g>
1151              <g>
1152                <g transform="translate(-0.5 -0.5)">
1153                  <switch>
1154                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1155                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 23px; height: 1px; padding-top: 270px; margin-left: 142px;">
1156                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1157                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-style: italic; white-space: normal; overflow-wrap: normal;">
1158                            <font color="#ffffff">...</font>
1159                          </div>
1160                        </div>
1161                      </div>
1162                    </foreignObject>
1163                    <text x="142" y="274" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px" font-style="italic">...</text>
1164                  </switch>
1165                </g>
1166              </g>
1167            </g>
1168            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-36">
1169              <g>
1170                <rect x="100" y="280" width="80" height="20" fill="none" stroke="none" pointer-events="all"/>
1171              </g>
1172              <g>
1173                <g transform="translate(-0.5 -0.5)">
1174                  <switch>
1175                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1176                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 78px; height: 1px; padding-top: 290px; margin-left: 102px;">
1177                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1178                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1179                            <font color="#ffffff">oniguruma/</font>
1180                          </div>
1181                        </div>
1182                      </di
1182v>
1183                    </foreignObject>
1184                    <text x="102" y="294" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">oniguruma/</text>
1185                  </switch>
1186                </g>
1187              </g>
1188            </g>
1189            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-37">
1190              <g>
1191                <rect x="120" y="300" width="60" height="20" fill="none" stroke="none" pointer-events="all"/>
1192              </g>
1193              <g>
1194                <g transform="translate(-0.5 -0.5)">
1195                  <switch>
1196                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1197                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 58px; height: 1px; padding-top: 310px; margin-left: 122px;">
1198                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1199                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1200                            <font color="#ffffff">template</font>
1201                          </div>
1202                        </div>
1203                      </div>
1204                    </foreignObject>
1205                    <text x="122" y="314" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">template</text>
1206                  </switch>
1207                </g>
1208              </g>
1209            </g>
1210            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-39">
1211              <g>
1212                <rect x="100" y="360" width="35" height="20" fill="none" stroke="none" pointer-events="all"/>
1213              </g>
1214              <g>
1215                <g transform="translate(-0.5 -0.5)">
1216                  <switch>
1217                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1218                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 33px; height: 1px; padding-top: 370px; margin-left: 102px;">
1219                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1220                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1221                            <font color="#ffffff">...</font>
1222                          </div>
1223                        </div>
1224                      </div>
1225                    </foreignObject>
1226                    <text x="102" y="374" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">...</text>
1227                  </switch>
1228                </g>
1229              </g>
1230            </g>
1231            <g data-cell-id="v_S-9-zrldfwNLv2zRYd-1">
1232              <g>
1233                <rect x="100" y="320" width="80" height="20" fill="none" stroke="none" pointer-events="all"/>
1234              </g>
1235              <g>
1236                <g transform="translate(-0.5 -0.5)">
1237                  <switch>
1238                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1239                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 78px; height: 1px; padding-top: 330px; margin-left: 102px;">
1240                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1241                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1242                            <font color="#ffffff">rofimoji/</font>
1243                          </div>
1244                        </div>
1245                      </div>
1246                    </foreignObject>
1247                    <text x="102" y="334" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">rofimoji/</text>
1248                  </switch>
1249                </g>
1250              </g>
1251            </g>
1252            <g data-cell-id="v_S-9-zrldfwNLv2zRYd-2">
1253              <g>
1254                <rect x="120" y="340" width="60" height="20" fill="none" stroke="none" pointer-events="all"/>
1255              </g>
1256              <g>
1257                <g transform="translate(-0.5 -0.5)">
1258                  <switch>
1259                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1260                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 58px; height: 1px; padding-top: 350px; margin-left: 122px;">
1261                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1262                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1263                            <font color="#ffffff">template</font>
1264                          </div>
1265                        </div>
1266                      </div>
1267                    </foreignObject>
1268                    <text x="122" y="354" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">template</text>
1269                  </switch>
1270                </g>
1271              </g>
1272            </g>
1273          </g>
1274          <g data-cell-id="v_S-9-zrldfwNLv2zRYd-8">
1275            <g/>
1276            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-147">
1277              <g>
1278                <rect x="290" y="440" width="30" height="20" fill="none" stroke="none" pointer-events="all"/>
1279              </g>
1280              <g>
1281                <g transform="translate(-0.5 -0.5)">
1282                  <switch>
1283                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1284                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 28px; height: 1px; padding-top: 450px; margin-left: 292px;">
1285                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1286                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1287                            <font color="#ffffff">...</font>
1288                          </div>
1289                        </div>
1290                      </div>
1291                    </foreignObject>
1292                    <text x="292" y="454" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">...</text>
1293                  </switch>
1294                </g>
1295              </g>
1296            </g>
1297            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-113">
1298              <g>
1299                <rect x="310" y="380" width="130" height="20" fill="none" stroke="none" pointer-events="all"/>
1300              </g>
1301              <g>
1302                <g transform="translate(-0.5 -0.5)">
1303                  <switch>
1304                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1305                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 128px; height: 1px; padding-top: 390px; margin-left: 312px;">
1306                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1307                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1308                            <font color="#ffffff">onig-6.9.9.tar.gz</font>
1309                          </div>
1310                        </div>
1311                      </div>
1312                    </foreignObject>
1313                    <text x="312" y="394" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">onig-6.9.9.tar.gz</text>
1314                  </switch>
1315                </g>
1316              </g>
1317            </g>
1318            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-112">
1319              <g>
1320                <rect x="290" y="360" width="120" height="20" fill="none" stroke="none" pointer-events="all"/>
1321              </g>
1322              <g>
1323                <g transform="translate(-0.5 -0.5)">
1324                  <switch>
1325                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1326                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 370px; margin-left: 292px;">
1327                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1328                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1329                            <font color="#ffffff">oniguruma-6.9.9/</font>
1330                          </div>
1331                        </div>
1332                      </div>
1333                    </foreignObject>
1334                    <text x="292" y="374" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">oniguruma-6.9.9/</text>
1335                  </switch>
1336                </g>
1337              </g>
1338            </g>
1339            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-111">
1340              <g>
1341                <rect x="310" y="340" width="110" height="20" fill="none" stroke="none" pointer-events="all"/>
1342              </g>
1343              <g>
1344                <g transform="translate(-0.5 -0.5)">
1345                  <switch>
1346                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1347                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 108px; height: 1px; padding-top: 350px; margin-left: 312px;">
1348                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1349                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1350                            <font color="#ffffff">v0.24.0.tar.gz</font>
1351                          </div>
1352                        </div>
1353                      </div>
1354                    </foreignObject>
1355                    <text x="312" y="354" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">v0.24.0.tar.gz</text>
1356                  </switch>
1357                </g>
1358              </g>
1359            </g>
1360            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-108">
1361              <g>
1362                <rect x="290" y="320" width="90" height="20" fill="none" stroke="none" pointer-events="all"/>
1363              </g>
1364              <g>
1365                <g transform="translate(-0.5 -0.5)">
1366                  <switch>
1367                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1368                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 88px; height: 1px; padding-top: 330px; margin-left: 292px;">
1369                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1370                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1371                            <font color="#ffffff">bat-0.24.0/</font>
1372                          </div>
1373                        </div>
1374                      </div>
1375                    </foreignObject>
1376                    <text x="292" y="334" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">bat-0.24.0/</text>
1377                  </switch>
1378                </g>
1379              </g>
1380            </g>
1381            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-107">
1382              <g>
1383                <rect x="310" y="300" width="90" height="20" fill="none" stroke="none" pointer-events="all"/>
1384              </g>
1385              <g>
1386                <g transform="translate(-0.5 -0.5)">
1387                  <switch>
1388                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1389                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 88px; height: 1px; padding-top: 310px; margin-left: 312px;">
1390                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1391                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1392                            <font color="#ffffff">r2.18.tar.gz</font>
1393                          </div>
1394                        </div>
1395                      </div>
1396                    </foreignObject>
1397                    <text x="312" y="314" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">r2.18.tar.gz</text>
1398                  </switch>
1399                </g>
1400              </g>
1401            </g>
1402            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-106">
1403              <g>
1404                <rect x="290" y="280" width="170" height="20" fill="none" stroke="none" pointer-events="all"/>
1405              </g>
1406              <g>
1407                <g transform="translate(-0.5 -0.5)">
1408                  <switch>
1409                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1410                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 168px; height: 1px; padding-top: 290px; margin-left: 292px;">
1411                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1412                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0,
1412 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1413                            <font color="#ffffff">j4-dmenu-desktop-2.18/</font>
1414                          </div>
1415                        </div>
1416                      </div>
1417                    </foreignObject>
1418                    <text x="292" y="294" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">j4-dmenu-desktop-2.18/</text>
1419                  </switch>
1420                </g>
1421              </g>
1422            </g>
1423            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-78">
1424              <g>
1425                <rect x="270" y="260" width="70" height="20" fill="none" stroke="none" pointer-events="all"/>
1426              </g>
1427              <g>
1428                <g transform="translate(-0.5 -0.5)">
1429                  <switch>
1430                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1431                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 68px; height: 1px; padding-top: 270px; margin-left: 272px;">
1432                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1433                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1434                            <font color="#ffffff">sources/</font>
1435                          </div>
1436                        </div>
1437                      </div>
1438                    </foreignObject>
1439                    <text x="272" y="274" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">sources/</text>
1440                  </switch>
1441                </g>
1442              </g>
1443            </g>
1444            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-51">
1445              <g>
1446                <rect x="290" y="240" width="30" height="20" fill="none" stroke="none" pointer-events="all"/>
1447              </g>
1448              <g>
1449                <g transform="translate(-0.5 -0.5)">
1450                  <switch>
1451                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1452                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 28px; height: 1px; padding-top: 250px; margin-left: 292px;">
1453                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1454                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1455                            <font color="#ffffff">...</font>
1456                          </div>
1457                        </div>
1458                      </div>
1459                    </foreignObject>
1460                    <text x="292" y="254" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">...</text>
1461                  </switch>
1462                </g>
1463              </g>
1464            </g>
1465            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-46">
1466              <g>
1467                <rect x="290" y="200" width="220" height="20" fill="none" stroke="none" pointer-events="all"/>
1468              </g>
1469              <g>
1470                <g transform="translate(-0.5 -0.5)">
1471                  <switch>
1472                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1473                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 218px; height: 1px; padding-top: 210px; margin-left: 292px;">
1474                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1475                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1476                            <font color="#ffffff">oniguruma-6.9.9_1.x86_64.xbps</font>
1477                          </div>
1478                        </div>
1479                      </div>
1480                    </foreignObject>
1481                    <text x="292" y="214" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">oniguruma-6.9.9_1.x86_64.xbps</text>
1482                  </switch>
1483                </g>
1484              </g>
1485            </g>
1486            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-47">
1487              <g>
1488                <rect x="290" y="180" width="180" height="20" fill="none" stroke="none" pointer-events="all"/>
1489              </g>
1490              <g>
1491                <g transform="translate(-0.5 -0.5)">
1492                  <switch>
1493                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1494                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 178px; height: 1px; padding-top: 190px; margin-left: 292px;">
1495                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1496                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1497                            <font color="#ffffff">bat-0.24.0_1.x86_64.xbps</font>
1498                          </div>
1499                        </div>
1500                      </div>
1501                    </foreignObject>
1502                    <text x="292" y="194" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">bat-0.24.0_1.x86_64.xbps</text>
1503                  </switch>
1504                </g>
1505              </g>
1506            </g>
1507            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-45">
1508              <g>
1509                <rect x="290" y="160" width="260" height="20" fill="none" stroke="none" pointer-events="all"/>
1510              </g>
1511              <g>
1512                <g transform="translate(-0.5 -0.5)">
1513                  <switch>
1514                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1515                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 258px; height: 1px; padding-top: 170px; margin-left: 292px;">
1516                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1517                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1518                            <font color="#ffffff">j4-dmenu-desktop-2.18_3.x86_64.xbps</font>
1519                          </div>
1520                        </div>
1521                      </div>
1522                    </foreignObject>
1523                    <text x="292" y="174" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">j4-dmenu-desktop-2.18_3.x86_64.xbps</text>
1524                  </switch>
1525                </g>
1526              </g>
1527            </g>
1528            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-350">
1529              <g>
1530                <rect x="290" y="140" width="110" height="20" fill="none" stroke="none" pointer-events="all"/>
1531              </g>
1532              <g>
1533                <g transform="translate(-0.5 -0.5)">
1534                  <switch>
1535                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1536                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 108px; height: 1px; padding-top: 150px; margin-left: 292px;">
1537                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1538                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1539                            <font color="#ffffff">x86_64-repodata</font>
1540                          </div>
1541                        </div>
1542                      </div>
1543                    </foreignObject>
1544                    <text x="292" y="154" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">x86_64-repodata</text>
1545                  </switch>
1546                </g>
1547              </g>
1548            </g>
1549            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-351">
1550              <g>
1551                <rect x="270" y="460" width="30" height="20" fill="none" stroke="none" pointer-events="all"/>
1552              </g>
1553              <g>
1554                <g transform="translate(-0.5 -0.5)">
1555                  <switch>
1556                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1557                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 28px; height: 1px; padding-top: 470px; margin-left: 272px;">
1558                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1559                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1560                            <font color="#ffffff">...</font>
1561                          </div>
1562                        </div>
1563                      </div>
1564                    </foreignObject>
1565                    <text x="272" y="474" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">...</text>
1566                  </switch>
1567                </g>
1568              </g>
1569            </g>
1570            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-40">
1571              <g>
1572                <rect x="250" y="90" width="70" height="20" fill="none" stroke="none" pointer-events="all"/>
1573              </g>
1574              <g>
1575                <g transform="translate(-0.5 -0.5)">
1576                  <switch>
1577                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1578                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 68px; height: 1px; padding-top: 100px; margin-left: 252px;">
1579                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1580                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1581                            <font color="#ffffff">hostdir/</font>
1582                          </div>
1583                        </div>
1584                      </div>
1585                    </foreignObject>
1586                    <text x="252" y="104" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">hostdir/</text>
1587                  </switch>
1588                </g>
1589              </g>
1590            </g>
1591            <g data-cell-id="fA-aBRfLOOjbHgrEFDjI-44">
1592              <g>
1593                <rect x="270" y="120" width="70" height="20" fill="none" stroke="none" pointer-events="all"/>
1594              </g>
1595              <g>
1596                <g transform="translate(-0.5 -0.5)">
1597                  <switch>
1598                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1599                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 68px; height: 1px; padding-top: 130px; margin-left: 272px;">
1600                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1601                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1602                            <font color="#ffffff">binpkgs/</font>
1603                          </div>
1604                        </div>
1605                      </div>
1606                    </foreignObject>
1607                    <text x="272" y="134" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">binpkgs/</text>
1608                  </switch>
1609                </g>
1610              </g>
1611            </g>
1612            <g data-cell-id="v_S-9-zrldfwNLv2zRYd-3">
1613              <g>
1614                <rect x="290" y="220" width="220" height="20" fill="none" stroke="none" pointer-events="all"/>
1615              </g>
1616              <g>
1617                <g transform="translate(-0.5 -0.5)">
1618                  <switch>
1619                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1620                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 218px; height: 1px; padding-top: 230px; margin-left: 292px;">
1621                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1622                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1623                            <font color="#ffffff">rofimoji-6.2.0_1.x86_64.xbps</font>
1624                          </div>
1625                        </div>
1626                      </div>
1627                    </foreignObject>
1628                    <text x="292" y="234" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">rofimoji-6.2.0_1.x86_64.xbps</text>
1629                  </switch>
1630                </g>
1631              </g>
1632            </g>
1633            <g data-cell-id="v_S-9-zrldfwNLv2zRYd-5">
1634              <g>
1635                <rect x="290" y="400" width="110" height="20" fill="none" stroke="none" pointer-events="all"/>
1636              </g>
1637              <g>
1638                <g transform="translate(-0.5 -0.5)">
1639                  <switch>
1640                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1641                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 108px; height: 1px; padding-top
1641: 410px; margin-left: 292px;">
1642                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1643                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1644                            <font color="#ffffff">rofimoji-6.2.0/</font>
1645                          </div>
1646                        </div>
1647                      </div>
1648                    </foreignObject>
1649                    <text x="292" y="414" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">rofimoji-6.2.0/</text>
1650                  </switch>
1651                </g>
1652              </g>
1653            </g>
1654            <g data-cell-id="v_S-9-zrldfwNLv2zRYd-6">
1655              <g>
1656                <rect x="310" y="420" width="90" height="20" fill="none" stroke="none" pointer-events="all"/>
1657              </g>
1658              <g>
1659                <g transform="translate(-0.5 -0.5)">
1660                  <switch>
1661                    <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
1662                      <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 88px; height: 1px; padding-top: 430px; margin-left: 312px;">
1663                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
1664                          <div style="display: inline-block; font-size: 12px; font-family: &quot;Source Code Pro&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
1665                            <font color="#ffffff">6.2.0.tar.gz</font>
1666                          </div>
1667                        </div>
1668                      </div>
1669                    </foreignObject>
1670                    <text x="312" y="434" fill="rgb(0, 0, 0)" font-family="&quot;Source Code Pro&quot;" font-size="12px">6.2.0.tar.gz</text>
1671                  </switch>
1672                </g>
1673              </g>
1674            </g>
1675          </g>
1676        </g>
1677      </g>
1678    </g>
1679  </g>
1680</svg>
1681<p>The most important is <code>xbps-src</code>. It is a Bash script which uses XBPS to
1682build and package programs.</p>
1683<p>The <code>srcpkgs</code> directory contains all <em>templates</em> used by <code>xbps-src</code> to build
1684packages. Templates contain metadata of a package and instructions for building
1685it.</p>
1686<p>The <code>hostdir</code> directory has two main purposes: it stores the source archives (or
1687other files that have to be downloaded for the package to build) and it stores
1688the built <code>.xbps</code> packages.</p>
1689<p>Source archives are stored in <code>hostdir/sources/&lt;package name&gt;-&lt;version&gt;/</code>. It is
1690influenced by the <code>distfiles</code> variable (<a href="#distfiles">this is explained later</a>).</p>
1691<p>The resulting <code>.xbps</code> packages will end up in <code>hostdir/binpkgs</code> or
1692<code>hostdir/binpkgs/&lt;branch&gt;</code> if you are on a custom git branch (not on <code>master</code>).</p>
1693<p>But the most important directory is <code>masterdir-&lt;arch&gt;</code> (I will from now on
1694assume that your computer is x86_64 and refer to this directory as
1695<code>masterdir-x86_64</code> like on the diagram above<sup class="footnote-reference"><a href="#uname">3</a></sup>). The package is built within
1696it. It is isolated from the rest of the computer. It contains a small Void Linux
1697install suitable for chrooting (no kernel included, no firmware included, no
1698user utilities). It has the <code>base-chroot</code> base package<sup class="footnote-reference"><a href="#basechroot">4</a></sup> installed
1699(normal Void Linux systems have <code>base-system</code> installed).</p>
1700<p>The source of the package will be extracted (or put by other means) to
1701<code>masterdir-x86_64/builddir/&lt;package name&gt;-&lt;version&gt;/</code> and it will install the
1702built executable and supplementary files to
1703<code>masterdir-x86_64/destdir/&lt;package name&gt;-&lt;version&gt;</code> as if it was
1704installing to <code>/</code>. This is called <strong>“fake destdir”</strong> and it is supported by most
1705major build systems. For instance, if a program would be normally installed to
1706<code>/usr/bin/j4-dmenu-desktop</code>, it will be installed to
1707<code>builddir/destdir/j4-dmenu-desktop-2.18/usr/bin/j4-dmenu-desktop</code> instead
1708(relative to <code>masterdir-x86_64/</code>).</p>
1709<p><code>xbps-src</code> requires the installed files to be in the masterdir to know which
1710files belong to the package.</p>
1711<p>This is a lot of information. The best way to take it all in is by practising
1712writing templates. But first, we need to know how to build a package:</p>
1713<h3 id="basic-usage-of-xbps-src"><a class="header" href="#basic-usage-of-xbps-src">Basic usage of xbps-src</a></h3>
1714<p>To build packages, a masterdir must be installed. You can bootstrap the
1715masterdir with this command:</p>
1716<pre><code>./xbps-src binary-bootstrap
1717</code></pre>
1718<p>This installs a minimal version of Void Linux to <code>masterdir-x86_64</code>. This takes
1719about two minutes on my notebook.</p>
1720<p>You can then build packages in
1721<a href="https://github.com/void-linux/void-packages">void-packages</a> with</p>
1722<pre><code>./xbps-src pkg &lt;package&gt;
1723</code></pre>
1724<p>You can install built packages with</p>
1725<pre><code>sudo xi -f &lt;package&gt;
1726</code></pre>
1727<p>(The <code>xi</code> utility is provided by the <code>xtools</code> package.)</p>
1728<div id="admonition-info" class="admonition admonish-info">
1729<div class="admonition-title">
1730<p>Info</p>
1731<p><a class="admonition-anchor-link" href="#admonition-info"></a></p>
1732</div>
1733<div>
1734<p>When <code>xi</code> is run as a normal user, it elevates itself using <code>sudo</code>, <code>doas</code> or
1735<code>su</code> (in this order). This means that you can omit <code>sudo</code> above.</p>
1736</div>
1737</div>
1738<p>If a package build fails, the files are still kept in place for inspection. You
1739should run</p>
1740<pre><code>./xbps-src clean
1741</code></pre>
1742<p>to clean <code>builddir</code>, <code>destdir</code> and to remove installed dependencies from
1743masterdir.</p>
1744<p>As noted in the <a href="../troubleshooting.html">troubleshooting page</a>, you should run
1745<code>./xbps-src clean</code> often when debugging a failing build.</p>
1746<div id="admonition-tip" class="admonition admonish-tip">
1747<div class="admonition-title">
1748<p>Tip</p>
1749<p><a class="admonition-anchor-link" href="#admonition-tip"></a></p>
1750</div>
1751<div>
1752<p>This is pretty useful by the way. If an <code>xbps-src</code> build fails, you can always
1753look into <code>masterdir-x86_64/builddir/&lt;package name&gt;-&lt;version&gt;</code> to find the
1754package in the state <code>xbps-src</code> left it in if the package build fails.</p>
1755</div>
1756</div>
1757<h3 id="introduction-to-templates-aka-the-return-of-j4-dmenu-desktop"><a class="header" href="#introduction-to-templates-aka-the-return-of-j4-dmenu-desktop">Introduction to templates (aka the return of j4-dmenu-desktop)</a></h3>
1758<div id="admonition-warning" class="admonition admonish-warning">
1759<div class="admonition-title">
1760<p>Warning</p>
1761<p><a class="admonition-anchor-link" href="#admonition-warning"></a></p>
1762</div>
1763<div>
1764<p><code>j4-dmenu-desktop</code> is <a href="https://github.com/void-linux/void-packages/tree/master/srcpkgs/j4-dmenu-desktop">already packaged in
1765void-packages</a>.
1766You’ll have to remove it if you want to follow along. You can remove it by
1767running:</p>
1768<pre><code>rm -r srcpkgs/j4-dmenu-desktop
1769</code></pre>
1770</div>
1771</div>
1772<p>Let’s package j4-dmenu-desktop.</p>
1773<p>You may remember the build steps from before:</p>
1774<pre><code class="language-sh">git clone https://github.com/enkore/j4-dmenu-desktop.git
1775cd j4-dmenu-desktop
1776# Setup a builddir (this is CMake specific stuff)
1777mkdir build
1778cd build
1779# Configure j4-dmenu-desktop
1780cmake ..
1781# Build
1782make
1783# Install j4-dmenu-desktop to system directories
1784sudo make install
1785</code></pre>
1786<p>We just have to put it into a template and we’re done<sup class="footnote-reference"><a href="#ornot">5</a></sup>.</p>
1787<p>A template contains metadata of the package and instructions for <code>xbps-src</code> to
1788build the package.</p>
1789<p><code>xnew</code> is used to make a new template. <code>xnew</code> isn’t a part of <code>void-packages</code>,
1790but it’s from the <code>xtools</code> package. <code>xtools</code> contains many useful utilities for
1791building packages and for using Void Linux in general. Install it:</p>
1792<pre><code>sudo xbps-install -S xtools
1793</code></pre>
1794<p>A new template is created like this:</p>
1795<pre><code>
1795xnew j4-dmenu-desktop
1796</code></pre>
1797<p><em>Make sure you have removed <code>srcpkgs/j4-dmenu-desktop</code> as mentioned at the
1798beginning of this section if you want to follow along with packaging
1799<code>j4-dmenu-desktop</code>.</em></p>
1800<p><code>xnew</code> will open <code>srcpkgs/j4-dmenu-desktop/template</code> in your editor (you can set
1801your editor with <code>$EDITOR</code> or <code>$VISUAL</code>) and prefill some variables:</p>
1802<pre><code class="language-bash"># Template file for 'j4-dmenu-desktop'
1803pkgname=j4-dmenu-desktop
1804version=
1805revision=1
1806#archs="i686 x86_64"
1807#build_wrksrc=
1808build_style=gnu-configure
1809#configure_args=""
1810#make_build_args=""
1811#make_install_args=""
1812#conf_files=""
1813#make_dirs="/var/log/dir 0755 root root"
1814hostmakedepends=""
1815makedepends=""
1816depends=""
1817short_desc=""
1818maintainer="meator &lt;[email protected]&gt;"
1819license="GPL-3.0-or-later"
1820homepage=""
1821#changelog=""
1822distfiles=""
1823checksum=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
1824</code></pre>
1825<p>This template will contain instructions for <code>xbps-src</code> to build your package.</p>
1826<p>A template is (like <code>xbps-src</code>) a Bash script. Templates are sourced by
1827<code>xbps-src</code>, so they do not contain shebang.</p>
1828<p><code>xbps-src</code> expects some variables to be set in the template. All templates
1829should include <code>pkgname</code>, <code>version</code>, <code>revision</code>, <code>short_desc</code>, <code>maintainer</code>,
1830<code>license</code> and <code>homepage</code>.</p>
1831<p>Most of these variables contain metadata of the package. Here is their
1832explanation:</p>
1833<ul>
1834<li>
1835<p><code>pkgname</code> = name of the package</p>
1836<p>Choosing a name for a package can be sometimes tricky. It should follow the
1837upstream name. If you’re unsure, read Void’s <a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#programs">package naming
1838conventions</a>.</p>
1839</li>
1840<li>
1841<p><code>version</code> = version of the package; it cannot contain dashes or underscore
1842and at least one digit is required</p>
1843<p>The version shouldn’t contain unnecessary characters:</p>
1844 <div id="admonition-bad" class="admonition admonish-failure">
1845 <div class="admonition-title">
1846<p>Bad</p>
1847<p><a class="admonition-anchor-link" href="#admonition-bad"></a></p>
1848 </div>
1849 <div>
1850<p><code>version=r2.18</code>
1851or
1852<code>version=v0.24.0</code></p>
1853 </div>
1854 </div>
1855 <div id="admonition-good" class="admonition admonish-success">
1856 <div class="admonition-title">
1857<p>Good</p>
1858<p><a class="admonition-anchor-link" href="#admonition-good"></a></p>
1859 </div>
1860 <div>
1861<p><code>version=2.18</code>
1862or
1863<code>version=0.24.0</code></p>
1864 </div>
1865 </div>
1866<p>But all rules have exceptions. I’ve recently <a href="https://sourceforge.net/projects/sf-xpaint/files/libxaw3dxft/">seen a
1867package</a> that
1868uses letters for versioning (<code>1.6.2</code>, <code>1.6.2b</code>, <code>1.6.2c</code>, <code>1.6.2d</code>…). The
1869letters should of course be included in <code>version</code> for this specific package,
1870because they are necessary to differentiate versions. And then there is the
1871legendary
1872<code>font-adobe-source-code-pro-2.038R~ro+1.058R~it+1.018R~VAR_1</code>. This package’s
1873<code>pkgver</code> is so long that it breaks the UI of some XBPS utilities (but it’s only
1874visual).</p>
1875</li>
1876<li>
1877<p><code>revision</code> = revision of the package; it might sometimes be necessary to
1878update a package without changing its version (this is a
1879so-called “revbump”); this is useful when the currently packaged
1880version of the program needs fixing</p>
1881<p>The <code>pkgver</code> of a package consists of <code>${pkgname}-${version}_${revision}</code>.
1882For example <code>j4-dmenu-desktop-2.18_3</code>. As you can see, <code>revision</code> is
1883specified alongside the <code>version</code>.</p>
1884<p>New packages should always have <code>revision=1</code>.</p>
1885</li>
1886<li>
1887<p><code>build_style</code> = <a href="#build-styles"><em>we’ll come back to this later</em></a></p>
1888</li>
1889<li>
1890<p><code>hostmakedepends</code>, <code>makedepends</code>, <code>depends</code> = the different types of
1891dependencies of the package; <a href="#dependencies"><em>we’ll come back to this later</em></a></p>
1892</li>
1893<li>
1894<p><code>short_desc</code> = a short description of the package; the maximum is 72
1895characters, it mustn’t start with an article and it should
1896start with an uppercase letter:</p>
1897 <div id="admonition-bad-1" class="admonition admonish-failure">
1898 <div class="admonition-title">
1899<p>Bad</p>
1900<p><a class="admonition-anchor-link" href="#admonition-bad-1"></a></p>
1901 </div>
1902 <div>
1903<p><code>short_desc="A desktop menu"</code>
1904or
1905<code>short_desc="desktop menu"</code></p>
1906 </div>
1907 </div>
1908 <div id="admonition-good-1" class="admonition admonish-success">
1909 <div class="admonition-title">
1910<p>Good</p>
1911<p><a class="admonition-anchor-link" href="#admonition-good-1"></a></p>
1912 </div>
1913 <div>
1914<p><code>short_desc="Desktop menu"</code></p>
1915 </div>
1916 </div>
1917<p>The description should be terse (it is called <code>short_desc</code> for a reason):</p>
1918 <div id="admonition-bad-2" class="admonition admonish-failure">
1919 <div class="admonition-title">
1920<p>Bad</p>
1921<p><a class="admonition-anchor-link" href="#admonition-bad-2"></a></p>
1922 </div>
1923 <div>
1924<pre><code class="language-sh">short_desc="This is a desktop menu"
1925</code></pre>
1926<pre><code class="language-sh">short_desc="Desktop menu with support for dmenu-compatible menu programs"
1927</code></pre>
1928 </div>
1929 </div>
1930<p>A good choice for <code>short_desc</code> is the GitHub short description (if the
1931packaged project has one):</p>
1932<p><img src="../images/j4-dmenu-desktop/github_description.png" alt="GitHub description" /></p>
1933<p>(The “A” article has to be removed here.)</p>
1934</li>
1935<li>
1936<p><code>maintainer</code> = you; <code>xnew</code> prefills this field using git, so you don’t need to
1937change it</p>
1938</li>
1939<li>
1940<p><code>license</code> = this has to be a <a href="https://spdx.org/licenses/">SPDX identifier</a></p>
1941<div id="admonition-tip-1" class="admonition admonish-tip">
1942<div class="admonition-title">
1943<p>Tip</p>
1944<p><a class="admonition-anchor-link" href="#admonition-tip-1"></a></p>
1945</div>
1946<div>
1947<p>Identifying license(s) can be difficult sometimes. There are some programs
1948which specialise in identifying licenses of projects. Some of them can return
1949SPDX identifiers. You can find a list at
1950<a href="https://github.com/todogroup/awesome-ospo/blob/main/README.md#licensing">https://github.com/todogroup/awesome-ospo/blob/main/README.md#licensing</a></p>
1951</div>
1952</div>
1953<p><code>j4-dmenu-desktop</code> is licensed under the GNU General Public License version 3
1954or later, which corresponds to the <code>GPL-3.0-or-later</code> SPDX identifier</p>
1955<p>Void Linux provides <code>spdx-licenses-html</code>, <code>spdx-licenses-json</code>,
1956<code>spdx-licenses-list</code> and <code>spdx-licenses-text</code> packages if you don’t want to
1957look up the licenses online. <code>spdx-licenses-list</code> is a dependency of <code>xtools</code>,
1958so you will already have that installed.</p>
1959<div id="admonition-exercise-for-the-reader" class="admonition admonish-question">
1960<div class="admonition-title">
1961<p>Exercise for the reader</p>
1962<p><a class="admonition-anchor-link" href="#admonition-exercise-for-the-reader"></a></p>
1963</div>
1964<div>
1965<p>Where does <code>spdx-licenses-list</code> put the license list?</p>
1966<details>
1967  <summary>Answer</summary>
1968<pre><code>&gt; xbps-query -f spdx-licenses-list
1969/usr/share/spdx/license.lst
1970</code></pre>
1971<p>See <a href="#the-better-way">the better way</a>.</p>
1972</details>
1973</div>
1974</div>
1975<p>A project can have multiple licenses. <a href="https://spdx.github.io/spdx-spec/v3.0/annexes/SPDX-license-expressions/">SPDX license
1976expressions</a>
1977should be used when that happens. (examples: <code>MIT OR Apache-2.0</code>, <code>MIT AND (LGPL-2.1-or-later OR BSD-3-Clause)</code>).</p>
1978<div id="admonition-note" class="admonition admonish-note">
1979<div class="admonition-title">
1980<p>Note</p>
1981<p><a class="admonition-anchor-link" href="#admonition-note"></a></p>
1982</div>
1983<div>
1984<p>void-packages used to use a comma (“, “) to separate licenses. This is now
1985discouraged. The legacy comma-separated format should be converted when
1986encountered (old example: <code>GPL-3.0-or-later, custom:Hugware</code>).</p>
1987</div>
1988</div>
1989</li>
1990<li>
1991<p><code>homepage</code> = project’s homepage; a link to the GitHub/GitLab etc. repository
1992is usually sufficient (if the project doesn’t have a custom
1993website)</p>
1994</li>
1995<li>
1996<p><code>distfiles</code> = project source; <a href="#distfiles"><em>we’ll come back to this later</em></a></p>
1997</li>
1998<li>
1999<p><code>checksum</code> = sha256sum of <code>distfiles</code></p>
2000</li>
2001<li>
2002<p><code>changelog</code> = a (preferably plaintext) changelog of the project; it is
2003optional, not all packages have it</p>
2004<p>If the project has a <code>CHANGELOG</code> or <code>CHANGELOG.md</code> (or something similar) in
2005its repository, you should link to it in <code>changelog</code>, but you should link to
2006a plaintext version. GitHub has a button for that:</p>
2007<p><img src="../images/j4-dmenu-desktop/changelog_raw_button.png" alt="changelog raw button" /></p>
2008<p>You can then copy the link.</p>
2009<div id="admonition-bad-3" class="admonition admonish-failure">
2010<div class="admonition-title">
2011<p>Bad</p>
2012<p><a class="admonition-anchor-link" href="#admonition-bad-3"></a></p>
2013</div>
2014<div>
2015<p><code>https://github.com/enkore/j4-dmenu-desktop/blob/develop/CHANGELOG</code></p>
2016</div>
2017</div>
2018<div id="admonition-good-2" class="admonition admonish-success">
2019<div class="admonition-title">
2020<p>Good</p>
2021<p><a class="admonition-anchor-link" href="#admonition-good-2"></a></p>
2022</div>
2023<div>
2024<p><code>https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG</code></p>
2025</div>
2026</div>
2027</li>
2028</ul>
2029<p>We need to gather all of this information about <code>j4-dmenu-desktop</code> to be able to
2030package it.</p>
2031<p>We will be packaging the release <code>2.18</code> (<a href="#admonition-attention">see note</a>)
2032of <code>j4-dmenu-desktop</code>. Its <code>short_desc</code> is <code>Fast desktop menu</code>, <code>maintainer</code>
2033is prefilled, <code>j4-dmenu-desktop</code>’s license is <code>GPL-3.0-or-later</code>, its homepage
2034is <a href="https://github.com/enkore/j4-dmenu-desktop">https://github.com/enkore/j4-dmenu-desktop</a> and its changelog is
2035<a href="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG">https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG</a>.
2036This is all we need for now.</p>
2037<h4 id="some-progress"><a class="header" href="#some-progress">Some progress</a></h4>
2038<pre><code class="language-bash">
2038# Template file for 'j4-dmenu-desktop'
2039pkgname=j4-dmenu-desktop
2040version=2.18
2041revision=1
2042#archs="i686 x86_64"
2043#build_wrksrc=
2044build_style=gnu-configure
2045#configure_args=""
2046#make_build_args=""
2047#make_install_args=""
2048#conf_files=""
2049#make_dirs="/var/log/dir 0755 root root"
2050hostmakedepends=""
2051makedepends=""
2052depends=""
2053short_desc="Fast desktop menu"
2054maintainer="meator &lt;[email protected]&gt;"
2055license="GPL-3.0-or-later"
2056homepage="https://github.com/enkore/j4-dmenu-desktop"
2057# We have uncommented the changelog variable.
2058changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
2059distfiles=""
2060checksum=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
2061</code></pre>
2062<p>We won’t need any of the commented-out variables. We’ll also not need
2063<code>build-style</code>, <code>distfiles</code> and <code>checksum</code> (Or will we? <em>foreshadowing</em>):</p>
2064<pre><code class="language-bash"># Template file for 'j4-dmenu-desktop'
2065pkgname=j4-dmenu-desktop
2066version=2.18
2067revision=1
2068hostmakedepends=""
2069makedepends=""
2070depends=""
2071short_desc="Fast desktop menu"
2072maintainer="meator &lt;[email protected]&gt;"
2073license="GPL-3.0-or-later"
2074homepage="https://github.com/enkore/j4-dmenu-desktop"
2075changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
2076</code></pre>
2077<p>I have left the <code>hostmakedepends</code>, <code>makedepends</code> and <code>depends</code> variables. We
2078will fill these out later.</p>
2079<p>That’s looking nice and simple. Now, we just have to add the build instructions.
2080For that, we will need build phases.</p>
2081<h3 id="build-phases"><a class="header" href="#build-phases">Build phases</a></h3>
2082<p>An <code>xbps-src</code> build has 10 phases:</p>
2083<?xml version="1.0" encoding="UTF-8"?>
2084<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
2085<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-0.5 -0.5 697 407">
2086  <g>
2087    <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-0">
2088      <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-1">
2089        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-0">
2090          <g>
2091            <path d="M 88 46 L 88 135.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2092            <path d="M 88 139.76 L 85 133.76 L 88 135.26 L 91 133.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2093          </g>
2094        </g>
2095        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-5">
2096          <g>
2097            <rect x="0" y="22" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2098          </g>
2099          <g>
2100            <g transform="translate(-0.5 -0.5)">
2101              <switch>
2102                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2103                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 34px; margin-left: 88px;">
2104                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2105                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; font-style: italic; white-space: nowrap;">setup</div>
2106                    </div>
2107                  </div>
2108                </foreignObject>
2109                <text x="88" y="38" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle" font-style="italic">setup</text>
2110              </switch>
2111            </g>
2112          </g>
2113        </g>
2114        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-1">
2115          <g>
2116            <path d="M 88 166 L 88 255.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2117            <path d="M 88 259.76 L 85 253.76 L 88 255.26 L 91 253.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2118          </g>
2119        </g>
2120        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-9">
2121          <g>
2122            <rect x="0" y="142" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2123          </g>
2124          <g>
2125            <g transform="translate(-0.5 -0.5)">
2126              <switch>
2127                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2128                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 154px; margin-left: 88px;">
2129                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2130                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">fetch</div>
2131                    </div>
2132                  </div>
2133                </foreignObject>
2134                <text x="88" y="158" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">fetch</text>
2135              </switch>
2136            </g>
2137          </g>
2138        </g>
2139        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-7">
2140          <g>
2141            <path d="M 88 286 L 88 294 Q 88 302 98 302 L 208 302 Q 218 302 218 292 L 218 16 Q 218 6 228 6 L 338 6 Q 348 6 348 10.63 L 348 15.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2142            <path d="M 348 19.76 L 345 13.76 L 348 15.26 L 351 13.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2143          </g>
2144        </g>
2145        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-13">
2146          <g>
2147            <rect x="0" y="262" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2148          </g>
2149          <g>
2150            <g transform="translate(-0.5 -0.5)">
2151              <switch>
2152                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2153                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 274px; margin-left: 88px;">
2154                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2155                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">extract</div>
2156                    </div>
2157                  </div>
2158                </foreignObject>
2159                <text x="88" y="278" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">extract</text>
2160              </switch>
2161            </g>
2162          </g>
2163        </g>
2164        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-2">
2165          <g>
2166            <path d="M 348 46 L 348 135.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2167            <path d="M 348 139.76 L 345 133.76 L 348 135.26 L 351 133.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2168          </g>
2169        </g>
2170        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-18">
2171          <g>
2172            <rect x="260" y="22" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2173          </g>
2174          <g>
2175            <g transform="translate(-0.5 -0.5)">
2176              <switch>
2177                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2178                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 34px; margin-left: 348px;">
2179                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2180                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; font-style: italic; white-space: nowrap;">patch</div>
2181                    </div>
2182                  </div>
2183                </foreignObject>
2184                <text x="348" y="38" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle" font-style="italic">patch</text>
2185              </switch>
2186            </g>
2187          </g>
2188        </g>
2189        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-3">
2190          <g>
2191            <path d="M 348 166 L 348 255.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2192            <path d="M 348 259.76 L 345 253.76 L 348 255.26 L 351 253.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2193          </g>
2194        </g>
2195        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-22">
2196          <g>
2197            <rect x="260" y="142" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2198          </g>
2199          <g>
2200            <g transform="translate(-0.5 -0.5)">
2201              <switch>
2202                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2203                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 154px; margin-left: 348px;">
2204                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2205                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">configure</div>
2206                    </div>
2207                  </div>
2208                </foreignObject>
2209                <text x="348" y="158" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">configure</text>
2210              </switch>
2211            </g>
2212          </g>
2213        </g>
2214        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-8">
2215          <g>
2216            <path d="M 348 286 L 348 294 Q 348 302 358 302 L 468 302 Q 478 302 478 292 L 478 16 Q 478 6 488 6 L 598 6 Q 608 6 608 10.63 L 608 15.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2217            <path d="M 608 19.76 L 605 13.76 L 608 15.26 L 611 13.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2218          </g>
2219        </g>
2220        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-26">
2221          <g>
2222            <rect x="260" y="262" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2223          </g>
2224          <g>
2225            <g transform="translate(-0.5 -0.5)">
2226              <switch>
2227                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2228                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 274px; margin-left: 348px;">
2229                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2230                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">build</div>
2231                    </div>
2232                  </div>
2233                </foreignObject>
2234                <text x="348" y="278" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">build</text>
2235              </switch>
2236            </g>
2237          </g>
2238        </g>
2239        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-31">
2240          <g>
2241            <rect x="520" y="382" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2242          </g>
2243          <g>
2244            <g transform="translate(-0.5 -0.5)">
2245              <switch>
2246                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2247                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 394px; margin-left: 608px;">
2248                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2249                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; font-style: italic; white-space: nowrap;">clean</div>
2250                    </div>
2251                  </div>
2252                </foreignObject>
2253                <text x="608" y="398" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle" font-style="italic">clean</text>
2254              </switch>
2255            </g>
2256          </g>
2257        </g>
2258        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-4">
2259          <g>
2260            <path d="M 608 46 L 608 135.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2261            <path d="M 608 139.76 L 605 133.76 L 608 135.26 L 611 133.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2262          </g>
2263        </g>
2264        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-35">
2265          <g>
2266            <rect x="520" y="22" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2267          </g>
2268          <g>
2269            <g transform="translate(-0.5 -0.5)">
2270              <switch>
2271                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2272                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 34px; margin-left: 608px;">
2273                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2274                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">check</div>
2275                    </div>
2276                  </div>
2277                </foreignObject>
2278                <text x="608" y="38" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">check</text>
2279              </switch>
2280            </g>
2281          </g>
2282        </g>
2283        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-5">
2284          <g>
2285            <path d="M 608 166 L 608 255.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2286            <path d="M 608 259.76 L 605 253.76 L 608 255.26 L 611 253.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2287          </g>
2288        </g>
2289        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-39">
2290          <g>
2291            <rect x="520" y="142" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2292          </g>
2293          <g>
2294            <g transform="translate(-0.5 -0.5)">
2295              <switch>
2296                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2297                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 154px; margin-left: 608px;">
2298                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2299                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">install</div>
2300                    </div>
2301                  </div>
2302                </foreignObject>
2303                <text x="608" y="158" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">install</text>
2304              </switch>
2305            </g>
2306          </g>
2307        </g>
2308        <g data-cell-id="SD6Gusq6D9mHT7IAJ8YI-6">
2309          <g>
2310            <path d="M 608 286 L 608 375.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2311            <path d="M 608 379.76 L 605 373.76 L 608 375.26 L 611 373.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2312          </g>
2313        </g>
2314        <g data-cell-id="kFpQw-A_qMYXMrE2HkUb-43">
2315          <g>
2316            <rect x="520" y="262" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2317          </g>
2318          <g>
2319            <g transform="translate(-0.5 -0.5)">
2320              <switch>
2321                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2322                  <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 274px; margin-left: 608px;">
2323                    <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2324                      <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; font-style: italic; white-space: nowrap;">pkg</div>
2325                    </div>
2326                  </div>
2327                </foreignObject>
2328                <text x="608" y="278" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle" font-style="italic">pkg</text>
2329              </switch>
2330            </g>
2331          </g>
2332        </g>
2333      </g>
2334    </g>
2335  </g>
2336</svg>
2337<p>(Phases in italic are less important for writing templates.)</p>
2338<p>Almost all phases have a <code>pre_&lt;phase&gt;()</code> and a <code>post_&lt;phase&gt;()</code> functions. These
2339get executed before and after said phase. The phase itself is the function
2340<code>do_&lt;phase&gt;()</code>. Here are all phases that can be overridden in a template:</p>
2341<?xml version="1.0" encoding="UTF-8"?>
2342<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
2343<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-0.5 -0.5 721 389">
2344  <g>
2345    <g data-cell-id="J-DJAKfkipe2veX9CSEc-0">
2346      <g data-cell-id="J-DJAKfkipe2veX9CSEc-1">
2347        <g data-cell-id="52vn3jHzFmYFyWnHdmzb-8">
2348          <g>
2349            <path d="M 348 366 L 348 374 Q 348 382 358 382 L 468 382 Q 478 382 478 372 L 478 16 Q 478 6 488 6 L 598 6 Q 608 6 608 10.63 L 608 15.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2350            <path d="M 608 19.76 L 605 13.76 L 608 15.26 L 611 13.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2351          </g>
2352        </g>
2353        <g data-cell-id="zr5FfvxFWCFZOBII-Wph-3">
2354          <g>
2355            <path d="M 88 366 L 88 374 Q 88 382 98 382 L 208 382 Q 218 382 218 372 L 218 16 Q 218 6 228 6 L 338 6 Q 348 6 348 10.63 L 348 15.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2356            <path d="M 348 19.76 L 345 13.76 L 348 15.26 L 351 13.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2357          </g>
2358        </g>
2359        <g data-cell-id="SdFhppqQnM_idIOyzOvG-0">
2360          <g/>
2361          <g data-cell-id="J-DJAKfkipe2veX9CSEc-8">
2362            <g>
2363              <rect x="0" y="142" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2364            </g>
2365            <g>
2366              <g transform="translate(-0.5 -0.5)">
2367                <switch>
2368                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2369                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 154px; margin-left: 88px;">
2370                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2371                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">pre_fetch()</div>
2372                      </div>
2373                    </div>
2374                  </foreignObject>
2375                  <text x="88" y="158" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">pre_fetch()</text>
2376                </switch>
2377              </g>
2378            </g>
2379          </g>
2380          <g data-cell-id="J-DJAKfkipe2veX9CSEc-9">
2381            <g>
2382              <rect x="24" y="182" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2383            </g>
2384            <g>
2385              <g transform="translate(-0.5 -0.5)">
2386                <switch>
2387                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2388                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 194px; margin-left: 112px;">
2389                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2390                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">do_fetch()</div>
2391                      </div>
2392                    </div>
2393                  </foreignObject>
2394                  <text x="112" y="198" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_fetch()</text>
2395                </switch>
2396              </g>
2397            </g>
2398          </g>
2399          <g data-cell-id="Gq9OwwQfZJhTHJtuafed-0">
2400            <g>
2401              <path d="M 88 166 L 106.4 178.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2402              <path d="M 110.14 180.76 L 103.48 179.93 L 106.4 178.26 L 106.81 174.94 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2403            </g>
2404          </g>
2405          <g data-cell-id="J-DJAKfkipe2veX9CSEc-10">
2406            <g>
2407              <rect x="0" y="222" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2408            </g>
2409            <g>
2410              <g transform="translate(-0.5 -0.5)">
2411                <switch>
2412                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2413                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 234px; margin-left: 88px;">
2414                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2415                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">post_fetch()</div>
2416                      </div>
2417                    </div>
2418                  </foreignObject>
2419                  <text x="88" y="238" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">post_fetch()</text>
2420                </switch>
2421              </g>
2422            </g>
2423          </g>
2424          <g data-cell-id="Gq9OwwQfZJhTHJtuafed-1">
2425            <g>
2426              <path d="M 112 206 L 93.6 218.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2427              <path d="M 89.86 220.76 L 93.19 214.94 L 93.6 218.26 L 96.52 219.93 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2428            </g>
2429          </g>
2430          <g data-cell-id="J-DJAKfkipe2veX9CSEc-12">
2431            <g>
2432              <rect x="0" y="262" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2433            </g>
2434            <g>
2435              <g transform="translate(-0.5 -0.5)">
2436                <switch>
2437                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2438                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 274px; margin-left: 88px;">
2439                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2440                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">pre_extract()</div>
2441                      </div>
2442                    </div>
2443                  </foreignObject>
2444                  <text x="88" y="278" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">pre_extract()</text>
2445                </switch>
2446              </g>
2447            </g>
2448          </g>
2449          <g data-cell-id="zr5FfvxFWCFZOBII-Wph-0">
2450            <g>
2451              <path d="M 88 246 L 88 255.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2452              <path d="M 88 259.76 L 85 253.76 L 88 255.26 L 91 253.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2453            </g>
2454          </g>
2455          <g data-cell-id="J-DJAKfkipe2veX9CSEc-13">
2456            <g>
2457              <rect x="24" y="302" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2458            </g>
2459            <g>
2460              <g transform="translate(-0.5 -0.5)">
2461                <switch>
2462                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2463                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 314px; margin-left: 112px;">
2464                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2465                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">do_extract()</div>
2466                      </div>
2467                    </div>
2468                  </foreignObject>
2469                  <text x="112" y="318" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_extract()</text>
2470                </switch>
2471              </g>
2472            </g>
2473          </g>
2474          <g data-cell-id="zr5FfvxFWCFZOBII-Wph-1">
2475            <g>
2476              <path d="M 88 286 L 106.4 298.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2477              <path d="M 110.14 300.76 L 103.48 299.93 L 106.4 298.26 L 106.81 294.94 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2478            </g>
2479          </g>
2480          <g data-cell-id="J-DJAKfkipe2veX9CSEc-14">
2481            <g>
2482              <rect x="0" y="342" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2483            </g>
2484            <g>
2485              <g transform="translate(-0.5 -0.5)">
2486                <switch>
2487                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2488                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 354px; margin-left: 88px;">
2489                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2490                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">post_extract()</div>
2491                      </div>
2492                    </div>
2493                  </foreignObject>
2494                  <text x="88" y="358" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">post_extract()</text>
2495                </switch>
2496              </g>
2497            </g>
2498          </g>
2499          <g data-cell-id="zr5FfvxFWCFZOBII-Wph-2">
2500            <g>
2501              <path d="M 112 326 L 93.6 338.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2502              <path d="M 89.86 340.76 L 93.19 334.94 L 93.6 338.26 L 96.52 339.93 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2503            </g>
2504          </g>
2505        </g>
2506        <g data-cell-id="SdFhppqQnM_idIOyzOvG-1">
2507          <g/>
2508          <g data-cell-id="J-DJAKfkipe2veX9CSEc-17">
2509            <g>
2510              <rect x="260" y="22" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2511            </g>
2512            <g>
2513              <g transform="translate(-0.5 -0.5)">
2514                <switch>
2515                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2516                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 34px; margin-left: 348px;">
2517                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2518                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">pre_patch()</div>
2519                      </div>
2520                    </div>
2521                  </foreignObject>
2522                  <text x="348" y="38" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">pre_patch()</text>
2523                </switch>
2524              </g>
2525            </g>
2526          </g>
2527          <g data-cell-id="J-DJAKfkipe2veX9CSEc-18">
2528            <g>
2529              <rect x="284" y="62" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2530            </g>
2531            <g>
2532              <g transform="translate(-0.5 -0.5)">
2533                <switch>
2534                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2535                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 74px; margin-left: 372px;">
2536                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2537                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">do_patch()</div>
2538                      </div>
2539                    </div>
2540                  </foreignObject>
2541                  <text x="372" y="78" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_patch()</text>
2542                </switch>
2543              </g>
2544            </g>
2545          </g>
2546          <g data-cell-id="J-DJAKfkipe2veX9CSEc-19">
2547            <g>
2548              <rect x="260" y="102" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2549            </g>
2550            <g>
2551              <g transform="translate(-0.5 -0.5)">
2552                <switch>
2553                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2554                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 114px; margin-left: 348px;">
2555                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2556                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">post_patch()</div>
2557                      </div>
2558                    </div>
2559                  </foreignObject>
2560                  <text x="348" y="118" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">post_patch()</text>
2561                </switch>
2562              </g>
2563            </g>
2564          </g>
2565          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-1">
2566            <g>
2567              <path d="M 372 86 L 353.6 98.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2568              <path d="M 349.86 100.76 L 353.19 94.94 L 353.6 98.26 L 356.52 99.93 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2569            </g>
2570          </g>
2571          <g data-cell-id="J-DJAKfkipe2veX9CSEc-21">
2572            <g>
2573              <rect x="260" y="142" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2574            </g>
2575            <g>
2576              <g transform="translate(-0.5 -0.5)">
2577                <switch>
2578                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2579                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 154px; margin-left: 348px;">
2580                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2581                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">pre_configure()</div>
2582                      </div>
2583                    </div>
2584                  </foreignObject>
2585                  <text x="348" y="158" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">pre_configure()</text>
2586                </switch>
2587              </g>
2588            </g>
2589          </g>
2590          <g data-cell-id="J-DJAKfkipe2veX9CSEc-22">
2591            <g>
2592              <rect x="284" y="182" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2593            </g>
2594            <g>
2595              <g transform="translate(-0.5 -0.5)">
2596                <switch>
2597                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2598                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 194px; margin-left: 372px;">
2599                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2600                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">do_configure()</div>
2601                      </div>
2602                    </div>
2603                  </foreignObject>
2604                  <text x="372" y="198" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_configure()</text>
2605                </switch>
2606              </g>
2607            </g>
2608          </g>
2609          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-2">
2610            <g>
2611              <path d="M 348 126 L 348 135.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2612              <path d="M 348 139.76 L 345 133.76 L 348 135.26 L 351 133.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2613            </g>
2614          </g>
2615          <g data-cell-id="J-DJAKfkipe2veX9CSEc-23">
2616            <g>
2617              <rect x="260" y="222" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2618            </g>
2619            <g>
2620              <g transform="translate(-0.5 -0.5)">
2621                <switch>
2622                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2623                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 234px; margin-left: 348px;">
2624                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2625                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">post_configure()</div>
2626                      </div>
2627                    </div>
2628                  </foreignObject>
2629                  <text x="348" y="238" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">post_configure()</text>
2630                </switch>
2631              </g>
2632            </g>
2633          </g>
2634          <g data-cell-id="J-DJAKfkipe2veX9CSEc-25">
2635            <g>
2636              <rect x="260" y="262" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2637            </g>
2638            <g>
2639              <g transform="translate(-0.5 -0.5)">
2640                <switch>
2641                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2642                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 274px; margin-left: 348px;">
2643                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2644                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">pre_build()</div>
2645                      </div>
2646                    </div>
2647                  </foreignObject>
2648                  <text x="348" y="278" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">pre_build()</text>
2649                </switch>
2650              </g>
2651            </g>
2652          </g>
2653          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-4">
2654            <g>
2655              <path d="M 372 206 L 353.6 218.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2656              <path d="M 349.86 220.76 L 353.19 214.94 L 353.6 218.26 L 356.52 219.93 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2657            </g>
2658          </g>
2659          <g data-cell-id="J-DJAKfkipe2veX9CSEc-26">
2660            <g>
2661              <rect x="284" y="302" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2662            </g>
2663            <g>
2664              <g transform="translate(-0.5 -0.5)">
2665                <switch>
2666                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2667                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 314px; margin-left: 372px;">
2668                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2669                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">do_build()</div>
2670                      </div>
2671                    </div>
2672                  </foreignObject>
2673                  <text x="372" 
2673y="318" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_build()</text>
2674                </switch>
2675              </g>
2676            </g>
2677          </g>
2678          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-5">
2679            <g>
2680              <path d="M 348 246 L 348 255.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2681              <path d="M 348 259.76 L 345 253.76 L 348 255.26 L 351 253.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2682            </g>
2683          </g>
2684          <g data-cell-id="J-DJAKfkipe2veX9CSEc-27">
2685            <g>
2686              <rect x="260" y="342" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2687            </g>
2688            <g>
2689              <g transform="translate(-0.5 -0.5)">
2690                <switch>
2691                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2692                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 354px; margin-left: 348px;">
2693                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2694                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">post_build()</div>
2695                      </div>
2696                    </div>
2697                  </foreignObject>
2698                  <text x="348" y="358" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">post_build()</text>
2699                </switch>
2700              </g>
2701            </g>
2702          </g>
2703          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-6">
2704            <g>
2705              <path d="M 348 286 L 366.4 298.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2706              <path d="M 370.14 300.76 L 363.48 299.93 L 366.4 298.26 L 366.81 294.94 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2707            </g>
2708          </g>
2709          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-0">
2710            <g>
2711              <path d="M 348 46 L 366.4 58.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2712              <path d="M 370.14 60.76 L 363.48 59.93 L 366.4 58.26 L 366.81 54.94 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2713            </g>
2714          </g>
2715          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-7">
2716            <g>
2717              <path d="M 372 326 L 353.6 338.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2718              <path d="M 349.86 340.76 L 353.19 334.94 L 353.6 338.26 L 356.52 339.93 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2719            </g>
2720          </g>
2721          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-3">
2722            <g>
2723              <path d="M 348 166 L 366.4 178.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2724              <path d="M 370.14 180.76 L 363.48 179.93 L 366.4 178.26 L 366.81 174.94 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2725            </g>
2726          </g>
2727        </g>
2728        <g data-cell-id="SdFhppqQnM_idIOyzOvG-2">
2729          <g/>
2730          <g data-cell-id="J-DJAKfkipe2veX9CSEc-31">
2731            <g>
2732              <rect x="544" y="302" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2733            </g>
2734            <g>
2735              <g transform="translate(-0.5 -0.5)">
2736                <switch>
2737                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2738                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 314px; margin-left: 632px;">
2739                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2740                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">do_clean()</div>
2741                      </div>
2742                    </div>
2743                  </foreignObject>
2744                  <text x="632" y="318" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_clean()</text>
2745                </switch>
2746              </g>
2747            </g>
2748          </g>
2749          <g data-cell-id="J-DJAKfkipe2veX9CSEc-34">
2750            <g>
2751              <rect x="520" y="22" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2752            </g>
2753            <g>
2754              <g transform="translate(-0.5 -0.5)">
2755                <switch>
2756                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2757                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 34px; margin-left: 608px;">
2758                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2759                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">pre_check()</div>
2760                      </div>
2761                    </div>
2762                  </foreignObject>
2763                  <text x="608" y="38" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">pre_check()</text>
2764                </switch>
2765              </g>
2766            </g>
2767          </g>
2768          <g data-cell-id="J-DJAKfkipe2veX9CSEc-35">
2769            <g>
2770              <rect x="544" y="62" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2771            </g>
2772            <g>
2773              <g transform="translate(-0.5 -0.5)">
2774                <switch>
2775                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2776                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 74px; margin-left: 632px;">
2777                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2778                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">do_check()</div>
2779                      </div>
2780                    </div>
2781                  </foreignObject>
2782                  <text x="632" y="78" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_check()</text>
2783                </switch>
2784              </g>
2785            </g>
2786          </g>
2787          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-9">
2788            <g>
2789              <path d="M 608 46 L 626.4 58.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2790              <path d="M 630.14 60.76 L 623.48 59.93 L 626.4 58.26 L 626.81 54.94 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2791            </g>
2792          </g>
2793          <g data-cell-id="J-DJAKfkipe2veX9CSEc-36">
2794            <g>
2795              <rect x="520" y="102" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2796            </g>
2797            <g>
2798              <g transform="translate(-0.5 -0.5)">
2799                <switch>
2800                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2801                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 114px; margin-left: 608px;">
2802                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2803                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">post_check()</div>
2804                      </div>
2805                    </div>
2806                  </foreignObject>
2807                  <text x="608" y="118" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">post_check()</text>
2808                </switch>
2809              </g>
2810            </g>
2811          </g>
2812          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-10">
2813            <g>
2814              <path d="M 632 86 L 613.6 98.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2815              <path d="M 609.86 100.76 L 613.19 94.94 L 613.6 98.26 L 616.52 99.93 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2816            </g>
2817          </g>
2818          <g data-cell-id="J-DJAKfkipe2veX9CSEc-38">
2819            <g>
2820              <rect x="520" y="142" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2821            </g>
2822            <g>
2823              <g transform="translate(-0.5 -0.5)">
2824                <switch>
2825                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2826                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 154px; margin-left: 608px;">
2827                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2828                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">pre_install()</div>
2829                      </div>
2830                    </div>
2831                  </foreignObject>
2832                  <text x="608" y="158" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">pre_install()</text>
2833                </switch>
2834              </g>
2835            </g>
2836          </g>
2837          <g data-cell-id="J-DJAKfkipe2veX9CSEc-39">
2838            <g>
2839              <rect x="544" y="182" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2840            </g>
2841            <g>
2842              <g transform="translate(-0.5 -0.5)">
2843                <switch>
2844                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2845                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 194px; margin-left: 632px;">
2846                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2847                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">
2848                          <b>do_install()</b>
2849                        </div>
2850                      </div>
2851                    </div>
2852                  </foreignObject>
2853                  <text x="632" y="198" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">do_install()</text>
2854                </switch>
2855              </g>
2856            </g>
2857          </g>
2858          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-12">
2859            <g>
2860              <path d="M 608 166 L 626.4 178.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2861              <path d="M 630.14 180.76 L 623.48 179.93 L 626.4 178.26 L 626.81 174.94 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2862            </g>
2863          </g>
2864          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-14">
2865            <g>
2866              <path d="M 608 246 L 608 264 Q 608 274 618 274 L 625 274 Q 632 274 632 284 L 632 295.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2867              <path d="M 632 299.76 L 629 293.76 L 632 295.26 L 635 293.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2868            </g>
2869          </g>
2870          <g data-cell-id="J-DJAKfkipe2veX9CSEc-40">
2871            <g>
2872              <rect x="520" y="222" width="176" height="24" rx="12" ry="12" fill="#4d4d4d" stroke="#36393d" pointer-events="all"/>
2873            </g>
2874            <g>
2875              <g transform="translate(-0.5 -0.5)">
2876                <switch>
2877                  <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
2878                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 234px; margin-left: 608px;">
2879                      <div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
2880                        <div style="display: inline-block; font-size: 14px; font-family: &quot;Source Code Pro&quot;; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: nowrap;">post_install()</div>
2881                      </div>
2882                    </div>
2883                  </foreignObject>
2884                  <text x="608" y="238" fill="#FFFFFF" font-family="&quot;Source Code Pro&quot;" font-size="14px" text-anchor="middle">post_install()</text>
2885                </switch>
2886              </g>
2887            </g>
2888          </g>
2889          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-13">
2890            <g>
2891              <path d="M 632 206 L 613.6 218.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2892              <path d="M 609.86 220.76 L 613.19 214.94 L 613.6 218.26 L 616.52 219.93 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2893            </g>
2894          </g>
2895          <g data-cell-id="52vn3jHzFmYFyWnHdmzb-11">
2896            <g>
2897              <path d="M 608 126 L 608 135.26" fill="none" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
2898              <path d="M 608 139.76 L 605 133.76 L 608 135.26 L 611 133.76 Z" fill="#36393d" stroke="#36393d" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
2899            </g>
2900          </g>
2901        </g>
2902      </g>
2903    </g>
2904  </g>
2905</svg>
2906<p>Only the <strong><code>do_install()</code></strong> function is mandatory, all other functions are
2907optional.</p>
2907
2908<p>I’ll summarize the important ones:</p>
2909<ul>
2910<li><code>fetch</code> - download source archive</li>
2911<li><code>extract</code> - extract it</li>
2912<li><code>patch</code> - <a href="#patches">apply patches</a></li>
2913<li><code>configure</code> - run configure stage of build (not all build systems have it)</li>
2914<li><code>build</code> - run build stage of build</li>
2915<li><code>check</code> - <a href="#checks">check program</a></li>
2916<li><code>install</code> - install project to <code>destdir</code></li>
2917</ul>
2918<p>You can read about the rest in the Manual
2919<a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#package-build-phases">here</a>
2920and
2921<a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#functions">here</a>.</p>
2922<h4 id="some-progress-1"><a class="header" href="#some-progress-1">Some progress</a></h4>
2923<p>These are the original build steps:</p>
2924<pre><code class="language-sh">git clone https://github.com/enkore/j4-dmenu-desktop.git
2925cd j4-dmenu-desktop
2926# Setup a builddir (this is CMake specific stuff)
2927mkdir build
2928cd build
2929# Configure j4-dmenu-desktop
2930cmake ..
2931# Build
2932make
2933# Install j4-dmenu-desktop to system directories
2934sudo make install
2935</code></pre>
2936<p>Now, we incorporate them into the template:</p>
2937<pre><code class="language-bash">
2937# Template file for 'j4-dmenu-desktop'
2938pkgname=j4-dmenu-desktop
2939version=2.18
2940revision=1
2941hostmakedepends=""
2942makedepends=""
2943depends=""
2944short_desc="Fast desktop menu"
2945maintainer="meator &lt;[email protected]&gt;"
2946license="GPL-3.0-or-later"
2947homepage="https://github.com/enkore/j4-dmenu-desktop"
2948changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
2949
2950do_fetch() {
2951	git clone https://github.com/enkore/j4-dmenu-desktop.git
2952	cd j4-dmenu-desktop
2953}
2954
2955do_configure() {
2956	mkdir build
2957	cd build
2958	cmake ..
2959}
2960
2961do_build() {
2962	make
2963}
2964
2965do_install() {
2966	sudo make install
2967}
2968</code></pre>
2969<p>This is a great start, but it needs some changes. First, the masterdir is a
2970separated system. Its default user already has access to everything necessary,
2971so <code>sudo</code> isn’t necessary.</p>
2972<p>Second, this template fails, because <code>git</code> and <code>cmake</code> aren’t installed in
2973<code>masterdir-x86_64</code>. As I have mentioned earlier, the <code>masterdir</code> is minimal and
2974includes little out of the box. Both have to be added as a dependency to
2975<code>hostmakedepends</code>. (Why <code>hostmakedepends</code> and not <code>makedepends</code> or <code>depends</code>
2976will be explained <a href="#dependencies">later</a>.)</p>
2977<p>Third, <code>$CWD</code> could be utilised better. You might wonder where is the current
2978working directory of the template. The answer depends on the function.</p>
2979<h3 id="cwd"><a class="header" href="#cwd">CWD</a></h3>
2980<p>Here are the important directories for demonstration:</p>
2981<pre><code>void-packages
2982├── srcpkgs
2983│   └── j4-dmenu-desktop
2984│       └── template
2985├── masterdir-x86_64
2986│   ├── builddir
2987│   │   └── j4-dmenu-desktop-2.18
2988│   │       ├── CMakeLists.txt
2989│   │       ├── README.md
2990│   │       ├── src
2991│   │       └── ...
2992│   └── destdir
2993│       └── j4-dmenu-desktop-2.18
2994│           ├── rdeps
2995│           ├── shlib-requires
2996│           └── usr
2997│               └── ...
2998...
2999</code></pre>
3000<ul>
3001<li><code>pre_fetch()</code>, <code>pre_extract()</code> and <code>do_clean()</code> are executed in <code>&lt;masterdir&gt;</code>
3002i.e.  <code>masterdir-x86_64/destdir/</code></li>
3003<li><code>do_fetch()</code> and <code>post_fetch()</code> are executed in <code>XBPS_BUILDDIR</code>.
3004<code>XBPS_BUILDDIR</code> is a special variable set by <code>xbps-src</code>
3005that shouldn’t be overridden. It is set to <code>&lt;masterdir&gt;/builddir</code>, here
3006<code>masterdir-x86_64/builddir/</code></li>
3007<li><code>do_extract()</code> through <code>do_patch()</code> (4 stages) are executed in <code>wrksrc</code></li>
3008<li><code>post_patch()</code> through <code>post_install()</code> (14 stages) are executed in
3009<code>build_wrksrc</code> if it’s defined, otherwise in <code>wrksrc</code></li>
3010</ul>
3011<p>We can see here that most stages are executed with <code>$CWD</code> in <code>$wrksrc</code>.</p>
3012<h4 id="wrksrc"><a class="header" href="#wrksrc">wrksrc</a></h4>
3013<p><code>xbps-src</code> also defines some variables itself for us to use. One of them is
3014<code>wrksrc</code>.</p>
3015<p>The <code>wrksrc</code> of a package is defined as
3016<code>&lt;masterdir&gt;/builddir/${pkgname}-${version}</code>. For <code>j4-dmenu-desktop</code> it’s
3017<code>masterdir-x86_64/builddir/j4-dmenu-desktop-2.18</code>. <code>xbps-src</code> expects files to
3018be in <code>$wrksrc</code>, but git puts them into <code>j4-dmenu-desktop</code> (without the
3019version part <code>-2.18</code>). This must be fixed.</p>
3020<p>Now we know that the current working directory is managed by <code>xbps-src</code>, so the
3021<code>cd</code> call in <code>do_fetch()</code> is unnecessary. But it is necessary in <code>do_build()</code>
3022and <code>do_install()</code>, because their CWD will be set to <code>$wrksrc</code> and not
3023<code>$wrksrc/build</code> Here is the updated template:</p>
3024<pre><code class="language-bash">
3024# Template file for 'j4-dmenu-desktop'
3025pkgname=j4-dmenu-desktop
3026version=2.18
3027revision=1
3028hostmakedepends="git cmake"
3029makedepends=""
3030depends=""
3031short_desc="Fast desktop menu"
3032maintainer="meator &lt;[email protected]&gt;"
3033license="GPL-3.0-or-later"
3034homepage="https://github.com/enkore/j4-dmenu-desktop"
3035changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3036
3037do_fetch() {
3038	git clone https://github.com/enkore/j4-dmenu-desktop.git "$wrksrc"
3039}
3040
3041do_configure() {
3042	mkdir build
3043	cd build
3044	cmake ..
3045}
3046
3047do_build() {
3048	cd build
3049	make
3050}
3051
3052do_install() {
3053	# sudo was removed
3054	cd build
3055	make install
3056}
3057</code></pre>
3058<p>But wait, why didn’t we have to install <code>make</code>? We don’t have to add <code>make</code> to
3059dependencies because it is one of the basic dependencies of <code>base-chroot</code>, so
3060<code>make</code> is automatically installed in every <code>masterdir</code>.</p>
3061<p>Now, there are only two issues that are preventing <code>j4-dmenu-desktop</code> from
3062building:</p>
3063<h3 id="destdir"><a class="header" href="#destdir">Destdir</a></h3>
3064<p>Remember when I mentioned “fake destdir”? All files must be installed to fake
3065destdir and not to <code>/</code>. The current template installs it to <code>/</code> (because it’s
3066the default location for CMake).</p>
3067<p>The current template doesn’t install it to your computer’s root, but to
3068<code>masterdir</code>’s root, because <code>masterdir</code> is isolated.</p>
3069<p>Installing things to <code>masterdir</code> is not tolerable in templates. It pollutes the
3070<code>masterdir</code> and it can no longer be safely used afterwards<sup class="footnote-reference"><a href="#polute-masterdir">6</a></sup>.</p>
3071<p>In CMake, this can be solved by calling <code>make install</code> like this:</p>
3072<pre><code>make DESTDIR=$DESTDIR install
3073</code></pre>
3074<p><code>$DESTDIR</code>, like <code>$wrksrc</code>, is a variable defined by <code>xbps-src</code>. In this case,
3075it points to <code>destdir/j4-dmenu-desktop-2.18</code> (it’s relative to the masterdir).</p>
3076<h3 id="prefix"><a class="header" href="#prefix">Prefix</a></h3>
3077<p>Another issue is the prefix. Most build systems dealing with C or C++ assume by
3078default that you want to install things to <code>/usr/local</code> instead of <code>/usr</code>. This
3079is the directory model on FreeBSD for example. <code>/usr</code> is for system programs and
3080<code>/usr/local</code> is for user programs. This is nice when you want to install
3081something manually (without using a package manager), but now, we are packaging.
3082Our package is a system package. We have to tell <code>cmake</code> that the prefix is
3083<code>/usr</code>. This is done with <code>-DCMAKE_INSTALL_PREFIX=/usr</code> in CMake. Here is the
3084fixed template:</p>
3085<pre><code class="language-bash">
3085# Template file for 'j4-dmenu-desktop'
3086pkgname=j4-dmenu-desktop
3087version=2.18
3088revision=1
3089hostmakedepends="git cmake"
3090makedepends=""
3091depends=""
3092short_desc="Fast desktop menu"
3093maintainer="meator &lt;[email protected]&gt;"
3094license="GPL-3.0-or-later"
3095homepage="https://github.com/enkore/j4-dmenu-desktop"
3096changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3097
3098do_fetch() {
3099	git clone https://github.com/enkore/j4-dmenu-desktop.git "$wrksrc"
3100}
3101
3102do_configure() {
3103	mkdir build
3104	cd build
3105	cmake -DCMAKE_INSTALL_PREFIX=/usr ..
3106}
3107
3108do_build() {
3109	cd build
3110	make
3111}
3112
3113do_install() {
3114	cd build
3115	# DESTDIR was added
3116	make DESTDIR="$DESTDIR" install
3117}
3118</code></pre>
3119<p>And we’ve done it! This template is buildable. You can run:</p>
3120<pre><code>./xbps-src pkg j4-dmenu-desktop
3121</code></pre>
3122<p>and a package will be outputted to <code>hostdir/binpkgs</code>.</p>
3123<p>But this package will not get accepted to
3124<a href="https://github.com/void-linux/void-packages">void-packages</a>, because the
3125template is badly written. Before we improve it, let’s summarize what we know:</p>
3126<h3 id="summary"><a class="header" href="#summary">Summary</a></h3>
3127<p>We use</p>
3128<pre><code>./xbps-src pkg j4-dmenu-desktop
3129</code></pre>
3130<p>to build a template.</p>
3131<p>We use</p>
3132<pre><code>sudo xi -f j4-dmenu-desktop
3133</code></pre>
3134<p>to install a template.</p>
3135<p>A template <strong>must</strong> include these things:</p>
3136<pre><code class="language-bash">pkgname=name
3137version=1234
3138revision=1
3139short_desc="Description"
3140maintainer="meator &lt;[email protected]&gt;"
3141license="GPL-3.0-or-later"
3142homepage="https://example.com/"
3143</code></pre>
3144<p>Templates are built in stages.</p>
3145<p>The source of the package must be put to <code>$wrksrc</code>, which resides in
3146<code>masterdir-x86_64/builddir/&lt;pkgname&gt;-&lt;version&gt;</code>.</p>
3147<p>Package files must be installed into <code>$DESTDIR</code>, which resides in
3148<code>masterdir-x86_64/destdir/&lt;pkgname&gt;-&lt;version&gt;</code>.</p>
3149<p>Stages are usually executed in <code>$wrksrc</code>.</p>
3150<h2 id="improving-the-template"><a class="header" href="#improving-the-template">Improving the template</a></h2>
3151<h3 id="what-is-cross-compilation"><a class="header" href="#what-is-cross-compilation">What is cross-compilation?</a></h3>
3152<div id="admonition-note-1" class="admonition admonish-note">
3153<div class="admonition-title">
3154<p>Note</p>
3155<p><a class="admonition-anchor-link" href="#admonition-note-1"></a></p>
3156</div>
3157<div>
3158<p>Concepts described here hold for <strong>compiled</strong> packages and libraries.
3159They do not apply to packages which aren’t compiled (like Python
3160packages<sup class="footnote-reference"><a href="#bytecompiled">7</a></sup>). This is further described in
3161<a href="rofimoji.html">packaging rofimoji</a>.</p>
3162<p>If you intend to package non-compiled packages, you should still read the
3163following sections, but you can pay less attention to them.</p>
3164</div>
3165</div>
3166<p>Cross-compilation is the compilation of code using a cross compiler.</p>
3167<p>What is a cross compiler? Let’s ask <a href="https://en.wikipedia.org/wiki/Cross_compiler">Wikipedia</a>:</p>
3168<blockquote>
3169<p>A cross compiler is a compiler capable of creating executable code for a
3170platform other than the one on which the compiler is running. For example, a
3171compiler that runs on a PC but generates code that runs on an Android smartphone
3172is a cross compiler.</p>
3173</blockquote>
3174<blockquote>
3175<p>A cross compiler is useful to compile code for multiple platforms from one
3176development host.</p>
3177</blockquote>
3178<p>Normally, when you compile on <code>x86_64</code> architecture, you run the program on
3179<code>x86_64</code>. But Void Linux supports more than <code>x86_64</code>, it supports a lot of
3180architectures and even two libc implementations, glibc and musl. All of these
3181are incompatible with each other by default.</p>
3182<p>How does Void Linux support all of these? Does it have a dedicated build server
3183for each architecture?</p>
3184<p>No! It has just <code>x86_64</code> and it cross-compiles to all other architectures.</p>
3185<p><a href="../tips-and-tricks.html#nocross">Note that there are some specific architectures for which you don’t have to
3186(and you shouldn’t) cross-compile.</a></p>
3187<p>The one rule of cross-compiling is that <strong>you cannot execute what you build.</strong>
3188When your host (your computer) is <code>x86_64</code> and you are cross-compiling to let’s
3189say <code>armv6l</code>, the compiled result can be executed only on <code>armv6l</code>, not on
3190<code>x86_64</code> (<a href="../tips-and-tricks.html#qemu">unless you use QEMU</a>, but that method
3191cannot be used everywhere).</p>
3192<p>Sometimes the package’s build system tries to run what it compiles. Softw
3192are
3193using such build systems is not cross-compilation friendly. Such build systems
3194have to be patched to allow cross-compilation. This requires knowledge of the
3195package’s build system and a basic understanding of the program’s structure.
3196This isn’t trivial to solve, it depends on the size of the program and the
3197complexity of its build system, but it’s doable.</p>
3198<h3 id="how-does-cross-compilation-work"><a class="header" href="#how-does-cross-compilation-work">How does cross-compilation work?</a></h3>
3199<p><em>This describes the cross-compilation of C/C++ code. Other programming languages
3200can do it differently, but as you will soon learn, it doesn’t actually matter
3201in <code>xbps-src</code>.</em></p>
3202<p>Cross-compilation works pretty much the same as normal compilation, but a cross
3203compiler must be used instead of a normal one. Void Linux provides many cross
3204compilers in the <code>cross-*</code> packages (for example <code>cross-armv7l-linux-gnueabihf</code>
3205cross compiles to <code>armv7l</code> with <code>glibc</code> libc).</p>
3206<p>You might wonder how can you modify the <code>j4-dmenu-desktop</code> template to support
3207these <code>cross-</code> packages. But you do not have to, <code>xbps-src</code> does it for you if
3208you let it. It is handled by build styles.</p>
3209<h3 id="build-styles"><a class="header" href="#build-styles">Build styles</a></h3>
3210<p>Most programs use a build system like <code>CMake</code>, <code>Meson</code>, <code>Make</code>, <code>Cargo</code> etc.
3211All of these provide a way to build and install things.</p>
3212<p>All packages using <code>CMake</code> follow a pretty much identical build process. A
3213builddir is created, <code>cmake -DCMAKE_INSTALL_PREFIX=/usr ..</code> is run, then <code>make</code>
3214builds the project and <code>make install</code> installs it.</p>
3215<p>Because it is repetitive, <code>xbps-src</code> provides a way to do it for you. This is
3216handled using a build style.</p>
3217<p>Build styles are set with the <code>build_style</code> variable. All available build styles
3218are at
3219<a href="https://github.com/void-linux/void-packages/tree/master/common/build-style"><code>common/build-style/</code></a>.
3220They are described in the
3221<a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#build_scripts">Manual</a>.</p>
3222<p>Build scripts override several build phases by providing appropriate
3223<code>do_&lt;phase&gt;()</code> functions.</p>
3224<p>But the build process for every <code>CMake</code> package isn’t identical. There are some
3225small differences. To tweak the build style, you can set variables provided by
3226the build style. Each build style can provide some configuration variables. They
3227are described in the <a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#build_scripts">appropriate section of the
3228Manual</a>.</p>
3229<p>If that isn’t enough, you can always override <code>pre_&lt;phase&gt;()</code> and
3230<code>post_&lt;phase&gt;()</code> functions. If you choose to define your own <code>do_&lt;phase&gt;()</code>
3231functions that would conflict with the ones provided by the build style,
3232functions defined in your template take precedence.</p>
3233<p>These build styles do much more than <code>cmake ..</code>. They handle the aforementioned
3234<code>/usr</code> prefix and they even handle cross-compilation. Then there are some
3235Void-specific things that you thanks to build styles don’t even have to know nor
3236care about, because the build styles handle it for you.</p>
3237<p>Build styles also add necessary dependencies for them to
3238function<sup class="footnote-reference"><a href="#buildstyledeps">8</a></sup>. This means that we can remove <code>cmake</code> from
3239<code>hostmakedepends</code>.</p>
3240<h3 id="how-to-cross-compile"><a class="header" href="#how-to-cross-compile">How to cross-compile?</a></h3>
3241<p>Instead of</p>
3242<pre><code>./xbps-src pkg j4-dmenu-desktop
3243</code></pre>
3244<p>you run</p>
3245<pre><code>./xbps-src -a &lt;ARCH&gt; pkg j4-dmenu-desktop
3246</code></pre>
3247<p>This will download a <code>cross-*</code> cross compiler if appropriate and it will set
3248some <code>xbps-src</code> configuration variables. The build style will then adapt to
3249them.</p>
3250<p>If you want to be extra diligent, you should not only test whether your template
3251compiles with <code>./xbps-src pkg &lt;package&gt;</code>, but you should also test whether
3252it cross compiles by for example running <code>./xbps-src pkg -a aarch64 &lt;pkg&gt;</code>.
3253Testing cross-compiling for a single target is usually enough. If the template
3254cross-compiles to one target, it will likely cross-compile to all of them (but
3255it depends).</p>
3256<p>Testing for all architectures in a pull request is made simple by <a href="contributing.html#solving-check-errors">GitHub PR
3257checks</a>.</p>
3258<h4 id="some-progress-2"><a class="header" href="#some-progress-2">Some progress</a></h4>
3259<p>This is the old template:</p>
3260<pre><code class="language-bash">
3260# Template file for 'j4-dmenu-desktop'
3261pkgname=j4-dmenu-desktop
3262version=2.18
3263revision=1
3264hostmakedepends="git"
3265makedepends=""
3266depends=""
3267short_desc="Fast desktop menu"
3268maintainer="meator &lt;[email protected]&gt;"
3269license="GPL-3.0-or-later"
3270homepage="https://github.com/enkore/j4-dmenu-desktop"
3271changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3272
3273do_fetch() {
3274	git clone https://github.com/enkore/j4-dmenu-desktop.git "$wrksrc"
3275}
3276
3277do_configure() {
3278	mkdir build
3279	cd build
3280	cmake -DCMAKE_INSTALL_PREFIX=/usr ..
3281}
3282
3283do_build() {
3284	cd build
3285	make
3286}
3287
3288do_install() {
3289	cd build
3290	# DESTDIR was added
3291	make DESTDIR="$DESTDIR" install
3292}
3293</code></pre>
3294<p>This is the template with <code>build_style=cmake</code>:</p>
3295<pre><code class="language-bash"># Template file for 'j4-dmenu-desktop'
3296pkgname=j4-dmenu-desktop
3297version=2.18
3298revision=1
3299hostmakedepends="git cmake"
3300build_style=cmake
3301makedepends=""
3302depends=""
3303short_desc="Fast desktop menu"
3304maintainer="meator &lt;[email protected]&gt;"
3305license="GPL-3.0-or-later"
3306homepage="https://github.com/enkore/j4-dmenu-desktop"
3307changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3308
3309do_fetch() {
3310	git clone https://github.com/enkore/j4-dmenu-desktop.git "$wrksrc"
3311}
3312</code></pre>
3313<p>A lot of the functions we have created are now gone. Only <code>do_fetch()</code> remains.
3314Let’s get rid of that one too.</p>
3315<h3 id="downloading-source"><a class="header" href="#downloading-source">Downloading source</a></h3>
3316<p>Using <code>git</code> to download sources is not acceptable in 99% of situations. As
3317mentioned in <a href="#quality-requirements">quality requirements</a>, only <strong>released,
3318stable programs are packaged</strong>.</p>
3319<p>As mentioned in the beginning of this page, this tutorial focuses on packaging
3320j4-dmenu-desktop version <strong>r2.18</strong>. But that is not what we’ve been packaging
3321so far. <code>git clone https://github.com/enkore/j4-dmenu-desktop.git</code> was
3322invoked to fetch j4-dmenu-desktop, which downloads the <strong>latest development
3323version</strong><sup class="footnote-reference"><a href="#fixgit">9</a></sup>. This hinders reproducibility, and it makes the package less
3324reliable.</p>
3325<p>Pulling directly from <code>HEAD</code> is wrong. Releases or tags should be preferred.</p>
3326<p>Releases can be found on the right-side panel on GitHub:</p>
3327<p><img src="../images/j4-dmenu-desktop/github_release_side_panel.png" alt="GitHub release side panel" /></p>
3328<p>Scroll down until you see r2.18:</p>
3329<p><img src="../images/j4-dmenu-desktop/github_release.png" alt="GitHub release" /></p>
3330<p>Some projects include prebuilt binaries in their releases (<code>j4-dmenu-desktop</code>
3331doesn’t, but <code>bat</code> described <a href="bat.html">in the next chapter of this tutorial</a>
3332does). You mustn’t use them if you want your package to be included in
3333<a href="https://github.com/void-linux/void-packages">void-packages</a>. You should choose
3334the <code>Source code (tar.gz)</code> option:</p>
3335<p><img src="../images/j4-dmenu-desktop/github_release_asset.png" alt="GitHub release asset" /></p>
3336<p>You can then put this into the <code>distfiles</code> variable.</p>
3337<h3 id="distfiles"><a class="header" href="#distfiles">distfiles</a></h3>
3338<p>An advantage of using distfiles over downloading the archive manually in
3339<code>do_fetch()</code> is that <code>distfiles</code> are conveniently managed by <code>xbps-src</code>.</p>
3340<p>They are automatically <strong>downloaded</strong> and <strong>extracted</strong> to <code>$wrksrc</code>.</p>
3341<p><code>xbps-src</code> keeps distfiles in <code>hostdir/sources</code>. This means that if you build
3342the package several times, the distfile(s) will be downloaded once.</p>
3343<p>Another feature of distfiles is checksum checking using the <code>checksum</code> template
3344variable. It doesn’t happen often on GitHub, but self-hosted releases can be
3345retroactively changed. This shouldn’t happen, a versioned release should always
3346be the same, but this can happen by accident.</p>
3347<p>The less likely scenario is that the distfile has been changed maliciously and
3348some unwanted code has been added.</p>
3349<p>To make sure that neither of these scenarios happens, every distfile must have
3350an accompanying checksum. Checksums are defined in the <code>checksum</code> variable in
3351the same order as <code>distfiles</code> (multiple <code>distfiles</code> can be specified).</p>
3352<p>The type of checksum is <code>
3352sha256sum</code>. You can use <code>xgensum</code> from the <code>xtools</code>
3353package to automatically download the distfile and retrieve its checksum.</p>
3354<p>Here is the modified template:</p>
3355<pre><code class="language-bash"># Template file for 'j4-dmenu-desktop'
3356pkgname=j4-dmenu-desktop
3357version=2.18
3358revision=1
3359# git is still needed
3360hostmakedepends="git"
3361build_style=cmake
3362makedepends=""
3363depends=""
3364short_desc="Fast desktop menu"
3365maintainer="meator &lt;[email protected]&gt;"
3366license="GPL-3.0-or-later"
3367homepage="https://github.com/enkore/j4-dmenu-desktop"
3368changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3369distfiles="https://github.com/enkore/j4-dmenu-desktop/archive/refs/tags/r2.18.tar.gz"
3370checksum=77c5605d0c1291bcf1e13b186ea3b32ddf4753de0d0e39127b4a7d2098393e25
3371</code></pre>
3372<p>You may have noticed that git is still needed. Why? Because <code>j4-dmenu-desktop</code>’s
3373build system itself uses git to fetch a dependency. This is not desirable,
3374<code>xbps-src</code> should manage all dependencies. To fix this, we first need to learn
3375more about dependencies.</p>
3376<h3 id="dependencies"><a class="header" href="#dependencies">Dependencies</a></h3>
3377<p>There are four types of dependencies: <code>hostmakedepends</code>, <code>makedepends</code>,
3378<code>depends</code> and <code>checkdepends</code>.</p>
3379<p><code>hostmakedepends</code> are dependencies (usually programs) that must <strong>run</strong> on the
3380<strong>host</strong> when cross-compiling.</p>
3381<p><code>makedepends</code> are dependencies (usually <code>-devel</code> packages of libraries) that are
3382required for cross-compiling. They are compiled for <strong>target</strong> architecture
3383(cannot be used on the host).</p>
3384<p><code>depends</code> are <strong>runtime</strong> dependencies. In contrast to <code>hostmakedepends</code> and
3385<code>makedepends</code>, <code>xbps-src</code> does nothing with <code>depends</code>, it just adds the
3386dependencies to package metadata. <code>xbps-install</code> will then read that and
3387download the dependencies.</p>
3388<p><code>checkdepends</code> are (host) dependencies of the <code>check</code> phase. This is described
3389<a href="#checks">below</a>.</p>
3390<p><code>xbps-src</code> tries to download <code>hostmakedepends</code> and <code>makedepends</code> from the remote
3391repos. If the dependencies aren’t there, <code>xbps-src</code> will build them using
3392templates in <code>srcpkgs</code>.</p>
3393<h4 id="some-progress-3"><a class="header" href="#some-progress-3">Some progress</a></h4>
3394<p>Both <code>git</code> and <code>cmake</code> needed to run on the host machine, so <code>hostmakedepends</code>
3395was appropriate. <code>j4-dmenu-desktop</code> has another dependency that has been
3396forgotten: <code>dmenu</code> itself. <code>dmenu</code>
3396 is not needed for compilation, so it belongs
3397to <code>depends</code>.</p>
3398<p>Here is the modified template:</p>
3399<pre><code class="language-bash"># Template file for 'j4-dmenu-desktop'
3400pkgname=j4-dmenu-desktop
3401version=2.18
3402revision=1
3403hostmakedepends="git"
3404build_style=cmake
3405depends="dmenu"
3406short_desc="Fast desktop menu"
3407maintainer="meator &lt;[email protected]&gt;"
3408license="GPL-3.0-or-later"
3409homepage="https://github.com/enkore/j4-dmenu-desktop"
3410changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3411distfiles="https://github.com/enkore/j4-dmenu-desktop/archive/refs/tags/r2.18.tar.gz"
3412checksum=77c5605d0c1291bcf1e13b186ea3b32ddf4753de0d0e39127b4a7d2098393e25
3413</code></pre>
3414<p>There is another missing dependency, but it’s much harder to find. It’s Catch2.</p>
3415<p><code>j4-dmenu-desktop</code> downloads Catch2 while in the <code>configure</code> step when <code>cmake</code>
3416is initialized. This is convenient for developers, but not so much for package
3417managers.</p>
3418<p>All dependencies of a package should be handled via the package manager if
3419possible (this isn’t possible in some languages like Go and Rust whose build
3420systems are much more tied to the programming language).</p>
3421<p><code>catch2</code> is already packaged, so we have no excuse not to use it. Catch2 is a
3422library (that needs to be in <strong>target</strong> architecture), so it belongs to
3423<code>makedepends</code>.</p>
3424<p>When you add <code>catch2</code> to the <code>makedepends</code> and carefully observe build output,
3425you might notice that Catch2 is still being downloaded and the <code>catch2</code>
3426dependency is ignored. This happens because <code>j4-dmenu-desktop</code>’s CMake isn’t
3427configured ideally, its build system isn’t perfect. But it provides a way to
3428use the system Catch2. If you read their build system definition file
3429<code>CMakeLists.txt</code>, you will notice the <code>WITH_GIT_CATCH</code> and <code>CATCH_INCLUDE_DIR</code>
3430options.</p>
3431<p><code>WITH_GIT_CATCH</code> is a YES/NO option. We don’t want Catch2 through git, so we’ll
3432set it to NO. This means that we will be able to get rid of <code>git</code> in
3433<code>hostmakedepends</code>.</p>
3434<p>But <code>CATCH_INCLUDE_DIR</code> requires a Catch2 header file.</p>
3435<p>To locate it, let’s look at <code>catch2</code>’s files:</p>
3436<pre><code>&gt; xbps-query -Rf catch2
3437/usr/include/catch2/benchmark/catch_benchmark.hpp
3438/usr/include/catch2/benchmark/catch_benchmark_all.hpp
3439/usr/include/catch2/benchmark/catch_chronometer.hpp
3440/usr/include/catch2/benchmark/catch_clock.hpp
3441/usr/include/catch2/benchmark/catch_constructor.hpp
3442/usr/include/catch2/benchmark/catch_environment.hpp
3443...
3444</code></pre>
3445<p>You can see that they are in <code>/usr/include/catch2</code>, so <code>CATCH_INCLUDE_DIR</code>
3446should be set to <code>/usr/include/catch2</code>. Or should it? Remember that <code>catch2</code>
3447is a <code>makedepends</code> dependency for the <strong>target</strong> architecture. It won’t
3448be installed to <code>/usr/include/</code> in <code>masterdir-x86_64</code> because that’s where
3449<strong>host</strong> things go. (<code>catch2</code> <em>will</em> be installed to <code>/usr/include/catch2</code> if
3450<code>j4-dmenu-desktop</code> isn’t being cross-compiled because host = target when that is
3451the case, but it won’t work otherwise.)</p>
3452<p>Where do target dependencies go? <code>xbps-src</code> provides a <a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#global-variables">lot of useful
3453global variables</a>,
3454and one of them is <code>$XBPS_CROSS_BASE</code>. The best thing about it is that it
3455works when compiling normally too. It is set to an appropriate directory when
3456cross-compiling (for example for <code>aarch64</code> it’s <code>/usr/aarch64-linux-gnu</code>) and
3457it’s set to nothing when compiling normally. This means that
3458<code>$XBPS_CROSS_BASE/usr/include/catch2</code> will be always valid. And this is our value of
3459<code>CATCH_INCLUDE_DIR</code>.</p>
3460<p>So a corrected <code>cmake</code> command line would be constructed like this:</p>
3461<pre><code>cmake -DWITH_GIT_CATCH=NO -DCATCH_INCLUDE_DIR=$XBPS_CROSS_BASE/usr/include/catch2 ..
3462</code></pre>
3463<p>But there’s a problem: We are no longer executing <code>cmake</code>, the build style
3464does. A solution is to use one of the configuration variables the <code>cmake</code> build
3465style provides, namely <code>configure_args</code>.</p>
3466<p>Here is the modified template:</p>
3467<pre><code class="language-bash">
3467# Template file for 'j4-dmenu-desktop'
3468pkgname=j4-dmenu-desktop
3469version=2.18
3470revision=1
3471# git is removed from hostmakedepends
3472makedepends="catch2"
3473configure_args="-DWITH_GIT_CATCH=NO
3474 -DCATCH_INCLUDE_DIR=$XBPS_CROSS_BASE/usr/include/catch2"
3475build_style=cmake
3476depends="dmenu"
3477short_desc="Fast desktop menu"
3478maintainer="meator &lt;[email protected]&gt;"
3479license="GPL-3.0-or-later"
3480homepage="https://github.com/enkore/j4-dmenu-desktop"
3481changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3482distfiles="https://github.com/enkore/j4-dmenu-desktop/archive/refs/tags/r2.18.tar.gz"
3483checksum=77c5605d0c1291bcf1e13b186ea3b32ddf4753de0d0e39127b4a7d2098393e25
3484</code></pre>
3485<h3 id="version-and-distfiles"><a class="header" href="#version-and-distfiles"><code>version</code> and <code>distfiles</code></a></h3>
3486<p>A package update procedure (<a href="../package-update-tutorial.html">which by the way has its own tutorial
3487here</a>) usually consists of two things:</p>
3488<ol>
3489<li>changing <code>version</code></li>
3490<li>updating <code>checksum</code></li>
3491</ol>
3492<p><code>distfiles</code> should depend on <code>version</code> so that when <code>version</code> is updated,
3493<code>distfiles</code> is updated too. With this method, it is much harder to have a
3494package whose <code>version</code> doesn’t match the real version of the distfile.</p>
3495<p>Here is the modified template:</p>
3496<pre><code class="language-bash">
3496# Template file for 'j4-dmenu-desktop'
3497pkgname=j4-dmenu-desktop
3498version=2.18
3499revision=1
3500makedepends="catch2"
3501configure_args="-DWITH_GIT_CATCH=NO
3502 -DCATCH_INCLUDE_DIR=$XBPS_CROSS_BASE/usr/include/catch2"
3503build_style=cmake
3504depends="dmenu"
3505short_desc="Fast desktop menu"
3506maintainer="meator &lt;[email protected]&gt;"
3507license="GPL-3.0-or-later"
3508homepage="https://github.com/enkore/j4-dmenu-desktop"
3509changelog="https://raw.githubusercontent.com/enkore/j4-dmenu-desktop/develop/CHANGELOG"
3510distfiles="https://github.com/enkore/j4-dmenu-desktop/archive/refs/tags/r${version}.tar.gz"
3511checksum=77c5605d0c1291bcf1e13b186ea3b32ddf4753de0d0e39127b4a7d2098393e25
3512</code></pre>
3513<h3 id="checks"><a class="header" href="#checks">Checks</a></h3>
3514<p>When describing <a href="#build-steps">build steps</a>, you might have noticed a <code>check</code>
3515step. Its purpose is to run a package check if the package has any checks or
3516unit tests.</p>
3517<p>The <code>check</code> phase should ideally verify whether the package has been installed
3518in the right environment and that no dependencies are missing.</p>
3519<p>Running checks might require additional dependencies. They can be specified in
3520<code>checkdepends</code>. They won’t be installed to destdir if checks aren’t enabled.</p>
3521<p>Checks can be enabled with the <code>-Q</code> or <code>-K</code> flags. <code>-Q</code> enables “basic” checks,
3522and <code>-K</code> enables all checks. Most packages have only basic checks so both of
3523these flags do the same thing.</p>
3524<p>Checks can be run like this:</p>
3525<pre><code>./xbps-src -Q pkg j4-dmenu-tests
3526</code></pre>
3527<p><code>j4-dmenu-desktop</code> has unit tests and the <code>cmake</code> build style picks them up (you
3528don’t have to define <code>do_check()</code> which is another advantage of using build
3529styles), but they depend on archaic Catch1. This version of Catch is long
3530deprecated. Checks should therefore be turned off. This means that all our work
3531of figuring out <code>WITH_GIT_CATCH</code> and <code>CATCH_INCLUDE_DIR</code> came to nothing, but
3532now we know how the tests would have been fixed if they had worked.
3533<code>j4-dmenu-desktop</code>’s build system now has to be instructed not to build checks.
3534They luckily provide another CMake option for that, <code>WITH_TESTS</code>. This will get
3535rid of the <code>catch2</code> dependency altogether.</p>
3536<p>A comment near <code>configure_args</code> explaining this situation should be added to
3537show good manners to other packagers reading the template.</p>
3538<p>If <code>j4-dmenu-desktop</code>’s build system wouldn’t provide a way to turn off checks,
3539we could tell <code>xbps-src</code> to skip them. Checks can be turned off with the
3540<code>make_check</code> variable. See
3541<a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#optional-variables">Manual</a>.
3542“This option has to be accompanied by a comment explaining why the tests fail.”</p>
3543<p>This is the modified template:</p>
3544<pre><code class="language-bash">
3544# Template file for 'j4-dmenu-desktop'
3545pkgname=j4-dmenu-desktop
3546version=2.18
3547revision=1
3548# Tests depend on archaic Catch1
3549configure_args="-DWITH_TESTS=NO"
3550build_style=cmake
3551depends=dmenu
3552short_desc="Fast desktop menu"
3553maintainer="meator &lt;[email protected]&gt;"
3554license="GPL-3.0-or-later"
3555homepage="https://github.com/enkore/j4-dmenu-desktop"
3556distfiles="https://github.com/enkore/j4-dmenu-desktop/archive/refs/tags/r${version}.tar.gz"
3557checksum=77c5605d0c1291bcf1e13b186ea3b32ddf4753de0d0e39127b4a7d2098393e25
3558</code></pre>
3559<h3 id="when-their-build-system-is-broken"><a class="header" href="#when-their-build-system-is-broken">When their build system is broken…</a></h3>
3560<p>Many developers don’t bother testing their programs on different architectures
3561or libc’s. Their program might not build or function on these. This can happen
3562for two main reasons:</p>
3563<ol>
3564<li>Their program is functionally incompatible with the architecture or
3565cross-compilation isn’t possible for some reason.</li>
3566<li>Their program could very well be cross-compiled, but their code or build
3567system isn’t following best practices and it just doesn’t build there. This
3568can happen because of poor quality build system definitions or by use of
3569non-standard language or library constructs. Both of these should ideally not
3570happen in perfect code, but little in life is perfect.</li>
3571</ol>
3572<p>When 1. happens, you can do nothing about it. You can use the <code>nocross</code> or
3573<code>archs</code> variables accompanied by a comment that gives a very good reason why it
3574is impossible to support cross-building or other architectures.</p>
3575<div id="admonition-warning-1" class="admonition admonish-warning">
3576<div class="admonition-title">
3577<p>Warning</p>
3578<p><a class="admonition-anchor-link" href="#admonition-warning-1"></a></p>
3579</div>
3580<div>
3581<p>Void Linux tries really hard to support all its official architectures and you
3582should too.</p>
3583<p>Using <code>nocross</code> or <code>archs</code> because you didn’t care to test the package in these
3584conditions will likely lead to package rejection in official repos. Testing for
3585all architectures is made simple by <a href="contributing.html#solving-check-errors">GitHub PR
3586checks</a>.</p>
3587</div>
3588</div>
3589<p>When 2. happens, you should try to fix it or at least <a href="../troubleshooting.html#notifying-upstream">notify upstream
3590developers</a> (by creating an issue in the
3591repository for example). They may or may not be willing to fix it.</p>
3592<p>There are two mechanisms commonly used to fix things manually: patches and
3593<code>vsed</code>.</p>
3594<h4 id="vsed"><a class="header" href="#vsed"><code>vsed</code></a></h4>
3595<p><code>vsed</code> is a wrapper around <code>sed</code> that makes sure that specified files
3596were really modified. It is well suited for simple changes or as a search and
3597replace.</p>
3598<h4 id="patches"><a class="header" href="#patches">Patches</a></h4>
3599<p>Patches can be put into a <code>patches/</code> subdirectory in the directory where the
3600template file is located. If the template file is in
3601<code>srcpkgs/j4-dmenu-desktop/template</code>, it will go to
3602<code>srcpkgs/j4-dmenu-desktop/patches/</code>. All files in this directory ending in
3603<code>.diff</code> or <code>.patch</code> will be applied to <code>$wrksrc</code> using <code>patch -Np1</code>. This
3604mechanism can be modified (although that isn’t needed often), but that is
3605outside the scope of this tutorial. See the
3606<a href="https://github.com/void-linux/void-packages/blob/master/Manual.md#handling-patches">Manual</a>
3607for more info.</p>
3608<p>When you try to build the template provided above, you will notice that it fails
3609on the <code>do_build()</code> step. Here is the error message:</p>
3610<pre><code class="language-hidelines=~"><span class="boring">=&gt; xbps-src: updating repositories for host (x86_64)...
3611</span><span class="boring">[*] Updating repository `https://repo-default.voidlinux.org/current/bootstrap/x86_64-repodata' ...
3612</span><span class="boring">[*] Updating repository `https://repo-default.voidlinux.org/current/x86_64-repodata' ...
3613</span><span class="boring">[*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ...
3614</span><span class="boring">[*] Updating repository `https://repo-default.voidlinux.org/current/debug/x86_64-repodata' ...
3615</span><span class="boring">[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/bootstrap/x86_64-repodata' ...
3616</span><span class="boring">[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ...
3617</span><span class="boring">x86_64-repodata: [681KB 0%] 58MB/s ETA: 00m00s
3618</span><span class="boring">x86_64-repodata: [681KB 54%] 399KB/s ETA: 00m00s
3619</span><span class="boring">x86_64-repodata: 681KB [avg rate: 739KB/s]
3620</span><span class="boring">[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
3621</span><span class="boring">=&gt; xbps-src: updating software in / masterdir...
3622</span><span class="boring">=&gt; xbps-src: cleaning up / masterdir...
3623</span><span class="boring">=&gt;
3623 j4-dmenu-desktop-2.18_1: removing autodeps, please wait...
3624</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: building with [cmake] for x86_64...
3625</span><span class="boring">   [host] cmake-bootstrap-3.27.6_2: found (https://repo-default.voidlinux.org/current/bootstrap)
3626</span><span class="boring">   [host] ninja-1.11.1_4: found (https://repo-default.voidlinux.org/current)
3627</span><span class="boring">   [runtime] dmenu-5.2_1: found (https://repo-default.voidlinux.org/current)
3628</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: installing host dependencies: cmake-bootstrap-3.27.6_2 ninja-1.11.1_4 ...
3629</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running do-fetch hook: 00-distfiles ...
3630</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running do-extract hook: 00-distfiles ...
3631</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: extracting distfile(s), please wait...
3632</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running do-patch hook: 00-patches ...
3633</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running pre-configure hook: 00-gnu-configure-asneeded ...
3634</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running pre-configure hook: 01-override-config ...
3635</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running pre-configure hook: 02-script-wrapper ...
3636</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running do_configure ...
3637</span><span class="boring">CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
3638</span><span class="boring">  Compatibility with CMake &lt; 3.5 will be removed from a future version of
3639</span><span class="boring">  CMake.
3640</span><span class="boring">
3641</span><span class="boring">  Update the VERSION argument &lt;min&gt; value or use a ...&lt;max&gt; suffix to tell
3642</span><span class="boring">  CMake that the project does not need compatibility with older versions.
3643</span><span class="boring">
3644</span><span class="boring">
3645</span><span class="boring">-- The C compiler identification is GNU 13.2.0
3646</span><span class="boring">-- The CXX compiler identification is GNU 13.2.0
3647</span><span class="boring">-- Detecting C compiler ABI info
3648</span><span class="boring">-- Detecting C compiler ABI info - done
3649</span><span class="boring">-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
3650</span><span class="boring">-- Detecting C compile features
3651</span><span class="boring">-- Detecting C compile features - done
3652</span><span class="boring">-- Detecting CXX compiler ABI info
3653</span><span class="boring">-- Detecting CXX compiler ABI info - done
3654</span><span class="boring">-- Check for working CXX compiler: /usr/lib/ccache/bin/g++ - skipped
3655</span><span class="boring">-- Detecting CXX compile features
3656</span><span class="boring">-- Detecting CXX compile features - done
3657</span><span class="boring">-- Configuring done (1.9s)
3658</span><span class="boring">-- Generating done (0.0s)
3659</span><span class="boring">CMake Warning:
3660</span><span class="boring">  Manually-specified variables were not used by the project:
3661</span><span class="boring">
3662</span><span class="boring">    CMAKE_INSTALL_LIBDIR
3663</span><span class="boring">    CMAKE_INSTALL_SBINDIR
3664</span><span class="boring">    CMAKE_INSTALL_SYSCONFDIR
3665</span><span class="boring">
3666</span><span class="boring">
3667</span><span class="boring">-- Build files have been written to: /builddir/j4-dmenu-desktop-2.18/build
3668</span><span class="boring">=&gt; j4-dmenu-desktop-2.18_1: running pre-build hook: 02-script-wrapper ...
3669</span>=&gt; j4-dmenu-desktop-2.18_1: running do_build ...
3670[1/2] Building CXX object CMakeFiles/j4-dmenu-desktop.dir/src/main.cc.o
3671FAILED: CMakeFiles/j4-dmenu-desktop.dir/src/main.cc.o
3672/usr/lib/ccache/bin/g++   -DNDEBUG -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2    -ffile-prefix-map=/builddir/j4-dmenu-desktop-2.18/build=. -std=c++11 -Wall -Wextra -pedantic -O2 -D_WITH_GETLINE -MD -MT CMakeFiles/j4-dmenu-desktop.dir/src/main.cc.o -MF CMakeFiles/j4-dmenu-desktop.dir/src/main.cc.o.d -o CMakeFiles/j4-dmenu-desktop.dir/src/main.cc.o -c /builddir/j4-dmenu-desktop-2.18/src/main.cc
3673In file included from ../src/Main.hh:16,
3674                 from ../src/main.cc:2:
3675../src/Application.hh:31:25: error: 'uint32_t' does not name a type
3676   31 | static inline constexpr uint32_t make_istring(const char *s)
3677      |                         ^~~~~~~~
3678../src/Application.hh:27:1: note: 'uint32_t' is defined in header '&lt;cstdint&gt;'; did you forget to '#include &lt;cstdint&gt;'?
3679   26 | #include "LocaleSuffixes.hh"
3680  +++ |+#include &lt;cstdint&gt;
3681   27 |
3682../src/Application.hh:36:11: error: 'uint32_t' does not name a type
3683   36 | constexpr uint32_t operator "" _istr(const char *s, size_t)
3684      |           ^~~~~~~~
3685../src/Application.hh:36:11: note: 'uint32_t' is defined in header '&lt;cstdint&gt;'; did you forget to '#include &lt;cstdint&gt;'?
3686../src/Application.hh: In member function 'bool Application::read(const char*, char**, size_t*)':
3687<span class="boring">
3687../src/Application.hh:142:24: error: 'make_istring' was not declared in this scope
3688</span><span class="boring">  142 |                 switch(make_istring(key)) {
3689</span><span class="boring">      |                        ^~~~~~~~~~~~
3690</span><span class="boring">../src/Application.hh:143:22: error: unable to find string literal operator 'operator""_istr' with 'const char [5]', 'long unsigned int' arguments
3691</span><span class="boring">  143 |                 case "Name"_istr:
3692</span><span class="boring">      |                      ^~~~~~~~~~~
3693</span><span class="boring">../src/Application.hh:146:22: error: unable to find string literal operator 'operator""_istr' with 'const char [12]', 'long unsigned int' arguments
3694</span><span class="boring">  146 |                 case "GenericName"_istr:
3695</span><span class="boring">      |                      ^~~~~~~~~~~~~~~~~~
3696</span><span class="boring">../src/Application.hh:149:22: error: unable to find string literal operator 'operator""_istr' with 'const char [5]', 'long unsigned int' arguments
3697</span><span class="boring">  149 |                 case "Exec"_istr:
3698</span><span class="boring">      |                      ^~~~~~~~~~~
3699</span><span class="boring">../src/Application.hh:152:22: error: unable to find string literal operator 'operator""_istr' with 'const char [5]', 'long unsigned int' arguments
3700</span><span class="boring">  152 |                 case "Path"_istr:
3701</span><span class="boring">      |                      ^~~~~~~~~~~
3702</span><span class="boring">../src/Application.hh:155:22: error: unable to find string literal operator 'operator""_istr' with 'const char [11]', 'long unsigned int' arguments
3703</span><span class="boring">  155 |                 case "OnlyShowIn"_istr:
3704</span><span class="boring">      |                      ^~~~~~~~~~~~~~~~~
3705</span><span class="boring">../src/Application.hh:167:22: error: unable to find string literal operator 'operator""_istr' with 'const char [10]', 'long unsigned int' arguments
3706</span><span class="boring">  167 |                 case "NotShowIn"_istr:
3707</span><span class="boring">      |                      ^~~~~~~~~~~~~~~~
3708</span><span class="boring">../src/Application.hh:179:22: error: unable to find string literal operator 'operator""_istr' with 'const char [7]', 'long unsigned int' arguments
3709</span><span class="boring">  179 |                 case "Hidden"_istr:
3710</span><span class="boring">      |                      ^~~~~~~~~~~~~
3711</span><span class="boring">../src/Application.hh:180:22: error: unable to find string literal operator 'operator""_istr' with 'const char [10]', 'long unsigned int' arguments
3712</span><span class="boring">  180 |                 case "NoDisplay"_istr:
3713</span><span class="boring">      |                      ^~~~~~~~~~~~~~~~
3714</span><span class="boring">../src/Application.hh:188:22: error: unable to find string literal operator 'operator""_istr' with 'const char [9]', 'long unsigned int' arguments
3715</span><span class="boring">  188 |                 case "Terminal"_istr:
3716</span><span class="boring">      |                      ^~~~~~~~~~~~~~~
3717</span><span class="boring">../src/Application.hh:189:61: error: unable to find string literal operator 'operator""_istr' with 'const char [5]', 'long unsigned int' arguments
3718</span><span class="boring">  189 |                     this-&gt;terminal = make_istring(value) == "true"_istr;
3719</span><span class="boring">      |                                                             ^~~~~~~~~~~
3720</span><span class="boring">ninja: build stopped: subcommand failed.
3721</span><span class="boring">=&gt; ERROR: j4-dmenu-desktop-2.18_1: do_build: '${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}' exited with 1
3722</span><span class="boring">=&gt; ERROR:   in do_build() at common/build-style/cmake.sh:95
3723</span></code></pre>
3724<p>Note that this error isn’t even caused by cross-compilation or compilation on
3725Musl, this is just bad code.</p>
3726<p>If you have experience with C or C++, you can see that upstream forgot to
3727include a header file. The release has probably worked on their computer, but it
3728doesn’t work now because it depends on nonstandard header file pulling which is
3729not a sign of good C++ code. Thankfully the solution is pretty simple.</p>
3730<p>If you do not have experience with C or C++, you’ll have to <a href="index.html#irc">ask for
3731help</a> or try to look for a patch elsewhere. Sometimes the fix has
3732been already implemented in upstream’s development version. You can then get
3733this patch and <a href="../troubleshooting.html#notifying-upstream">respectfully ask upstream to make a newer release including the
3734fix</a>.</p>
3735<p>Or you can get “inspired” by other repositories like the <a href="https://archlinux.org/packages/">official Arch
3736repo</a>, <a href="https://aur.archlinux.org/">the AUR</a>,
3737<a href="https://git.alpinelinux.org/aports/">Alpine repos</a> or elsewhere.
3738<a href="https://repology.org/">https://repology.org/</a> is your friend.</p>
3739<p>I’ll give you the right patch:</p>
3740<pre><code class="language-patch">--- a/src/Application.hh
3741+++ b/src/Application.hh
3742@@ -21,6 +21,7 @@
3743 #include &lt;algorithm&gt;
3744 #include &lt;string.h&gt;
3745 #include &lt;unistd.h&gt;
3746+#include &lt;cstdint&gt;
3747
3748 #include "Utilities.hh"
3749 #include "LocaleSuffixes.hh"
3750</code></pre>
3751<p>You should also include a concise and informative header to the patch (if the
3752patch doesn’t already have one):</p>
3753<pre><code class="language-patch">Fixes failing build on missing header file. Fixed in master.
3754--- a/src/Application.hh
3755+++ b/src/Application.hh
3756@@ -21,6 +21,7 @@
3757 #include &lt;algorithm&gt;
3758 #include &lt;string.h&gt;
3759 #include &lt;unistd.h&gt;
3760+#include &lt;cstdint&gt;
3761
3762 #include "Utilities.hh"
3763 #include "LocaleSuffixes.hh"
3764</code></pre>
3765<p>If you obtained the patch from somewhere else (such as being “inspired” by
3766another distro’s repositories, as mentioned above), you should include a link to
3767the original patch in the header.</p>
3768<p>You can put the patch in <code>srcpkgs/j4-dmenu-desktop/patches/fix_headers.patch</code>
3769(you’ll have to <code>mkdir</code> the <code>srcpkgs/j4-dmenu-desktop/patches/</code> directory).
3770<code>j4-dmenu-desktop</code> should be buildable now.</p>
3771<h3 id="linting"><a class="header" href="#linting">Linting</a></h3>
3772<p>This should be the last step of every packaging session.</p>
3773<p>You should run <code>xlint</code>. This script is provided by the <code>xtools</code> package. It
3774checks for common errors and enforces some stylistic choices to make templates
3775consistent. When you run <code>xlint</code> on the template above, it prints this:</p>
3776<pre><code>j4-dmenu-desktop:6: Place configure_args= after build_style=
3777</code></pre>
3778<p>Moving variables won’t change the functionality of the template, but this advice
3779should be followed nonetheless.</p>
3780<p>Here is the <strong>final</strong> template:</p>
3781<pre><code class="language-bash">
3781# Template file for 'j4-dmenu-desktop'
3782pkgname=j4-dmenu-desktop
3783version=2.18
3784revision=1
3785build_style=cmake
3786configure_args="-DWITH_TESTS=NO"
3787depends=dmenu
3788short_desc="Fast desktop menu"
3789maintainer="meator &lt;[email protected]&gt;"
3790license="GPL-3.0-or-later"
3791homepage="https://github.com/enkore/j4-dmenu-desktop"
3792distfiles="https://github.com/enkore/j4-dmenu-desktop/archive/refs/tags/r${version}.tar.gz"
3793checksum=77c5605d0c1291bcf1e13b186ea3b32ddf4753de0d0e39127b4a7d2098393e25
3794</code></pre>
3795<p>with the following patch file:</p>
3796<pre><code class="language-patch">Fixes failing build on missing header file. Fixed in master.
3797--- a/src/Application.hh
3798+++ b/src/Application.hh
3799@@ -21,6 +21,7 @@
3800 #include &lt;algorithm&gt;
3801 #include &lt;string.h&gt;
3802 #include &lt;unistd.h&gt;
3803+#include &lt;cstdint&gt;
3804
3805 #include "Utilities.hh"
3806 #include "LocaleSuffixes.hh"
3807</code></pre>
3808<p>It should build successfully with or without checks and it should cross-compile
3809well. If that isn’t the case, consider <a href="../troubleshooting.html#having-clean-masterdir">cleaning the
3810masterdir</a>.</p>
3811<h3 id="summary-1"><a class="header" href="#summary-1">Summary</a></h3>
3812<p>We use</p>
3813<pre><code>./xbps-src pkg j4-dmenu-desktop
3814</code></pre>
3815<p>to build a template.</p>
3816<p>We use</p>
3817<pre><code>./xbps-src -a &lt;arch&gt; pkg j4-dmenu-desktop
3818</code></pre>
3819<p>to build a template for a different architecture using cross-compilation.</p>
3820<p>We use</p>
3821<pre><code>sudo xi -f j4-dmenu-desktop
3822</code></pre>
3823<p>to install a template.</p>
3824<p>A template <strong>must</strong> include these things:</p>
3825<pre><code class="language-bash">pkgname=name
3826version=1234
3827revision=1
3828short_desc="Description"
3829maintainer="meator &lt;[email protected]&gt;"
3830license="GPL-3.0-or-later"
3831homepage="https://example.com/"
3832</code></pre>
3833<p>Templates are built in stages.</p>
3834<p>The source of the package must be put to <code>$wrksrc</code>, which resides in
3835<code>masterdir-x86_64/builddir/&lt;pkgname&gt;-&lt;version&gt;</code>.</p>
3836<p>Package files must be installed into <code>$DESTDIR</code>, which resides in
3837<code>masterdir-x86_64/destdir/&lt;pkgname&gt;-&lt;version&gt;</code>.</p>
3838<p>Stages are usually executed in <code>$wrksrc</code>.</p>
3839<p>Building and installation should be handled by build styles.</p>
3840<p>They can be modified with variables like <code>configure_args</code>.</p>
3841<p>Code should be downloaded using <code>distfiles</code> and not git. The <code>Source code (tar.gz)</code> GitHub archive should be chosen.</p>
3842<p><code>hostmakedepends</code> is for <strong>host</strong>, <code>makedepends</code> is for <strong>target</strong>, and
3843<code>depends</code> are runtime dependencies.</p>
3844<p><code>distfiles</code> should always reference <code>${version}</code>.</p>
3845<p>You can build with checks using</p>
3846<pre><code>./xbps-src -Q pkg &lt;PACKAGE&gt;
3847</code></pre>
3848<p>Patches should be in the <code>patches/</code> subdirectory and they should end in <code>.diff</code>
3849or <code>.patch</code>. They are applied automatically, template file doesn’t have to be
3850modified.</p>
3851<p>You should run <code>xlint</code> on your templates.</p>
3852<h3 id="what-now"><a class="header" href="#what-now">What now?</a></h3>
3853<p>Packaging <code>j4-dmenu-desktop</code> shows the most useful capabilities of <code>xbps-src</code>
3854but not all of them. I’ve written a (significantly shorter) walkthrough through
3855packaging another program, <a href="https://github.com/sharkdp/bat"><code>bat</code></a>:</p>
3856<p><a href="bat.html">Packaging bat</a></p>
3857<hr />
3858<div class="footnote-definition" id="youcan"><sup class="footnote-definition-label">1</sup>
3859<p>I’m sure there’s a way to install a package without its dependencies,
3860but you’ll have to try pretty hard to do that.</p>
3861</div>
3862<div class="footnote-definition" id="deps"><sup class="footnote-definition-label">2</sup>
3863<p>You also of course need XBPS and some very basic dependencies mentioned
3864in <a href="https://github.com/void-linux/void-packages/blob/master/README.md#requirements">README’s
3865Requirements</a>,
3866which you probably already have installed.</p>
3867</div>
3868<div class="footnote-definition" id="uname"><sup class="footnote-definition-label">3</sup>
3869<p>You can check with <code>uname -m</code></p>
3870</div>
3871<div class="footnote-definition" id="basechroot"><sup class="footnote-definition-label">4</sup>
3872<p>The <code>base-chroot</code> package isn’t present in normal repositories.
3873void-packages masterdirs access a special repository called
3874<code>bootstrap</code>.</p>
3875</div>
3876<div class="footnote-definition" id="ornot"><sup class="footnote-definition-label">5</sup>
3877<p>Or not!</p>
3878</div>
3879<div class="footnote-definition" id="polute-masterdir"><sup class="footnote-definition-label">6</sup>
3880<p>If the masterdir (the small isolated Void linux install that
3881does all the building) gets into an inconsistent state, you
3882can zap it as described in
3883<a href="../troubleshooting.html#having-clean-masterdir">troubleshooting</a>.</p>
3884</div>
3885<div class="footnote-definition" id="bytecompiled"><sup class="footnote-definition-label">7</sup>
3886<p>Python packages are <em>byte compiled</em> on Void, but that is
3887something different.</p>
3888</div>
3889<div class="footnote-definition" id="buildstyledeps"><sup class="footnote-definition-label">8</sup>
3890<p>Not all build styles do that.</p>
3891</div>
3892<div class="footnote-definition" id="fixgit"><sup class="footnote-definition-label">9</sup>
3893<p><code>git</code> can be invoked with <code>--branch r2.18</code> to package the correct
3894version, but that also pulls unneeded git history, and it is more
3895difficult to verify its state (SHA256SUMs are used for tarballs).</p>
3896</div>
3897
3898                    </main>
3899
3900                    <nav class="nav-wrapper" aria-label="Page navigation">
3901                        <!-- Mobile navigation buttons -->
3902                            <a rel="prev" href="../packaging/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
3903                                <i class="fa fa-angle-left"></i>
3904                            </a>
3905
3906                            <a rel="next prefetch" href="../packaging/bat.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
3907                                <i class="fa fa-angle-right"></i>
3908                            </a>
3909
3910                        <div style="clear: both"></div>
3911                    </nav>
3912                </div>
3913            </div>
3914
3915            <nav class="nav-wide-wrapper" aria-label="Page navigation">
3916                    <a rel="prev" href="../packaging/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
3917                        <i class="fa fa-angle-left"></i>
3918                    </a>
3919
3920                    <a rel="next prefetch" href="../packaging/bat.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
3921                        <i class="fa fa-angle-right"></i>
3922                    </a>
3923            </nav>
3924
3925        </div>
3926
3927
3928
3929
3930        
3930<script>
3931            window.playground_copyable = true;
3932        </script>
3932
3933
3934
3935        
3935<script src="../elasticlunr.min.js"></script>
3935
3936        
3936<script src="../mark.min.js"></script>
3936
3937        
3937<script src="../searcher.js"></script>
3937
3938
3939        
3939<script src="../clipboard.min.js"></script>
3939
3940        
3940<script src="../highlight.js"></script>
3940
3941        
3941<script src="../book.js"></script>
3941
3942
3943        <!-- Custom JS scripts -->
3944
3945
3946    </div>
3947    </body>
3948</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.