Monday, April 29, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 3037  / 2 Years ago, wed, august 24, 2022, 5:22:33

How can i list all the files (and their future locations) which will be installed by invoking 'dpkg -i' on a .deb file? Which makefile target of the source package determines those (is it the default 'install' target?)



(The second part of the question concerns the package creation process. I want the list of files installed by 'make install' and the list of files installed by the .deb package to be the same)


More From » package-management

 Answers
1

You can list the contents of a deb file by running



dpkg-deb --contents package.deb


dpkg-deb can show a whole lot of information about a deb package. You can see the other options by running dpkg-deb --help.



Unfortunately, you can't determine what files a Makefile will install. However, you can install to a temporary directory by setting the DESTDIR variable. Note that this works well mainly on Makefiles generated by autotools ie. the ./configure script. For example:



cd sourcecode-1.2
./configure --prefix=/usr #Just the usual compiling stuff
make
mkdir /tmp/installedfiles #Create a temporary directory for the files
make DESTDIR=/tmp/installedfiles install


That last make line will install the files in /tmp/installedfiles. You can then see the files that would be created, although those files and directories will all be relative to the prefix specified in the configure script. In other words, /tmp/installedfiles/bin/mainprogram would be installed as /usr/bin/mainprogram.



I hope I answered your question :)


[#44325] Wednesday, August 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enefiama

Total Points: 43
Total Questions: 125
Total Answers: 102

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
enefiama questions
;