2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2023 Marcel Telka
17 # see doc/src/install.rst
20 # Do not depend on host default pg_config
21 PATH := $(PG_BINDIR):$(PATH)
24 LD_OPTIONS += -R$(PG_LIBDIR)
29 # To test we need to fulfill following prerequisites:
30 # 1) the default system postgres version must match the version we built
32 # 2) the postgresql service must be running,
33 # 3) the psycopg2_test database with plpgsql extension must exist.
35 # To check 1) and 2) you can run following commands:
36 # gmake print-value-PG_VERSION
37 # pkg mediator postgres
39 # To create the psycopg2_test database you could run:
41 # createdb psycopg2_test
42 # psql -c 'CREATE EXTENSION plpgsql;' psycopg2_test
44 # Testing will use the default 'postgres' user.
46 COMPONENT_TEST_ENV += PSYCOPG2_TESTDB_USER=postgres
48 # Custom test style - see doc/src/install.rst
49 COMPONENT_TEST_CMD = $(PYTHON) -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
50 COMPONENT_TEST_ARGS = --verbose
51 COMPONENT_TEST_TARGETS =
53 # Manually added build and testing dependencies
54 REQUIRED_PACKAGES += $(PG_DEVELOPER_PKG)
55 TEST_REQUIRED_PACKAGES += $(PG_SERVICE_PKG)
58 cat "$SOURCE_DIR/LICENSE"
59 printf '\n--- doc/COPYING.LESSER ----------------------------------------------------\n\n'
60 cat "$SOURCE_DIR/doc/COPYING.LESSER"
61 ) > "$DISTRIBUTION.license"