What is the minimal-effort way to package a PostgreSQL extension into a
.deb file for Ubuntu (as of 18.04)?
I did some search but find many different suggestions (some outdated).
Suppose I want to package a simple postgres extension such as the first and last aggregate functions.
This StackOverflow answer suggests that one should fist make a directory structure manually as follows:
dpkg -b /path/to/the/ProgramName-Version after setting the right file permissions.
But I think PostgreSQL has its own build infrastructure for extensions called PGXS (as of PostgreSQL 12.x). I found PGXS quite easy to use, because I don't have to worry the folder structure myself and
make install will copy files to the right system directories regardless of the PostgreSQL version.
Is there a way to combine the manual approach above and the PGXS approach to automatically create a PostgreSQL extension as a