Building slapd with modules included

Asked by Ryan Steele on 2009-08-04

I am very interested in rebuilding slapd with the autogroup slapd module included (similar to the way ppolicy and dynlist are already included). I've attempted to do so by editing the rules file to run a shell script that cd's into contrib/slapd-modules/autogroup/ and runs a 'make', before cd'ing back to the original directory, but that fails because it can't find certain header files (which are generated by running a 'make && make depend' in the pristine source tree). I've also tried putting the contrib directory in debian/build/ and running similar commands, but I still end up with missing header files.

I'm sure I'm making some elementary mistakes, but I couldn't find, in any of the documentation, how one should 'appropriately' go about having dpkg-buildpackage successfully build a slapd module for the purposes of having the package provide the shared object file. In the process of building, it modifies the top-level directory significantly (there ends up being no Makefile, only a Makefile.in), and I can't find any directory which I can successfully build the modules from. Of course, I can use the pristine Ubuntu source to run 'make && make depend', after which the modules build just fine, but that's clearly the antithesis of what I'm striving for, which is an inclusion of the module build in the overall package building process carried out by dpkg-buildpackage.

I would be most appreciative if someone could point me to documentation describing this, or briefly explain how one should go about it. Thank you!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openldap2.3 Edit question
Assignee:
No assignee Edit question
Solved by:
Ryan Steele
Solved:
2009-08-04
Last query:
2009-08-04
Last reply:
Ryan Steele (ryan-g-steele) said : #1

FWIW, the $sourceroot/debian/build/include/ directory is missing a lot of the headers present in the $sourceroot/include/ during the build process (for example, the ac directory). The same problem is present with $sourceroot/debian/build/servers/slapd/ versus $sourceroot/servers/slapd/ (for example, slap.h and config.h). Again, I'm sure the problem is probably simple, but I haven't found a "clean" way of accomplishing the task at hand, and I'd be most appreciative of any insights or pointers to the proper documentation.

Ryan Steele (ryan-g-steele) said : #2

Nevermind, I resolved the problem by adjusting the CPPFLAGS variable in the Makefile to include the necessary directories. The module now compiles cleanly using dpkg-buildpackage.