Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Nov 2013 17:51:34 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r332524 - head/textproc/xmlformat
Message-ID:  <201311021751.rA2HpYbu078984@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Sat Nov  2 17:51:34 2013
New Revision: 332524
URL: http://svnweb.freebsd.org/changeset/ports/332524

Log:
  - Add LICENSE.
  - Use shebangfix.
  - Use OPTIONS_DEFINE.
  - Add STAGEDIR support.
  - Style clean-ups.

Deleted:
  head/textproc/xmlformat/pkg-plist
Modified:
  head/textproc/xmlformat/Makefile

Modified: head/textproc/xmlformat/Makefile
==============================================================================
--- head/textproc/xmlformat/Makefile	Sat Nov  2 17:34:59 2013	(r332523)
+++ head/textproc/xmlformat/Makefile	Sat Nov  2 17:51:34 2013	(r332524)
@@ -3,39 +3,47 @@
 
 PORTNAME=	xmlformat
 PORTVERSION=	1.04
+PORTREVISION=	1
 CATEGORIES=	textproc
 MASTER_SITES=	http://www.kitebird.com/software/xmlformat/
 
 MAINTAINER=	hrs@FreeBSD.org
 COMMENT=	An XML Document Formatter
 
-NO_BUILD=	yes
-USES=		perl5
+LICENSE=	BSD
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-DOCSRCDIR1=	${WRKSRC}
-DOC_FILES1=	BUGS ChangeLog INSTALL LICENSE README TODO
+NO_BUILD=	yes
+USES=		perl5 shebangfix
 
-DOCSRCDIR2=	${WRKSRC}/docs
-DOCSDIR2=	${DOCSDIR}/docs
-DOC_FILES2=	API catalog.xml \
-		tutorial.html tutorial.pdf tutorial.xml \
-		xmlformat.conf xmlformat.html xmlformat.pdf xmlformat.xml
-
-EXSRCDIR=	${WRKSRC}/docs/examples
-EXDIR=		${DOCSDIR}/docs/examples
-EX_FILES=	doc1.xml doc2.conf1 doc2.conf2 doc2.conf3 \
+SHEBANG_FILES=	${WRKSRC}/xmlformat.pl
+PLIST_FILES=	bin/xmlformat
+PORTDOCS_root=	BUGS ChangeLog INSTALL LICENSE README TODO
+PORTDOCS_docs=	docs/API docs/catalog.xml \
+		docs/tutorial.html docs/tutorial.pdf docs/tutorial.xml \
+		docs/xmlformat.conf docs/xmlformat.html docs/xmlformat.pdf \
+		docs/xmlformat.xml
+PORTDOCS=	${PORTDOCS_root} ${PORTDOCS_docs:S,^docs/,,}
+PORTEXAMPLES=	doc1.xml doc2.conf1 doc2.conf2 doc2.conf3 \
 		doc2.conf4 doc2.xml
 
-NO_STAGE=	yes
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
+.include <bsd.port.options.mk>
+
 do-install:
-	${INSTALL_SCRIPT} ${WRKSRC}/xmlformat.pl ${PREFIX}/bin/xmlformat
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${DOC_FILES1:S,^,${DOCSRCDIR1}/,} ${DOCSDIR}
-	${MKDIR} ${DOCSDIR2}
-	${INSTALL_DATA} ${DOC_FILES2:S,^,${DOCSRCDIR2}/,} ${DOCSDIR2}
-	${MKDIR} ${EXDIR}
-	${INSTALL_DATA} ${EX_FILES:S,^,${EXSRCDIR}/,} ${EXDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/xmlformat.pl \
+	    ${STAGEDIR}${PREFIX}/bin/xmlformat
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC} && \
+	    ${INSTALL_DATA} ${PORTDOCS_root} ${PORTDOCS_docs} \
+	    ${STAGEDIR}${DOCSDIR}
+.endif
+.if ${PORT_OPTIONS:MEXAMPLES}
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	cd ${WRKSRC}/docs/examples && \
+	    ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
 .endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311021751.rA2HpYbu078984>