On 8/11/19 1:52 AM, Ingo Feinerer wrote:
Hi,

to all experienced porters: is there a best practice for installing a whole
tree of files in do-install?

I have encountered following patterns:

cp -Rp
tar -czf - -C ... | tar xzf - -C ...
pax -rw
INSTALL_DATA in a for loop (works only if you list all subdirectories (with 
their subdirs etc.))

FreeBSD has the COPYTREE* macros for this purpose
(https://www.freebsd.org/doc/en/books/porters-handbook/book.html#install-copytree).

If there is such a recommended procedure would it make sense to provide
a similar macro in bsd.port.mk?

Best regards,
Ingo


There is this, found for example in games/polymorphable:
${INSTALL_DATA_DIR} ${PREFIX}/share/flare/mods/polymorphable
        cd ${WRKSRC} && find * -type d -exec ${INSTALL_DATA_DIR} \
                "${PREFIX}/share/flare/mods/polymorphable/{}" \;
        cd ${WRKSRC} && find * -type f -exec ${INSTALL_DATA} \
                "{}" "${PREFIX}/share/flare/mods/polymorphable/{}" \;

~Brian

Reply via email to