I want create a tarball that when extracted the file(s) will be placed at a specific location. Normally one would use the -C switch (not an option in my case) or would create the destination path on the originating system and create the tarball using the full path. So, is there a way to avoid all this fuss and specify the destination directory at tarball-creation time? E.g. I have file foo.bar in ~/ and I want to create a tarball that when extracted will place that file in /opt/a/b/c/foo.bar.
Share
tar can not do it. You have to create distribution specific package. For Debian and its derivatives
dpkg-deb --buildcommand usually does the trick.Here is a tutorial for Debian Binary Package Binding