From owner-svn-ports-head@FreeBSD.ORG Thu Mar 14 10:11:20 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 63BAF73; Thu, 14 Mar 2013 10:11:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 33D43FE0; Thu, 14 Mar 2013 10:11:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EABKbb018859; Thu, 14 Mar 2013 10:11:20 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EABJYs018857; Thu, 14 Mar 2013 10:11:19 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201303141011.r2EABJYs018857@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 14 Mar 2013 10:11:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r314142 - in head: Keywords Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2013 10:11:20 -0000 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}