DH-EXEC-ILLITERATE(1) | dh-exec | DH-EXEC-ILLITERATE(1) |
dh-exec-illiterate - Write literate debhelper config files!
#! /usr/bin/dh-exec --with=illiterate,subst,install Greetings, my dear reader, and welcome to the awesome world of literate programming! Today, we're going to explore how to write a debhelper install file in a literate manner. Trust me, it's going to be lots and lots of fun! So, what exactly are we trying to accomplish? We're going to try installing a file from `src/this-file' in the source tree, to a multi-arched path in the binary file. Lets say, to `/usr/lib/foo/${DEB_HOST_MULTIARCH}/'. Of course, ${DEB_HOST_MULTIARCH} is a variable, and will be expanded later in the dh-exec pipeline. It'll be something like x86_64-linux-gnu. Furthermore, we want to install all files from the 'usr/lib' directory under debian/tmp. If we were writing an illiteral install file, we'd write this rule as:
usr/lib But the above description is much easier to understand, isn't it? We're almost finished! One thing left to do, is to install a script named `rename-me', to `/usr/share/foo/new-name' - we renamed it in the process!
The dh-exec-illiterate sub-command, unlike the others, does not serve any particular case, except to serve as a warning to all, that things can be taken to an extreme, even with dh-exec. On the other hand, it is just like the other sub-commands in that it must not be called directly, but through dh-exec(1), which automatically runs all available sub-commands if run bare; or explicitly with dh-exec --with=illiterate.
It is a program that will translate its input from pretty much free-form text into something that resembles an install file. At least, that's the only supported output format for now.
Everything that's not recognised, will be ignored, and not printed. The recognised constructs are:
DH_EXEC_SCRIPTDIR
$DH_EXEC_SCRIPTDIR/dh-exec-illiterate-*
The sub-command was introduced in dh-exec version 0.1.
dh-exec-illiterate is copyright © 2011-2015 by Software Freedom Conservancy, Inc.
2015-10-05 |