Date: Thu, 14 Mar 2013 10:11:19 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r314142 - in head: Keywords Mk Message-ID: <201303141011.r2EABJYs018857@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Thu Mar 14 10:11:19 2013 New Revision: 314142 URL: http://svnweb.freebsd.org/changeset/ports/314142 Log: Fix info files with pkgng. This bring the first Keyword into the ports tree. Keywords are pkgng custom plist keyword definition. info.yaml defines a new @info keyword usable only with pkgng which will: - add the info agument to the file list - set a post-installation execution script - set a post-deinstallation execution script in keyword definition the script uses the same format (%f, %F, %D, ...) as @exec/@unexec does it just add a new one: %@ which correspond the the keyword argument line. Exp-run: miwi Added: head/Keywords/ head/Keywords/info.yaml (contents, props changed) Modified: head/Mk/bsd.port.mk Added: head/Keywords/info.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Keywords/info.yaml Thu Mar 14 10:11:19 2013 (r314142) @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# MAINTAINER: portmgr@FreeBSD.org + +actions: [file] +post-install: | + file=%D/%@ + install-info --quiet %D/%@ ${file%/*}/dir +post-deinstall: | + file=%D/%@ + install-info --quiet --delete %D/%@ ${file%/*}/dir + if [ $(info -d ${file%/*} --output - 2>/dev/null | grep -c '^*') -eq 1 ]; then + rm -f ${file%/*}/dir + fi Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Thu Mar 14 08:17:39 2013 (r314141) +++ head/Mk/bsd.port.mk Thu Mar 14 10:11:19 2013 (r314142) @@ -5813,11 +5813,15 @@ add-plist-info: .if defined(INFO) .for i in ${INFO} install-info --quiet ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir +.if !defined(WITH_PKGNG) @${ECHO_CMD} "@unexec install-info --quiet --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \ >> ${TMPPLIST} @${LS} ${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST} @${ECHO_CMD} "@exec install-info --quiet %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \ >> ${TMPPLIST} +.else + @${LS} ${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${PREFIX}/:@info\ :g >> ${TMPPLIST} +.endif .endfor .if defined(INFO_SUBDIR) @${ECHO_CMD} "@unexec ${RMDIR} %D/${INFO_PATH}/${INFO_SUBDIR} 2> /dev/null || true" >> ${TMPPLIST}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303141011.r2EABJYs018857>