Writing a port that simply installs a bunch of files

Mathieu Arnold mat at FreeBSD.org
Mon Mar 6 17:23:39 UTC 2017


Le 06/03/2017 à 17:53, Michael Gmelin a écrit :
> On Mon, 6 Mar 2017 17:45:42 +0100
> Andrea Venturoli <ml at netfence.it> wrote:
>
>> On 03/06/17 17:05, Michael Gmelin wrote:
>>
>>>> What about something like this (your files are in files/input.tgz)?
>>>> ...  
>>> NO_WRKSUBDIR=	yes
>>> NO_BUILD=	yes
>>> NO_INSTALL=	yes
>>>
>>> post-install:
>>> 	@${TAR} -xf ${FILESDIR}/input.tgz -C ${STAGEDIR}
>>> 	@${FIND} ${STAGEDIR} -type f | \
>>> 		${SED} "s|^${STAGEDIR}||" >> ${TMPPLIST}
>>>
>>> .include <bsd.port.mk>  
>> Guess this is what I was looking for (just the ${TAR} part)...
>> basically overriding the "extract" phase.
>> I modified ${STAGEDIR} to ${STAGEDIR}/${PREFIX}.
>>
>> Just why post-install and not do-install?
>>
> do-install will work as well, assuming you remove 'NO_INSTALL=1' from
> the Makefile.

Adding do-install to the Makefile will work regadless of NO_INSTALL status.
What NO_INSTALL does (like NO_BUILD does for the build phase) is to not
generate a do-install target, but adding one in the Makefile will work
just fine. (Of course, if you add a do-install target to the Makefile,
NO_INSTALL becomes useless.)

-- 
Mathieu Arnold


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170306/533fd31a/attachment.sig>


More information about the freebsd-ports mailing list