help w/ port just installing files...
John-Mark Gurney
jmg at funkthat.com
Wed Nov 19 00:07:14 UTC 2014
John-Mark Gurney wrote this message on Tue, Nov 18, 2014 at 12:42 -0800:
> John-Mark Gurney wrote this message on Tue, Nov 18, 2014 at 12:35 -0800:
> > John-Mark Gurney wrote this message on Mon, Nov 17, 2014 at 19:31 -0800:
> > > So, I'm trying to get a port that will install the NIST's KAT vectors
> > > so I can write a test program using them...
> >
> > Ok, so here is a port I'm submitting for reivew so that I can commit it.
>
> Oops, forgot to run portlist -A on it before submitting... I've fixed
> the direct use of chmod, mkdir and cp... I moved the MASTER_SITES and
> DISTFILES to the earlier section...
>
> Now portlint only says:
> WARN: Makefile: [25]: possible use of "${CHMOD}" found. Use @owner/@group operators in pkg-plist instead.
> FATAL: Makefile: extra item "BASE_URL" placed in the PORTNAME section.
> WARN: Makefile: Consider defining LICENSE.
>
> I can't do much about the CHMOD warning as that is necessary unless we
> want world writable files installed by the package...
>
> I could move BASE_URL to after the COMMENT, and it would work (because
> make), but I find that less that readable...
>
> Attached is the new Makefile...
Sorry for the constant emails, learning new things as I go...
> # We want each dist file in it's own subdir
> EXTRACT_CMD= ${MKDIR} ${PORTNAME}/$${file%.zip} && ${TAR}
> EXTRACT_AFTER_ARGS=-C ${PORTNAME}/$${file%.zip} && \
> ${CHMOD} -R a-w ${PORTNAME}/$${file%.zip}
With the below change, this simply drops the CHMOD to be:
EXTRACT_AFTER_ARGS=-C ${PORTNAME}/$${file%.zip}
[...]
> do-install:
> ${MKDIR} ${STAGEDIR}${LOCALBASE}/share && \
> ${CP} -Rp ${WRKSRC}/${PORTNAME} ${STAGEDIR}${LOCALBASE}/share
Is now:
do-install:
${MKDIR} ${STAGEDIR}${LOCALBASE}/share && \
(cd ${WRKSRC}/${PORTNAME} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
so that proper ownership and modes are automaticly applied...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-ports
mailing list