jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.17k stars 1.07k forks source link

Q: how to create deb packages in same manner as checkinstall #1914

Open laur89 opened 2 years ago

laur89 commented 2 years ago

Not an issue but a question. With checkinstall one could build deb packages. Example:

git clone https://github.com/dylex/slack-libpurple.git
cd slack-libpurple
make
sudo checkinstall --default --fstrans=no --pkgname=slack-libpurple -D
...
# analyze contents of generated deb package:
$ dpkg --contents ./slack-libpurple_0.0.1-1_amd64.deb
drwxr-xr-x root/root         0 2022-06-30 12:37 ./
drwxr-xr-x root/root         0 2021-02-01 18:32 ./usr/
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/lib/
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/lib/x86_64-linux-gnu/
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/lib/x86_64-linux-gnu/purple-2/
-rwxr-xr-x root/root    128352 2022-06-30 12:37 ./usr/lib/x86_64-linux-gnu/purple-2/libslack.so
drwxr-xr-x root/root         0 2022-06-25 10:30 ./usr/share/
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/share/doc/
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/share/doc/slack-libpurple/
-rw-r--r-- root/root     17987 2022-06-30 12:37 ./usr/share/doc/slack-libpurple/COPYING
-rw-r--r-- root/root      5724 2022-06-30 12:37 ./usr/share/doc/slack-libpurple/README.md
drwxr-xr-x root/root         0 2022-06-27 23:06 ./usr/share/pixmaps/
drwxr-xr-x root/root         0 2022-06-08 06:32 ./usr/share/pixmaps/pidgin/
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/share/pixmaps/pidgin/protocols/
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/share/pixmaps/pidgin/protocols/16/
-rw-r--r-- root/root       810 2022-06-30 12:37 ./usr/share/pixmaps/pidgin/protocols/16/slack.png
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/share/pixmaps/pidgin/protocols/22/
-rw-r--r-- root/root      1223 2022-06-30 12:37 ./usr/share/pixmaps/pidgin/protocols/22/slack.png
drwxr-xr-x root/root         0 2022-06-30 12:37 ./usr/share/pixmaps/pidgin/protocols/48/
-rw-r--r-- root/root      3275 2022-06-30 12:37 ./usr/share/pixmaps/pidgin/protocols/48/slack.png

Is it possible to replicate this with fpm in order to create packages that can be installed, and equally as important - cleanly uninstalled?

jordansissel commented 2 years ago

checkinstall seems to work by tracking files created during a subcommand (such as make install).

fpm doesn't have this feature, though it's possible it could be added in the future. Maybe this doc will help show how fpm is used for projects which have make install steps - https://fpm.readthedocs.io/en/v1.13.1/use-cases/make-install.html

As for "cleanly uninstalled" I'm not sure exactly what you mean, can you tell me more? The packages fpm creates are installed and removed by the normal system packaging tools (like apt-get and dpkg, or dnf/yum/rpm), and these tools are responsible for the cleanup during package removal. A package created with fpm will install and remove (like with rpm -e) all files in the package.