When updating my mail/py-spambayes I noticed it fails to install: ... install -o root -g wheel -m 444 /usr/ports/mail/py-spambayes/work/spambayes-1.0rc1/WHAT_IS_NEW.txt /usr/local/share/doc/spambayes install -o root -g wheel -m 444 /usr/ports/mail/py-spambayes/work/spambayes-1.0rc1/contrib/ /usr/local/share/doc/spambayes install: /usr/ports/mail/py-spambayes/work/spambayes-1.0rc1/contrib/: Inappropriate file type or format *** Error code 71 Fix: The for loop in the Makefile causes ${INSTALL_DATA} to attempt to install a directory as if it were a file. From what I gather from bsd.port.mk, it seems that the interpretation of shell expansions and directories (adding subdirs if any) in ${PORTDOCS} works for +CONTENTS generation only. Perhaps someone can confirm this? Here's one possible workaround which still retains some advantage of defining ${PORTDOCS} in the sense that you can loop over it. workstation# diff -u Makefile.orig Makefile PORTNAME= spambayes PORTVERSION= 1.0.rc.1 +PORTREVISION= 1 CATEGORIES= mail python MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -34,12 +35,12 @@ post-install: .ifndef(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} + @${MKDIR} ${DOCSDIR} ${DOCSDIR}/contrib .for file in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} + if [ -d ${WRKSRC}/${file} ]; then \ + ${INSTALL_DATA} ${WRKSRC}/${file}/* ${DOCSDIR}/contrib; else \ + ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}; fi .endfor - @${MKDIR} ${DOCSDIR}/contrib - @${INSTALL_DATA} ${WRKSRC}/contrib/* ${DOCSDIR}/contrib .endif .include <bsd.port.mk>--BAtJTZIdoIMHWLl6tWBAJehx7qQ8vwuJuUcGE03km3mlZnrJ Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- Makefile.orig Mon Jun 21 22:41:36 2004 +++ Makefile Mon Jun 21 23:35:30 2004 @@ -7,6 +7,7 @@ How-To-Repeat: cd /usr/ports/mail/py-spambayes [make deinstall] make install
Responsible Changed From-To: freebsd-ports-bugs->lioux Over to maintainer.
State Changed From-To: open->closed Somewhat simpler fix committed, thanks! Forgot this in the previous update