#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 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 2015 Alexander Pyhalov
# Copyright 2016 Jim Klimov
# Copyright 2019 Michal Nowak
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
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)

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

# The following files should be delivered by the most recent libpng
# version (currently it is libpng 1.6) and commented out for others:

# Generic links to "libpng.so", "libpng.pc", "libpng-config" and
# common headers are only delivered by the latest version:
link path=usr/bin/$(MACH64)/libpng-config target=libpng$(COMPONENT_VERSION_TAG)-config
link path=usr/bin/libpng-config target=libpng$(COMPONENT_VERSION_TAG)-config
link path=usr/lib/$(MACH64)/libpng.so target=libpng$(COMPONENT_VERSION_TAG).so
link path=usr/lib/libpng.so target=libpng$(COMPONENT_VERSION_TAG).so
link path=usr/lib/$(MACH64)/pkgconfig/libpng.pc target=libpng$(COMPONENT_VERSION_TAG).pc
link path=usr/lib/pkgconfig/libpng.pc target=libpng$(COMPONENT_VERSION_TAG).pc
link path=usr/include/png.h target=libpng$(COMPONENT_VERSION_TAG)/png.h
link path=usr/include/pngconf.h target=libpng$(COMPONENT_VERSION_TAG)/pngconf.h
link path=usr/include/pnglibconf.h target=libpng$(COMPONENT_VERSION_TAG)/pnglibconf.h

# Manpage files are also only delivered by the latest version:
file path=usr/share/man/man3/libpng.3
file path=usr/share/man/man3/libpngpf.3
file path=usr/share/man/man5/png.5

# Below are delivered files, individual and unique for this build:
file path=usr/bin/$(MACH64)/libpng$(COMPONENT_VERSION_TAG)-config
file path=usr/bin/libpng$(COMPONENT_VERSION_TAG)-config
file path=usr/include/libpng$(COMPONENT_VERSION_TAG)/png.h
file path=usr/include/libpng$(COMPONENT_VERSION_TAG)/pngconf.h
file path=usr/include/libpng$(COMPONENT_VERSION_TAG)/pnglibconf.h
link path=usr/lib/$(MACH64)/libpng$(COMPONENT_VERSION_TAG).so target=libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_SONAME)
link path=usr/lib/$(MACH64)/libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_TAG) target=libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_SONAME)
file path=usr/lib/$(MACH64)/libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_SONAME)
file path=usr/lib/$(MACH64)/pkgconfig/libpng$(COMPONENT_VERSION_TAG).pc
link path=usr/lib/libpng$(COMPONENT_VERSION_TAG).so target=libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_SONAME)
link path=usr/lib/libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_TAG) target=libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_SONAME)
file path=usr/lib/libpng$(COMPONENT_VERSION_TAG).so.$(COMPONENT_VERSION_SONAME)
file path=usr/lib/pkgconfig/libpng$(COMPONENT_VERSION_TAG).pc