Bug 78971 - [maintainer update] www/pyweblib: docs, examples, OPTIONS added
Summary: [maintainer update] www/pyweblib: docs, examples, OPTIONS added
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-18 00:00 UTC by Boris B.Samorodov
Modified: 2005-03-19 16:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris B.Samorodov 2005-03-18 00:00:09 UTC
	1. There are some docs and examples at the tar-ball, but they
	are not installed.
	2. OPTIONS were never used.

	Both of the above points are corrected by the next patch.

Fix: 

WBR
-- 
bsam--2lyIo1DPvsUc0YoXJDbgVNNu3qIp5wZuAHq0dhrU7unfQlc5
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -ruN pyweblib.old/Makefile pyweblib/Makefile
--- pyweblib.old/Makefile	Fri Mar 18 02:22:36 2005
+++ pyweblib/Makefile	Fri Mar 18 02:23:47 2005
@@ -18,4 +18,55 @@
 USE_PYDISTUTILS=	yes
 WRKSRC=		${WRKDIR}/${DISTNAME:S=-src==}
 
-.include <bsd.port.mk>
+DOCS=		PyWebLib.html \
+		pydoc/pyweblib.forms.html \
+		pydoc/pyweblib.helper.html \
+		pydoc/pyweblib.html \
+		pydoc/pyweblib.httphelper.html \
+		pydoc/pyweblib.session.html \
+		pydoc/pyweblib.sslenv.html
+
+EXAMPLES=	*.py
+
+PLIST_SUB=	PORTVERSION=${PORTVERSION}
+
+OPTIONS=	EXAMPLES "Install examples" off
+.ifdef(NOPORTDOCS)
+OPTIONS+=	HTMLDOCS "Install documentation" off
+.else
+OPTIONS+=	HTMLDOCS "Install documentation" on
+.endif
+
+.include <bsd.port.pre.mk>
+
+.ifdef(WITH_EXAMPLES)
+PLIST_SUB+=	INSTALLEXAMPLES=""
+.else
+PLIST_SUB+=	INSTALLEXAMPLES="@comment "
+.endif
+
+.ifdef(WITH_HTMLDOCS)
+PLIST_SUB+=	INSTALLPORTDOCS=""
+.else
+PLIST_SUB+=	INSTALLPORTDOCS="@comment "
+.endif
+
+post-install: install-examples install-docs
+
+install-examples:
+
+.ifdef(WITH_EXAMPLES)
+	@${MKDIR} ${EXAMPLESDIR} ${EXAMPLESDIR}/cgi-bin
+	@${INSTALL_DATA} ${WRKSRC}/cgi-bin/${EXAMPLES} ${EXAMPLESDIR}/cgi-bin
+.endif
+
+install-docs:
+
+.ifdef(WITH_HTMLDOCS)
+	@${MKDIR} ${DOCSDIR} ${DOCSDIR}/pydoc
+.for file in ${DOCS}
+	@${INSTALL_DATA} ${WRKSRC}/htdocs/${file} ${DOCSDIR}/${file}
+.endfor
+.endif
+
+.include <bsd.port.post.mk>
diff -ruN pyweblib.old/pkg-plist pyweblib/pkg-plist
--- pyweblib.old/pkg-plist	Fri Aug 23 15:30:23 2002
+++ pyweblib/pkg-plist	Fri Mar 18 02:23:52 2005
@@ -17,3 +17,20 @@
 lib/%%PYTHON_VERSION%%/site-packages/pyweblib/sslenv.pyc
 lib/%%PYTHON_VERSION%%/site-packages/pyweblib/sslenv.pyo
 @dirrm lib/%%PYTHON_VERSION%%/site-packages/pyweblib
+@comment -
+@comment --- HTML documentation ---
+%%INSTALLPORTDOCS%%%%DOCSDIR%%/pydoc/pyweblib.forms.html
+%%INSTALLPORTDOCS%%%%DOCSDIR%%/pydoc/pyweblib.helper.html
+%%INSTALLPORTDOCS%%%%DOCSDIR%%/pydoc/pyweblib.html
+%%INSTALLPORTDOCS%%%%DOCSDIR%%/pydoc/pyweblib.httphelper.html
+%%INSTALLPORTDOCS%%%%DOCSDIR%%/pydoc/pyweblib.session.html
+%%INSTALLPORTDOCS%%%%DOCSDIR%%/pydoc/pyweblib.sslenv.html
+%%INSTALLPORTDOCS%%%%DOCSDIR%%/PyWebLib.html
+%%INSTALLPORTDOCS%%@dirrm %%DOCSDIR%%/pydoc
+%%INSTALLPORTDOCS%%@dirrm %%DOCSDIR%%
+@comment -
+@comment --- some examples here ---
+%%INSTALLEXAMPLES%%%%EXAMPLESDIR%%/cgi-bin/test-forms.py
+%%INSTALLEXAMPLES%%%%EXAMPLESDIR%%/cgi-bin/test-session.py
+%%INSTALLEXAMPLES%%@dirrm %%EXAMPLESDIR%%/cgi-bin
+%%INSTALLEXAMPLES%%@dirrm %%EXAMPLESDIR%%
How-To-Repeat: 	Install current port version.
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2005-03-19 16:42:07 UTC
State Changed
From-To: open->closed

Committed, thanks! 

I simplyfied your patch a little - I don't think we really 
need user interaction just to decide about docs and examples.