Date: Wed, 5 Sep 2012 04:32:25 +0000 (UTC) From: Mark Linimon <linimon@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r303683 - head/Mk Message-ID: <201209050432.q854WPPV073939@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: linimon Date: Wed Sep 5 04:32:25 2012 New Revision: 303683 URL: http://svn.freebsd.org/changeset/ports/303683 Log: Add a "make pbi" and "make clean-pbi" target to the ports build system. PR: ports/167825 Submitted by: kmoore Added: head/Mk/bsd.pbi.mk (contents, props changed) Modified: head/Mk/bsd.port.mk Added: head/Mk/bsd.pbi.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/bsd.pbi.mk Wed Sep 5 04:32:25 2012 (r303683) @@ -0,0 +1,51 @@ +# $FreeBSD$ +# +# Creates a PBI file from a port with just 'make pbi' +# +PBI_MAINTAINER= kmoore@FreeBSD.org + +_PBIMAKEPORT= pbi_makeport +_PBICREATE= pbi_create +_PBIDIR= pbi +_PBICONF= ${_PBIDIR}/pbi.conf + +.PHONY: check-pbimanager pbi pbi-makeport pbi-generate pbi-create \ + clean-pbi clean-pbibuild + +check-pbimanager: + + @set -- chk=""; \ + if [ -z "`which pbi_info`" ] ; then \ + cd ${PORTSDIR}/ports-mgmt/pbi-manager && make install clean; \ + fi + +pbi: pbi-generate + +pbi-generate: check-pbimanager + @_PBIPORT=`pwd | cut -d "/" -f4-`; \ + 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 ${PWD}/pbi -o ${PWD} $${_PBIPORT} + +clean-pbi: + @${ECHO_MSG} "===> Cleaning PBI for ${PORTNAME}" + @${RM} -rf ${_PBIDIR} Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Wed Sep 5 02:30:38 2012 (r303682) +++ head/Mk/bsd.port.mk Wed Sep 5 04:32:25 2012 (r303683) @@ -1496,6 +1496,8 @@ PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/ .include "${PORTSDIR}/Mk/bsd.ncurses.mk" .endif +.include "${PORTSDIR}/Mk/bsd.pbi.mk" + # You can force skipping these test by defining IGNORE_PATH_CHECKS .if !defined(IGNORE_PATH_CHECKS) .if (${PREFIX:C,(^.).*,\1,} != "/")
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209050432.q854WPPV073939>