1

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

  • 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. – Knud Larsen Jul 23 '21 at 07:46
  • 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 – Evgeni Raikhel Jul 23 '21 at 16:38
  • 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/ ? ? – Knud Larsen Jul 23 '21 at 18:35
  • 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 – Evgeni Raikhel Aug 12 '21 at 18:38

0 Answers0