> Hi, > On Thu, 2 Sep 1999, Julian Gilbey wrote: > > > All that debhelper will do is to place appropriate lines in the > > postinst to handle "standard" things such as info file installation, > > window manager installation, suidregister and so forth. As soon as > > you want to do something package-specific, you have to write your own > > postinst. Incidentally, for debhelper to put *anything* in a > What a pitty... right now I get a postinst.debhelper which contains: > # Automatically added by dh_installmenu > if test -x /usr/bin/update-menus ; then update-menus ; fi > # End automatically added section > and maybe more for sgid files.
Ah, so you then need to have #DEBHELPER# lines in your scripts. > > maintainer script ({pre,post}{inst,rm}), you need to have at least the > > following minimal script: > > > #! /bin/sh > > > > #DEBHELPER# > > > > I don't believe that debhelper will create the script otherwise. > I have to put that into postinst and postrm? Then the update-menu and sgid > stuff will be added by debhelper? Good then. Will try at home (can we have > something like this in the documentation, as an example please? And, if necessary, preinst and prerm. Have a look at which scripts debhelper creates (like postinst.debhelper) in the debian/ directory. > > postinst: > > --------- > > #! /bin/sh > > if [ "$1" = configure ] > > then > > if [ -d /var/games ]; then DIR=/var/games; else DIR=/var/lib/games; fi > > touch $DIR/mylog > > chown root.games $DIR/mylog > > chmod 664 $DIR/mylog > > fi > > > > postrm: > > ------- > > #! /bin/sh > > if [ "$1" = purge ] > > then > > if [ -d /var/games ] > > then rm /var/games/mylog > > else rm /var/lib/games/mylog > > fi > > fi > Thanks for the example, but I see no #DEBHELPER# ? I just add it after > /bin/sh before my "private" script? Yes, either that or at the end. Or somewhere else. Have a look at section 6 of the packaging manual which explains how the scripts are executed for a better understanding of what's going on. Julian =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Julian Gilbey, Dept of Maths, QMW, Univ. of London. [EMAIL PROTECTED] Debian GNU/Linux Developer, see http://www.debian.org/~jdg