#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"). You may
# only use this file in accordance with the terms of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2013, EveryCity Ltd. All rights reserved.
# Copyright 2022 Friedrich Kink. All rights reserved.
#

# prevents "64bit file in 32bit path" errors
<transform file path=usr/php/8.1/extensions/.*\.so -> \
    add pkg.linted.userland.action001.2 true>

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)/extension/php-pgsql@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.summary value="PHP Server 8.1 (postgresql extension)"
set name=info.upstream-url value="$(COMPONENT_PROJECT_URL)"
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
set name=info.classification value="org.opensolaris.category.2008:Development/PHP"

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

depend type=require fmri=pkg:/$(COMPONENT_FMRI)/php-common

file files/pgsql.ini path=etc/php/8.1/conf.d/pgsql.ini preserve=true mode=0644
file files/pdo_pgsql.ini path=etc/php/8.1/conf.d/pdo_pgsql.ini preserve=true mode=0644

file path=usr/php/8.1/extensions/pgsql.so
file path=usr/php/8.1/extensions/pdo_pgsql.so