aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2008-09-03 17:06:58 +0800
committerknu <knu@FreeBSD.org>2008-09-03 17:06:58 +0800
commit6dc611a3b8ad2385d9efca956af8a3bb7d25852d (patch)
tree0cd9ceb0fae80e6633536aefd1f328a65b3bacdb
parent317ac8c010944f669a2f4fe0a537c4b4115fbb91 (diff)
downloadfreebsd-ports-gnome-6dc611a3b8ad2385d9efca956af8a3bb7d25852d.tar.gz
freebsd-ports-gnome-6dc611a3b8ad2385d9efca956af8a3bb7d25852d.tar.zst
freebsd-ports-gnome-6dc611a3b8ad2385d9efca956af8a3bb7d25852d.zip
Fix permissions of example files so that make test works after
installation. COPYTREE_* macros install files with cpio -dumpl (l -- hardlink) and then do chmod & chown against the newly installed files, so when WRKSRC and PREFIX are under the same filesystem, permissions of the original files under the working directory are also affected. That was how installing files with wrong permissions caused make test under the working directory to fail.
-rw-r--r--databases/mysql-q4m/Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/databases/mysql-q4m/Makefile b/databases/mysql-q4m/Makefile
index 87b8864be653..e107e30c39db 100644
--- a/databases/mysql-q4m/Makefile
+++ b/databases/mysql-q4m/Makefile
@@ -7,6 +7,7 @@
PORTNAME= q4m
PORTVERSION= 0.8.3
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://q4m.31tools.com/dist/
PKGNAMEPREFIX= mysql${MYSQL_VER}-
@@ -28,23 +29,33 @@ CONFIGURE_ARGS= --prefix="${PREFIX}" \
--libdir="${PREFIX}/lib/mysql/plugin" \
--with-mysql="$$(cd ${PORTSDIR}/databases/mysql${MYSQL_VER}-server; ${MAKE} -V WRKSRC)"
+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} {} \;' --
+
+post-extract:
+ ${CP} -p ${WRKSRC}/support-files/install.sql ${WRKSRC}/examples/
+
.if !defined(NOPORTDOCS)
PORTDOCS= AUTHORS ChangeLog README doc
-PORTEXAMPLES= examples support-files
+PORTEXAMPLES= crawler install.sql
post-install:
${MKDIR} ${DOCSDIR}
.for f in ${PORTDOCS}
- cd ${INSTALL_WRKSRC}; ${COPYTREE_SHARE} ${f} ${DOCSDIR}
+ cd ${WRKSRC}; ${COPYTREE_SHARE} ${f} ${DOCSDIR}
.endfor
${MKDIR} ${EXAMPLESDIR}
.for f in ${PORTEXAMPLES}
- cd ${INSTALL_WRKSRC}; ${COPYTREE_SHARE} ${f} ${EXAMPLESDIR}
+ cd ${WRKSRC}/examples; ${COPYTREE_AUTO} ${f} ${EXAMPLESDIR}
.endfor
- ${RM} ${EXAMPLESDIR}/support-files/q4m-forward
.endif
test:
- cd ${BUILD_WRKSRC}; ${PERL} run_tests.pl
+ cd ${WRKSRC}; ${PERL} run_tests.pl
.include <bsd.port.mk>