1

In my debian-folder of my debian package I want to add an post-step that removes a directory for example.

I think the file *.postrm.debhelper is right for that. But this file will overwritten by several helperscripts (dh_installinit, dh_icons).

How can I add own actions to these scripts, that they will merged with the commands, which will auto-generated?

Update: I see in the manpage of dh_installdeb, that i have to add #DEBHELPER# as placeholder. But even i do that at the end of the file like this, my whole file will be overwritten:

#My own commentar
echo "My own action"

#DEBHELPER#

Update 2: dh_clean and dh_prep execute

rm -rf package.*.debhelper

following they shift script-samples from /usr/share/debhelper/autoscripts/ into the postrm.debhelper script.

imizeropt
  • 176
  • 1
  • 13

1 Answers1

3

Solution

Rename file: [packagename].postrm.debhelper ==> [packagename].postrm

After that My own commentar will be stored above the auto-generated commands, which will placed on the #DEBHELPER# placeholder.

#My own commentar
echo "My own action"

#DEBHELPER#
imizeropt
  • 176
  • 1
  • 13