--- bsd.linux-rpm.mk.orig 2008-05-24 20:46:04.931665759 +0200 +++ bsd.linux-rpm.mk 2008-05-24 21:32:51.721449935 +0200 @@ -105,6 +105,20 @@ BRANDELF_DIRS?= BRANDELF_FILES?= +# For ports that define PORTDOCS, be sure not to install +# documentation if NOPORTDOCS is defined +.if defined(PORTDOCS) && defined(NOPORTDOCS) +pre-patch: linux-rpm-clean-portdocs + +. if !target(linux-rpm-clean-portdocs) +linux-rpm-clean-portdocs: +.for x in ${PORTDOCS} + @${RM} -f ${WRKDIR}/${DOCSDIR_REL}/${x} +.endfor + @${RMDIR} ${WRKDIR}/${DOCSDIR_REL} +. endif +.endif + . if defined(AUTOMATIC_PLIST) . if ${USE_LINUX} == "fc4" || ${USE_LINUX:L} == "yes"