COPYTREE_AUTO

Akinori MUSHA knu at iDaemons.org
Wed Sep 3 09:07:42 UTC 2008


Hi,

What about adding COPYTREE_AUTO defined as below?

You often need some scripts in an example directory to have executable
bits so that the examples actually work, and it is waste of time to
sort files out into COPYTREE_BIN and COPYTREE_SHARE when they already
have proper bits out of the tarball.

Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.603
diff -u -r1.603 bsd.port.mk
--- Mk/bsd.port.mk	25 Aug 2008 01:29:01 -0000	1.603
+++ Mk/bsd.port.mk	3 Sep 2008 08:42:37 -0000
@@ -2262,6 +2262,13 @@
 					${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \
 					${FIND} $$1/ -type d -exec chmod 755 {} \; && \
 					${FIND} $$1/ -type f -exec chmod ${SHAREMODE} {} \;' --
+COPYTREE_AUTO=	${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
+					2>&1) && \
+					${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \
+					${FIND} $$1 -type d -exec chmod 755 {} \; && \
+					${FIND} $$1 -type f \! -perm +100 -exec chmod ${SHAREMODE} {} \; && \
+					${FIND} $$1 -type f -perm +100 -exec ${CHOWN} ${BINOWN}:${BINGRP} {} \; && \
+					${FIND} $$1 -type f -perm +100 -exec chmod ${BINMODE} {} \;' --
 .else
 COPYTREE_BIN=	${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
 					2>&1) && \
@@ -2271,6 +2278,11 @@
 					2>&1) && \
 					${FIND} $$1/ -type d -exec chmod 755 {} \; && \
 					${FIND} $$1/ -type f -exec chmod ${SHAREMODE} {} \;' --
+COPYTREE_AUTO=	${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
+					2>&1) && \
+					${FIND} $$1 -type d -exec chmod 755 {} \; && \
+					${FIND} $$1 -type f \! -perm +100 -exec chmod ${SHAREMODE} {} \; && \
+					${FIND} $$1 -type f -perm +100 -exec chmod ${BINMODE} {} \;' --
 .endif

 # The user can override the NO_PACKAGE by specifying this from


Regards,

--
Akinori MUSHA / http://akinori.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20080903/334c26b7/attachment.pgp


More information about the freebsd-ports mailing list