Skip to content

Split the package in build()

Luke Shumaker requested to merge lukeshu/systemd:lukeshu/to-arch-split into main

For a long time, the PKGBUILD has split the package by having package_systemd() do a full install then rm (or mv to a stash somewhere) files that go in the split packages, and then having the other package_ functions re-create those files. In my opinion, this is unnecessarily tedious and error-prone; each file in a split package must be listed in 2 places that are far away from eachother in the file.

Instead, go ahead and do the meson install in build(), installing to $srcdir/dest/$pkgname, and the use mv to split the package from there. This way each file only needs to be listed once, and the package_ functions can be a single cp.

This is the way I do it in Parabola, and I hope that you too will find it easier to work with.

And while we're at it, fix a few minor issues with the splitting:

  • put the init(1) man-page in the same package as /bin/init (systemd-sysvcompat)
  • add MIT-0 to the license array in package_systemd-libs() (same as package_systemd()), as examples in man-pages included in that package are under the MIT license.
  • put the NSS module man-pages in the same package as the modules themselves (systemd-libs)
Edited by Luke Shumaker

Merge request reports