Creating a .deb file that extracts files to pre-determined directories
I am wondering how I would go about creating a .deb file that would extract it's contents to two different folders. I would have one file directory that should be extracted to /opt and I have a second that should be extracted to the current user's home folder and /etc/skel - How would I go about doing this?
From a file system standards point of view packaged items should not be placed in a users home folder on install. Instead the documentation should point to say an example configuration file in /usr/share/doc/foo/bar.conf the user could customize and place in ~/ themselves. Some applications run user-centric configuration on application start or provide a post-install script the user can run at will. From a packaging point of view package installation is run by the root user so "current users home folder" would then default to "/root" which may or may not be what you want. And while you can easily create a "postinst" script in the control area of the package to find all user accounts on the system and install your file there it will be hard to ensure all accounts with 'UID >= 500' you find are actually used by humans or that they would want to use the package or would need the file. In short, from a practical point of view, I'd say you'd do like you would building any Debian package but without touching the "current users home folder".
|All times are GMT -5. The time now is 09:37 AM.|