@@ -145,7 +145,7 @@ mv usr/include $DESTDIR/usr/include
145145` xnew ` prefill it with things that should generally appear in a ` -devel `
146146package.
147147
148- Here is the filled out template:
148+ Here is the filled- out template:
149149``` bash
150150# Template file for 'oniguruma'
151151pkgname=oniguruma
@@ -267,7 +267,7 @@ oniguruma>=6.8.1_1
267267```
268268
269269It depends on ` oniguruma>=6.8.1_1 ` even though the template doesn't even have a
270- ` depends ` field? How is that possible?
270+ ` depends ` field. How is that possible?
271271
272272Each program remembers what dynamic libraries has it been linked with. It
273273remembers the SONAME of the linked library.
@@ -304,7 +304,8 @@ I have largely overlooked the `common/` directory. It contains `xbps-src`
304304internal scripts, definitions of build styles and more. But it also contains the
305305SONAME to package mapping.
306306
307- A best example to show how it's working is to showcase when it doesn't work. Let's do that:
307+ The best example to show how it's working is to showcase when it doesn't work.
308+ Let's do that:
308309
309310We have a ` oniguruma ` (and ` oniguruma-devel ` ) template:
310311``` bash
@@ -336,8 +337,8 @@ oniguruma-devel_package() {
336337}
337338```
338339
339- and we want to build ` bat ` using the template we have crafted in the previous
340- part of the tutorial:
340+ and we want to build ` bat ` using the template we crafted in the previous part of
341+ the tutorial:
341342
342343``` bash
343344# Template file for 'bat'
@@ -385,8 +386,8 @@ Let's build `oniguruma` and then `bat`:
385386This shows us that we don't have to add every library SONAME to ` common/shlibs ` ,
386387but we have to add every SONAME REQUIRES.
387388
388- Note that if the build of ` bat ` wouldn 't have failed, it would ** not** have
389- ` oniguruma ` in its runtime dependencies.
389+ Note that if the build of ` bat ` hadn 't failed, it would ** not** have ` oniguruma `
390+ in its runtime dependencies.
390391
391392If a library is a dependency of another package, we ** should** add the SHLIB to
392393` common/shlibs ` , but it isn't mandatory otherwise (but libraries are usually
@@ -457,7 +458,7 @@ put into `oniguruma-doc`. What a coincidence. It's almost like this is a part of
457458a carefully crafted packaging tutorial or something.
458459
459460The documentation doesn't get installed to ` $DESTDIR ` by default, it just lies
460- in ` doc/ ` subdirectory of source. Their build system doesn't install it.[ ^ cmake ]
461+ in the ` doc/ ` subdirectory of the source. Their build system doesn't install it.[ ^ cmake ]
461462But the documentation doesn't need to be generated ([ unlike the manpage and
462463completions in ` bat ` ] ( bat.md#installing-supplementary-files ) ), we can just copy
463464the files to ` $DESTDIR ` .
@@ -541,7 +542,7 @@ xnew oniguruma oniguruma-devel
541542```
542543
543544` xnew ` recognised that the second argument ` oniguruma-devel ` is a subpackage and
544- it has created the symlink in ` srcpkgs/ ` for us. But now, we have added a
545+ it has created the symlink in ` srcpkgs/ ` for us. But now, we have added an
545546` oniguruma-doc ` subpackage "manually", so we have to create the symlink:
546547
547548```
@@ -567,10 +568,10 @@ This means that we can very well build packages like this:
567568
568569All three of these are equivalent. ` ./xbps-src pkg oniguruma-doc ` doesn't just
569570build the documentation, it builds all (sub)packages of ` oniguruma ` because
570- ` srcpkgs/oniguruma-doc ` is really ` srcpkgs/oniguruma ` .
571+ ` srcpkgs/oniguruma-doc ` is actually ` srcpkgs/oniguruma ` .
571572
572573## Cleaning up
573- This is out template so far:
574+ This is our template so far:
574575``` bash
575576# Template file for 'oniguruma'
576577pkgname=oniguruma
@@ -608,7 +609,7 @@ oniguruma-doc_package() {
608609}
609610```
610611
611- ` oniguruma ` is a very self contained library and it has no dependencies, so we
612+ ` oniguruma ` is a very self- contained library and it has no dependencies, so we
612613won't need any of the ` *depends ` variables:
613614
614615``` bash
@@ -696,7 +697,7 @@ The license file is called `COPYING` in `oniguruma`.
696697
697698A repeated run of ` xlint ` returns no findings.
698699
699- ## Comparing with upstream template
700+ ## Comparing with the upstream template
700701This is our template:
701702``` bash
702703# Template file for 'oniguruma'
@@ -811,11 +812,11 @@ The upstream template adds
811812configure_args=" --enable-posix-api=yes"
812813```
813814
814- This tells ` oniguruma ` 's buildsystem GNU configure that it should enable POSIX
815+ This tells ` oniguruma ` 's build system GNU configure that it should enable POSIX
815816APIs. I am not entirely sure what it does, but I'm sure it serves an important
816817purpose and it shouldn't be removed. This is not related to ` xbps-src ` package
817- management, this is a ` oniguruma ` specific thing. If you happen to need to use
818- some "magic flags" in your template, you should document them with an
818+ management, this is an ` oniguruma ` - specific thing. If you happen to need to
819+ use some "magic flags" in your template, you should document them with an
819820accompanying comment.
820821
821822The official template uses ` ${sourcepkg} ` in some places. Excessive use of
@@ -831,7 +832,7 @@ different: [`rofimoji`](https://github.com/fdw/rofimoji):
831832[ ^ minimal ] : Some people (although they are a minority) use an alternative
832833 ` base- ` package instead of ` base-system ` for their system. But these
833834 dependencies are so basic that even these people should have them.
834- [ ^ cmake ] : As I mentioned in the very beginning of page, ` oniguruma ` has multiple
835+ [ ^ cmake ] : As I mentioned at the very beginning of the page, ` oniguruma ` has multiple
835836 build systems. I wasn't able to find anything related to documentation
836837 in their configure script, but their ` CMakeLists.txt ` [ has an option
837838 for installing
0 commit comments