#
# 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 2024 Friedrich Kink
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_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)'

# 64-bit object in 32-bit path
<transform file path=usr/clang/$(CLANGVER)/lib/.*\.so -> \
    default pkg.linted.userland.action001.2 true >

# Clang 18 used to live in usr/clang/18.1 so provide compatibility symlink for
# already built binaries.
link path=usr/clang/18.1 target=18

link path=usr/clang/$(CLANGVER)/lib/libLLVM-18.so \
    target=libLLVM.so.$(CLANGVER).1
link path=usr/clang/$(CLANGVER)/lib/libLLVM.so target=libLLVM.so.$(CLANGVER).1
file path=usr/clang/$(CLANGVER)/lib/libLLVM.so.$(CLANGVER).1
link path=usr/clang/$(CLANGVER)/lib/libLTO.so target=libLTO.so.$(CLANGVER).1
file path=usr/clang/$(CLANGVER)/lib/libLTO.so.$(CLANGVER).1
link path=usr/clang/$(CLANGVER)/lib/libRemarks.so \
    target=libRemarks.so.$(CLANGVER).1
file path=usr/clang/$(CLANGVER)/lib/libRemarks.so.$(CLANGVER).1
link path=usr/clang/$(CLANGVER)/lib/libclang-cpp.so \
    target=libclang-cpp.so.$(CLANGVER).1
file path=usr/clang/$(CLANGVER)/lib/libclang-cpp.so.$(CLANGVER).1
link path=usr/clang/$(CLANGVER)/lib/libclang.so target=libclang.so.$(CLANGVER).1
link path=usr/clang/$(CLANGVER)/lib/libclang.so.$(CLANGVER).1 \
    target=libclang.so.$(HUMAN_VERSION)
file path=usr/clang/$(CLANGVER)/lib/libclang.so.$(HUMAN_VERSION)
file path=usr/clang/$(CLANGVER)/lib/libscanbuild/resources/scanview.css
file path=usr/clang/$(CLANGVER)/lib/libscanbuild/resources/selectable.js
file path=usr/clang/$(CLANGVER)/lib/libscanbuild/resources/sorttable.js