Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/trigger.mk
# Feature: trigger | # Feature: trigger | ||||
# Usage: USES=trigger | # Usage: USES=trigger | ||||
# Valid ARGS: none | # Valid ARGS: none | ||||
# | # | ||||
# Variables: | # Variables: | ||||
# TRIGGERS: list of triggers to package | # TRIGGERS: list of triggers to package | ||||
# | # | ||||
# MAINTAINER= ports@FreeBSD.org | # MAINTAINER= ports@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_TRIGGER_MK) | .if !defined(_INCLUDE_USES_TRIGGER_MK) | ||||
_INCLUDE_USES_TRIGGER_MK= yes | _INCLUDE_USES_TRIGGER_MK= yes | ||||
.if !empty(trigger_ARGS) | . if !empty(trigger_ARGS) | ||||
IGNORE= Incorrect 'USES+= trigger:${trigger_ARGS}' trigger takes no arguments | IGNORE= Incorrect 'USES+= trigger:${trigger_ARGS}' trigger takes no arguments | ||||
.endif | . endif | ||||
TRIGGERS?= ${PORTNAME} | TRIGGERS?= ${PORTNAME} | ||||
.for t in ${TRIGGERS} | . for t in ${TRIGGERS} | ||||
SUB_FILES+= ${t}.ucl | SUB_FILES+= ${t}.ucl | ||||
PLIST_FILES+= ${LOCALBASE}/share/pkg/triggers/$t.ucl | PLIST_FILES+= ${LOCALBASE}/share/pkg/triggers/$t.ucl | ||||
.endfor | . endfor | ||||
_USES_install+= 601:trigger-post-install | _USES_install+= 601:trigger-post-install | ||||
trigger-post-install: | trigger-post-install: | ||||
${MKDIR} ${STAGEDIR}${LOCALBASE}/share/pkg/triggers | ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/pkg/triggers | ||||
.for t in ${TRIGGERS} | . for t in ${TRIGGERS} | ||||
${INSTALL_DATA} ${WRKDIR}/$t.ucl ${STAGEDIR}${LOCALBASE}/share/pkg/triggers/ | ${INSTALL_DATA} ${WRKDIR}/$t.ucl ${STAGEDIR}${LOCALBASE}/share/pkg/triggers/ | ||||
.endfor | . endfor | ||||
.endif | .endif |