Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow sources for SMF manifest/method to be overriden (e.g. from $WRK…

…SRC)
  • Loading branch information...
commit 138702e9343f3de80679d6490e98524c2ee2fbf9 1 parent c8f9cc1
@mamash mamash authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 mk/smf.mk
View
17 mk/smf.mk
@@ -29,8 +29,13 @@ SMF_USER= ${SMF_USER.${PKGBASE}}
SMF_GROUP= ${SMF_GROUP.${PKGBASE}}
SMF_HOME= ${SMF_HOME.${PKGBASE}}
+SMF_MANIFEST_SRC_DEFAULT= ${SMFBASE}/${PKGPATH}/${SMF_MANIFEST}
+SMF_METHOD_SRC_DEFAULT= ${SMFBASE}/${PKGPATH}/${SMF_METHOD}
+
# A manifest file is a pre-requisite for anything to happen
-.if exists(${SMFBASE}/${PKGPATH}/${SMF_MANIFEST})
+.if exists(${SMF_MANIFEST_SRC_DEFAULT}) || defined(SMF_MANIFEST_SRC)
+SMF_MANIFEST_SRC?= ${SMF_MANIFEST_SRC_DEFAULT}
+
SMF_TARGETS+= ${DESTDIR}${PREFIX}/${SMF_MANIFEST_FILE}
INSTALLATION_DIRS+= ${PKG_SMF_DIR}/${PKGBASE}
@@ -54,18 +59,20 @@ ${WRKDIR}/.smfinstall: ${PKGSRCDIR}/mk/install/install-smf
INSTALL_TEMPLATES+= ${WRKDIR}/.smfinstall
# Target to install the SMF manifest
-${DESTDIR}${PREFIX}/${SMF_MANIFEST_FILE}: ${SMFBASE}/${PKGPATH}/${SMF_MANIFEST}
- @${SED} ${FILES_SUBST_SED} ${SMFBASE}/${PKGPATH}/${SMF_MANIFEST} > ${WRKDIR}/.smf_${SMF_MANIFEST}
+${DESTDIR}${PREFIX}/${SMF_MANIFEST_FILE}: ${SMF_MANIFEST_SRC}
+ @${SED} ${FILES_SUBST_SED} ${SMF_MANIFEST_SRC} > ${WRKDIR}/.smf_${SMF_MANIFEST}
${INSTALL_DATA} ${WRKDIR}/.smf_${SMF_MANIFEST} ${DESTDIR}${PREFIX}/${SMF_MANIFEST_FILE}
# A method script file is not required
-.if exists(${SMFBASE}/${PKGPATH}/${SMF_METHOD})
+.if exists(${SMF_METHOD_SRC_DEFAULT}) || defined(SMF_METHOD_SRC)
+SMF_METHOD_SRC?= ${SMF_METHOD_SRC_DEFAULT}
+
SMF_TARGETS+= ${DESTDIR}${PREFIX}/${SMF_METHOD_FILE}
GENERATE_PLIST+= ${ECHO} "${SMF_METHOD_FILE}";
# Target to install the SMF method script
${DESTDIR}${PREFIX}/${SMF_METHOD_FILE}:
- ${SED} ${FILES_SUBST_SED} ${SMFBASE}/${PKGPATH}/${SMF_METHOD} > ${WRKDIR}/.smf_${SMF_METHOD}
+ ${SED} ${FILES_SUBST_SED} ${SMF_METHOD_SRC} > ${WRKDIR}/.smf_${SMF_METHOD}
${INSTALL_SCRIPT} ${WRKDIR}/.smf_${SMF_METHOD} ${DESTDIR}${PREFIX}/${SMF_METHOD_FILE}
.endif
Please sign in to comment.
Something went wrong with that request. Please try again.