A simple test case for this bug report. Not actually a bug, though; see the fix below.
Actual output:
$ make install
gmkdir -p '/data/pgsql/share/extension'
gmkdir -p '/data/pgsql/share/extension'
ginstall -c -m 644 .//click.control '/data/pgsql/share/extension/'
ginstall -c -m 644 .//sql/click--1.0.0.sql '/data/pgsql/share/extension/'
Expected output:
$ make install
gmkdir -p '/data/pgsql/share/extension/click'
gmkdir -p '/data/pgsql/share/extension/click'
ginstall -c -m 644 .//click.control '/data/pgsql/share/extension/'
ginstall -c -m 644 .//sql/click--1.0.0.sql '/data/pgsql/share/extension/click'
Note that the click
subdirectory is neither created nor used to install the
DATA
file in th actual output, despite this line in the control
file:
directory = 'extension/click'
From the docs:
directory
(string
)The directory containing the extension's SQL script file(s). Unless an absolute path is given, the name is relative to the installation's
SHAREDIR
directory. The default behavior is equivalent to specifyingdirectory = 'extension'
.
Turns out this it requires that MODULEDIR
also be set in the Makefile
:
MODULEDIR = extension/click
With that in place, it works as expected:
$ make install
gmkdir -p '/data/pgsql/share/extension'
gmkdir -p '/data/pgsql/share/extension/click'
ginstall -c -m 644 .//click.control '/data/pgsql/share/extension/'
ginstall -c -m 644 .//sql/click--1.0.0.sql '/data/pgsql/share/extension/click/'