ports/167825: ports: Mk/bsd.pbi.mk inclusion
Kris Moore
kmoore at FreeBSD.org
Sat May 12 15:30:10 UTC 2012
>Number: 167825
>Category: ports
>Synopsis: ports: Mk/bsd.pbi.mk inclusion
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat May 12 15:30:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Kris Moore
>Release: 9.0-Release
>Organization:
iXsystems
>Environment:
>Description:
The included patch adds a "make pbi" and "make clean-pbi" target to the ports build system. Requesting portmgr to review and commit if OK.
>How-To-Repeat:
>Fix:
Add bsd.pbi.mk to /usr/ports/Mk and add the following to bsd.port.mk:
.include "${PORTSDIR}/Mk/bsd.pbi.mk"
Patch attached with submission follows:
# $Id$
#
# Creates a PBI file from a port with just 'make pbi'
#
#
_PBIMAKEPORT= pbi_makeport
_PBICREATE= pbi_create
_PBIDIR= pbi
_PBICONF= ${_PBIDIR}/pbi.conf
_PBIBUILDDIR= /usr/local/pbi/${PORTNAME}-${ARCH}
PBIPWD= `pwd`
_PBIPORT= `pwd | cut -d '/' -f4-`
.PHONY: check-pbimanager pbi pbi-makeport pbi-generate pbi-create \
clean-pbi clean-pbibuild
_PBIMANAGER_PKG!=which pbi_info || ${TRUE}
check-pbimanager:
.if empty(_PBIMANAGER_PKG)
@(cd ${PORTSDIR}/ports-mgmt/pbi-manager && ${MAKE} install clean)
.endif
pbi: pbi-generate
pbi-generate: check-pbimanager
@if [ ! -d ${PWD}/pbi ]; then \
${ECHO_MSG} "===> Generating meta-data for ${PORTNAME}"; \
${MKDIR} ${_PBIDIR}; \
${MKDIR} ${_PBIDIR}/resources ${_PBIDIR}/scripts \
${_PBIDIR}/xdg-desktop ${_PBIDIR}/xdg-menu \
${_PBIDIR}/xgd-mime; \
${ECHO_CMD} "PBI_PROGNAME=\"${PORTNAME}\"" > ${_PBICONF};\
${ECHO_CMD} "PBI_MAKEPORT=\"${_PBIPORT}\"" >> ${_PBICONF};\
PROGWEB=`cat ${DESCR} | awk '/^WWW:/ { print $$2; }'`; \
${ECHO_CMD} "PBI_PROGWEB=\"$${PROGWEB}\"" >> ${_PBICONF};\
${ECHO_CMD} "PBI_PROGAUTHOR=\"The ${PORTNAME} team\"" \
>> ${_PBICONF}; \
${ECHO_CMD} "PBI_UPDATEURL=\"http://update.pbidir.com\""\
>> ${_PBICONF}; \
${ECHO_CMD} "export PBI_PROGNAME PBI_MAKEPORT " \
"PBI_PROGWEB " \
"PBI_PROGAUTHOR PBI_UPDATEURL " \
"PBI_MKPORTBEFORE PBI_MKPORTAFTER PBI_MAKEOPTS" \
>> ${_PBICONF}; \
fi
@${ECHO_MSG} "==> Generating PBI file"
@${_PBIMAKEPORT} -c ${PBIPWD}/pbi -o ${PBIPWD} ${_PBIPORT}
clean-pbi:
@${ECHO_MSG} "===> Cleaning PBI for ${PORTNAME}"
@${RM} -rf ${_PBIDIR}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list