svn commit: r401813 - head/devel/cvsbook
Dmitry Marakasov
amdmi3 at FreeBSD.org
Tue Nov 17 13:51:41 UTC 2015
Author: amdmi3
Date: Tue Nov 17 13:51:39 2015
New Revision: 401813
URL: https://svnweb.freebsd.org/changeset/ports/401813
Log:
- Add LICENSE
- Add NO_ARCH
- Pet portlint
- Switch to options helpers
- Fix SPLIT_HTML option
PR: 203632 + my additions
Submitted by: takefu at airport.fm
Modified:
head/devel/cvsbook/Makefile
Modified: head/devel/cvsbook/Makefile
==============================================================================
--- head/devel/cvsbook/Makefile Tue Nov 17 11:57:57 2015 (r401812)
+++ head/devel/cvsbook/Makefile Tue Nov 17 13:51:39 2015 (r401813)
@@ -11,74 +11,57 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-all
MAINTAINER= ports at FreeBSD.org
COMMENT= Tutorial and reference for CVS
+LICENSE= GPLv2 # or later
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+NO_ARCH= yes
+
OPTIONS_MULTI= CVSBOOK
OPTIONS_MULTI_CVSBOOK= INFO SINGLE_HTML SPLIT_HTML POSTSCRIPT PDF
+OPTIONS_DEFAULT= INFO SINGLE_HTML POSTSCRIPT PDF
+OPTIONS_SUB= yes
+
INFO_DESC= Install the info version
SINGLE_HTML_DESC= Install the single HTML version
SPLIT_HTML_DESC= Install the split HTML version
POSTSCRIPT_DESC= Install the Postscript version
PDF_DESC= Install the PDF version
-OPTIONS_DEFAULT= INFO SINGLE_HTML POSTSCRIPT PDF
-
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-.include <bsd.port.options.mk>
+SPLIT_HTML_ALL_TARGET= html-distributed
+SPLIT_HTML_VARS_OFF= NO_BUILD=yes
+INFO_INFO= cvsbook
+INFO_VARS= INFODIR=${PREFIX}/${INFO_PATH}
-.if ${PORT_OPTIONS:MSPLIT_HTML}
-ALL_TARGET= html-distributed
-.else
-NO_BUILD= yes
-.endif
-
-.if ${PORT_OPTIONS:MINFO}
-INFO= cvsbook
-INFODIR= ${PREFIX}/${INFO_PATH}
-.endif
-
-.if ${PORT_OPTIONS:MSINGLE_HTML}
-PLIST_FILES+= %%DOCSDIR%%/cvsbook.html
-.endif
-
-.if ${PORT_OPTIONS:MPOSTSCRIPT}
-PLIST_FILES+= %%DOCSDIR%%/cvsbook.ps
-.endif
-
-.if ${PORT_OPTIONS:MPDF}
-PLIST_FILES+= %%DOCSDIR%%/cvsbook.pdf
-.endif
-
-.if ${PORT_OPTIONS:MSPLIT_HTML}
-post-patch:
+post-patch-SPLIT_HTML-on:
@${REINPLACE_CMD} -e \
'/Non-monolithic HTML not supported/s|@.*|makeinfo --html main.texi|' \
${WRKSRC}/Makefile
-.endif
-
-.if ${PORT_OPTIONS:MSPLIT_HTML}
-pre-install:
-PLIST_FILES+= `cd ${WRKSRC}/cvsbook && ${FIND} . -type f| ${CUT} -c2- \
- | ${SED} 's|^|${DOCSDIR:S,${PREFIX}/,,}/cvsbook-shtml|' \
- | ${SORT}`
-.endif
do-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
-.if ${PORT_OPTIONS:MSPLIT_HTML}
- @${MKDIR} ${DOCSDIR}/cvsbook-shtml
- @cd ${WRKSRC}/cvsbook && ${INSTALL_DATA} -- *.html ${STAGEDIR}${DOCSDIR}/cvsbook-shtml
-.endif
-.if ${PORT_OPTIONS:MSINGLE_HTML}
- @${INSTALL_DATA} ${WRKSRC}/cvsbook.html ${STAGEDIR}${DOCSDIR}
-.endif
-.if ${PORT_OPTIONS:MPDF}
- @${INSTALL_DATA} ${WRKSRC}/cvsbook.pdf ${STAGEDIR}${DOCSDIR}
-.endif
-.if ${PORT_OPTIONS:MPOSTSCRIPT}
- @${INSTALL_DATA} ${WRKSRC}/cvsbook.ps ${STAGEDIR}${DOCSDIR}
-.endif
-.if ${PORT_OPTIONS:MINFO}
+
+do-install-SPLIT_HTML-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}/cvsbook-shtml
+ ${INSTALL_DATA} ${WRKSRC}/cvsbook/*.html ${STAGEDIR}${DOCSDIR}/cvsbook-shtml
+
+do-install-SINGLE_HTML-on:
+ ${INSTALL_DATA} ${WRKSRC}/cvsbook.html ${STAGEDIR}${DOCSDIR}
+
+do-install-PDF-on:
+ ${INSTALL_DATA} ${WRKSRC}/cvsbook.pdf ${STAGEDIR}${DOCSDIR}
+
+do-install-POSTSCRIPT-on:
+ ${INSTALL_DATA} ${WRKSRC}/cvsbook.ps ${STAGEDIR}${DOCSDIR}
+
+do-install-INFO-on:
@${MKDIR} ${STAGEDIR}${INFODIR}
- @${INSTALL_DATA} ${WRKSRC}/cvsbook.info* ${STAGEDIR}${INFODIR}
-.endif
+ ${INSTALL_DATA} ${WRKSRC}/cvsbook.info* ${STAGEDIR}${INFODIR}
+
+post-install:
+ @${RMDIR} ${STAGEDIR}${DOCSDIR} >/dev/null 2>&1 || ${TRUE} # remove if empty
+ @if [ -d ${STAGEDIR}${DOCSDIR} ]; then \
+ ${FIND} ${STAGEDIR}${DOCSDIR} -type f | \
+ ${SED} 's|^${STAGEDIR}${PREFIX}/||' > ${TMPPLIST}; \
+ fi
.include <bsd.port.mk>
More information about the svn-ports-all
mailing list