deb-src-rules(5)
π deb-src-rules β the manual page, but make it make sense β¨
okay so this is deb-src-rules(5) from the dpkg suite, bestie β it's the whole guide to that one file every Debian packager has a love-hate relationship with π«Ά
πΈ NAME πΈ
deb-src-rules β the Debian source package rules file, aka the blueprint of your whole build π
π SYNOPSIS π
debian/rules
that's it. that's the file. it lives at debian/rules and it runs the show π
β¨ DESCRIPTION β¨
okay so picture this: this file contains the instructions necessary to build the binary packages from the source package. like, the whole recipe. the main character of your packaging directory, fr fr π
The debian/rules file is an executable Makefile β yes, an actual Makefile β with a shebang that is usually set to this exact line:
#!/usr/bin/make -f
and it must support the following make targets. not "should", not "ideally" β must. these are non-negotiable bestie π
cleanβ Clean up the source tree, by undoing any change done by any of thebuildandbinarytargets. like, full reset, no crumbs left behind π§Ή This target will be called with root privileges. yeah, root. be careful.build-indepβ Build architecture independent files required to build any architecture independent binary package. If there are no architecture independent binary packages to generate, the target must still exist but do nothing β it just vibes there, existing, doing nothing, and that's valid β¨ This target must not require root privileges.build-archβ Build architecture dependent files required to build any architecture dependent binary package. If there are no architecture dependent binary packages to generate, the target must still exist but do nothing. same deal, it has to be there even if it's empty π¦ This target must not require root privileges.buildβ Build architecture independent and dependent files, either by depending (at least transitively) onbuild-indepand/orbuild-archor by inlining what those targets would do. pick your fighter, both are valid π This target must not require root privileges.binary-indepβ Build architecture independent binary packages. This target must depend (at least transitively) on eitherbuild-indeporbuild, no exceptions. This target will be called with root privileges πbinary-archβ Build architecture dependent binary packages. This target must depend (at least transitively) on eitherbuild-archorbuild. This target will be called with root privileges π₯binaryβ Build architecture independent and dependent binary packages, either by depending (at least transitively) onbinary-indepand/orbinary-archor by inlining what those targets would do. big finale energy. This target will be called with root privileges β
ngl the root privileges thing is not a drill βclean,binary-indep,binary-archandbinaryall get called as root, whilebuild-indep,build-archandbuildmust not require root. keep that vibe check in mind before you do anything wild π
π SEE ALSO π
the whole friend group, go say hi:
dpkg-architecture(1)dpkg-vendor(1)dpkg-buildflags(1)dpkg-parsechangelog(1)dpkg-shlibdeps(1)dpkg-gencontrol(1)dpkg-deb(1)dpkg-distaddfile(1)
and that's the page, bestie π this lil drop is version 1.23.11-dirty, dated 2026-09-09 β go build something iconic, ily, slay ππ¦
π¦ where this page comes from
- arch rolling: dpkg 1.23.11-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms