Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2013 07:28:33 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: svn commit: r332668 - in head/security: . pkesh
Message-ID:  <20131106072833.GG60770@FreeBSD.org>
In-Reply-To: <5279ED27.8050107@freebsd.org>
References:  <201311040605.rA465DDm028738@svn.freebsd.org> <20131106071044.GF60770@FreeBSD.org> <5279ED27.8050107@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 05, 2013 at 11:17:59PM -0800, Colin Percival wrote:
> On 11/05/13 23:10, Alexey Dokuchaev wrote:
> >> +PLIST_FILES=	bin/pkesh			\
> >> +		%%PORTDOCS%%%%DOCSDIR%%/README
> >> +PLIST_DIRS=	%%DOCSDIR%%
> > 
> > Using PORTDOCS=README would allow you to 1) get tid of eye-tearing %%'s in
> > PLIST_FILES and drop PLIST_DIRS.
> 
> Huh.  I was confused by the [staging] wiki page since it says "Just add
> the right %%PORTDOCS%% as prefix in your pkg-plist...".

Yes, if you prefer to list docs explicitly in pkg-list (real file), you
have to use so-called "plist subs", %%FOOBAR%%.  When using PLIST_FILES
or PORTDOCS (using them often makes, esp. for short plists), you do not
need to do all the dancing with subs, it is done automagically for you.

That said,

  PLIST_FILES=	bin/pkesh
  PORTDOCS=	README

is all it takes.

> >> +do-install:
> >> +	${INSTALL_SCRIPT} ${WRKSRC}/pkesh.sh ${STAGEDIR}${PREFIX}/bin/pkesh
> >> +
> >> +post-install:
> >> +	${MKDIR} ${STAGEDIR}${DOCSDIR}
> >> +	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
> > 
> > You could've simply merged all commands in do-install target.  No need for
> > two of them, really. :-)
> 
> The aforementioned wiki page says "Directory creation should remain in the
> post-install: target" so that's what I did...

It mentions post-install because usually do-install simply calls install
target (via ${INSTALL_TARGET}) provided by the upstream build system.  So,
using post-install is more generic, yes.  However, in cases when you have
to roll your own do-install, there is no any need to split the two.

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131106072833.GG60770>