Hello,
Actually, you can do it by sneaking your code before or after the ./configure line, inside the configure.* files.
1) For example, if you want to patch apache, first you'd setup a custom configure.apache file:
http://help.directadmin.com/item.php?id=191
2) Then to patch the source, with the
id=191 guide, you can add your patch command before or after the configure.. and run anything else you need to.
3) Then run the build normally, eg:
(or whichever item you want to build)
The same can be repeated for
php, suphp, etc.. all with the same technique.
This method is also good, because the custom configure file are safe from update overwrites, so your custom patches will be there for future updates as well.
I didn't even realize we could do that until recently, but we can... no extra hooks are needed.. just add your code in the configure.*, before or after the actual configure call.
From a install/distribution standpoint, you'd basically just need to install a pre-packed "custom" directory, and any related patch files, and run custombuild normally.
On a side-note, if you're patching apache to disable FollowSymLinks and internally replace it with SymLinksIfOwner Match (I beleive it's called SecureLink with CL), that's already patched into custombuild with the Rack911 patch.
The custombuild option.conf option for that is called:
harden-symlinks-patch=yes
John