On Sat, Aug 28, 2021 at 05:22:26AM +0000, Ryan McClue wrote:
At a high level I understand that the debian/rules file instructs
debhelper as to how to build your package. However, I'm confused
regarding these two points:
This may be true in some way but to me it sounds like a wrong layering. debian/rules is a file that, when run in a certain ways, generates a .deb.
To do this it will most likely (but not necessarily) call some helpers,
most of those are a part of the debhelper suite, but most of the helpers
just move files around or call other commands, and the lowest level are
the upstream build system for the compilation part and dpkg-* commands
from dpkg-dev for the building .deb, .changes etc. part.
1. Why is debhelper used? Why not just explicitly state in the
debian/rules file how to build your package with either direct shell,
e.g. gcc file.c -o file, or with a buildtool, e.g. cmake --build . etc.
Why the level of indirection?
So that you don't need to write specific commands for each package.
2. How does debhelper work? Is there a way I can see what specific
commands it is executing,
Yes, just read the build log. dh(1) prints which commands it executes. If
you set DH_VERBOSE=1 in the rules you should also see what do debhelper
helpers do in more details.
e.g. what does the default %: dh $@ actually
equate to?
You can run `dh <target> --no-act` for each <target> you want (build,
clean, binary etc.) to see what will dh(1) run for that target.
--
WBR, wRAR
-----BEGIN PGP SIGNATURE-----
iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmEp3mItFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh tpQP/RWyGszszEXxByDE9Ht3SlNLjNCmZ6B3WKhdRRVnSX35lRtARhvGsB1xdh5v skCiR0Ok57bx/BiefSaKBVY2+ParSzs1ypOMc0ylkBbiJJln3BX75gegAGSlRjaN lzQP4nmLFw5epAf+9gv7AmgCngnH1J244QZoCb2l8SHJAn44UaW2LKrxbWL/SliD 1xWOLjppL9zhRHg6DH/wEBYaQcr6MaLZ3tNXchEzeSRhyq7EdKBvhzuaecJffXwF 9qXH4MUrh99JXIwLv5RR3ICwxRkeim8UmgX35r8bIOiumBdxPZgoIOXp0myK6KfQ qhQZ9cf2NTe3/p/qbRvJB0yNe5CQInF8wzlmpoB/Hya/+i2Gi84ozbUXf15lMB15 QRuMXfQqNDc0rfA37aav67iq8fiXCu76UygRrckqmQqNu0Sogi1zJjSQWK3fQjvy t0W2l/jKz4nrYsc2b/7PqfWmo+NP7a03QQcqmiH7xjAXJEA8Ks5Uovg3e+veFYBE 57X6Kg/F+tKnJK5n1MnRvzQFkITop/YYHqLwqyCJw2S5L6s/SpiL6hOKqg03AjXc ozDDjLsNXAb/5fN+DDlcptLyKUKYBCwFlig2AZKELVfnbDGVCgIwk/Cuip5CD8V3 fhHRvLDd4zZs+qwdegkOfKlLWoEl2F97TZfqQQDLgAdVgNuQ
=gEa8
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)