I have debianized some source using "dh_make --native". The control file specifies three packages:
blahd
libblahd1
libblahd1-dev
Now blahd
has an init.d
script, and whilst this gets put in /etc/init.d
once the package is built and installed, it doesn't get enabled. So I think I need to put something like:
insserv blahd
in debian/postinst. But how can I tell in debian/postinst whether it is blahd
or libblahd1
or libblahd1-dev
that is being installed?
The answer was given by barti_ddu in a comment:
If your debian/control file specifies multiple packages, you can provide multiple init.d files and specify which package each is for by naming them debian/<package1>
.init, debian/<package2>
.init and so on.
Thanks.