Score:1

Dpkg install file to specify variable target dir

sa flag

I have a package with .install file in /Debian that copies data files. I want the files to be installed in ${HOME}/Documents/etc The .install file is

#!/usr/bin/dh-exec
usr/bin/my_files*
${HOME}/Documents/presets/* => /${HOME}/Documents/presets

But dpkg-buildpackage parses and replaces the target path with hard-coded values captured on the building host. Obviously those paths can't work on other PCs, so I want to modify the rule so that the target location will be established during installation and not build phase. Can you advise? Thanks in advance

Knud Larsen avatar
by flag
You can install specifically to your name like `/home/Raikhel/Documents/` : Unpack package.deb and copy the files, folders to a new folder, and run e.g. `$ dpkg-deb -b name name_version_amd64.deb` ... all according to the general build rules.
sa flag
Thank you for your comment, but that can't help the other users who download the files with `apt-get install my_lib`. Is there a standard way to do it specified in the dpkg policy ? I couldn't find one, and now I'm experimenting with `postinst` maintainer's script, which may eventually work but would make the scripts more complex
Knud Larsen avatar
by flag
Libraries are supposed to be in e.g. `/usr/lib/gcc/x86_64-linux-gnu/` where they are found automatically by apps. .......... Why do you want libs i /home/name/ ? ?
sa flag
The issue are not libraries but data files -I'm working on a cross-platform library, and I would want that the tools would be able to find files in the same relative locations (i.e. $HOME/abc/dee/...) regardless of OS
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.