I use Debhelper to create Debian packages. To deploy files and directories, I use the debian/install
and debian/dirs
files.
Now I would like my package to deploy the default user configuration file to $HOME/.mypackagerc (just like .bashrc and friends).
Does Debhelper provide a way to do this, or should I just:
You should do it in your own program.
You can't get debhelper to do this. A postinst script may be able to install in all current user accounts, but you lose control of what happens after the user has performed the installation. So new users won't get the ~/.mypackagerc
files, unless you put it in /etc/skel
also which is overdoing it, in my opinion.
I also say this because the package is installed by root. Root shouldn't have to mess around with other user's files. I don't know whether Debian Policy has anything on this, but you'll save yourself writing a lot of ugly code if you program made these files itself.
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With