diff options
author | rea <rea@FreeBSD.org> | 2011-08-16 06:01:14 +0800 |
---|---|---|
committer | rea <rea@FreeBSD.org> | 2011-08-16 06:01:14 +0800 |
commit | 84cf17fbbcef6ef2a1a975c03ed5d379bab6c338 (patch) | |
tree | 0805e1b0d54be632e5200b51fdaa554778bd25e9 /mail | |
parent | c747691e4db3e416a955ae9f218034c93a32aa86 (diff) | |
download | freebsd-ports-gnome-84cf17fbbcef6ef2a1a975c03ed5d379bab6c338.tar.gz freebsd-ports-gnome-84cf17fbbcef6ef2a1a975c03ed5d379bab6c338.tar.zst freebsd-ports-gnome-84cf17fbbcef6ef2a1a975c03ed5d379bab6c338.zip |
OfflineIMAP: respect NOPORTEXAMPLES and build HTML documentation on-demand
Also parametrize GitHub user name to avoid repeating ourselves
and mirror distfile locally on CodeLabs and FreeBSD.
PR: ports/158862
Hints-from: Pan Tsu <inyaoo@gmail.com>
Approved-by: garga (mentor), maintainer timeout (1 month)
Feature-safe: yes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/offlineimap/Makefile | 43 | ||||
-rw-r--r-- | mail/offlineimap/files/pkg-message.in | 8 | ||||
-rw-r--r-- | mail/offlineimap/pkg-plist | 13 |
3 files changed, 41 insertions, 23 deletions
diff --git a/mail/offlineimap/Makefile b/mail/offlineimap/Makefile index bc464333db11..de5cf784dc80 100644 --- a/mail/offlineimap/Makefile +++ b/mail/offlineimap/Makefile @@ -10,40 +10,71 @@ DISTVERSION= 6.3.3 PORTREVISION= 1 CATEGORIES= mail python MASTER_SITES= http://download.github.com/ \ - ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= sergei -DISTNAME= nicolas33-${PORTNAME}-v${DISTVERSION}-0-g3b09695 + http://dist.codelabs.ru/fbsd/offlineimap/ \ + LOCAL/rea/offlineimap +DISTNAME= ${GITHUB_USER}-${PORTNAME}-v${DISTVERSION}-0-g3b09695 MAINTAINER= sergei@FreeBSD.org COMMENT= Powerful IMAP/Maildir synchronization and reader support LICENSE= GPLv2 GPLv3 LICENSE_COMB= dual + LICENSE_FILE_GPLv2=${WRKSRC}/COPYING -WRKSRC= ${WRKDIR}/nicolas33-${PORTNAME}-cf325d5 +OPTIONS= HTMLDOCS "Generate HTML documentation" Off + +WRKSRC= ${WRKDIR}/${GITHUB_USER}-${PORTNAME}-cf325d5 SUB_FILES= pkg-message +GITHUB_USER= nicolas33 + USE_PYTHON= yes USE_PYDISTUTILS= yes -DOCS= *.rst docs/*.rst +DOCS= Changelog.rst README.rst SubmittingPatches.rst \ + docs/FAQ.rst docs/INSTALL.rst docs/MANUAL.rst docs/UPGRADE.rst EXAMPLES= offlineimap.conf offlineimap.conf.minimal +PORTDOCS= ${DOCS:T} +PORTEXAMPLES= ${EXAMPLES} + +.include <bsd.port.options.mk> + +.if !defined(NOPORTDOCS) && defined(WITH_HTMLDOCS) +BUILD_DEPENDS+= rst2html:${PORTSDIR}/textproc/py-docutils +DOCS:= ${DOCS} ${DOCS:M*.rst:S/.rst$/.html/} +.endif + +# This is needed for pkg-message.in +.if defined(NOPORTEXAMPLES) +SUB_LIST+= PORTEXAMPLES="@comment " +.else +SUB_LIST+= PORTEXAMPLES="" +.endif pre-fetch: # get github download ticket if [ ! -f ${DISTDIR}/${DISTFILES} ]; then \ ${FETCH_BINARY} -s >/dev/null \ - http://github.com/nicolas33/${PORTNAME}/tarball/v${DISTVERSION}; \ + http://github.com/${GITHUB_USER}/${PORTNAME}/tarball/v${DISTVERSION}; \ fi +post-build: +.if !defined(NOPORTDOCS) && defined(WITH_HTMLDOCS) +.for r in ${DOCS:M*.rst} + rst2html ${WRKSRC}/${r} ${WRKSRC}/${r:R}.html +.endfor +.endif + post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} .endif +.if !defined(NOPORTEXAMPLES) @${MKDIR} ${EXAMPLESDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR} +.endif @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/mail/offlineimap/files/pkg-message.in b/mail/offlineimap/files/pkg-message.in index ee7feab2131c..98249c2d78f7 100644 --- a/mail/offlineimap/files/pkg-message.in +++ b/mail/offlineimap/files/pkg-message.in @@ -1,8 +1,8 @@ ########################################################################### -# -# Please copy sample configuration file from -# %%EXAMPLESDIR%%/offlineimap.conf.minimal -# to ~/.offlineimaprc and edit to suit your needs. +%%PORTEXAMPLES%%# +%%PORTEXAMPLES%%# Please copy sample configuration file from +%%PORTEXAMPLES%%# %%EXAMPLESDIR%%/offlineimap.conf.minimal +%%PORTEXAMPLES%%# to ~/.offlineimaprc and edit to suit your needs. # # WARNING: if you are upgrading from pre-3.99.12 version, please be sure # to check the manual for changes in configuration file format diff --git a/mail/offlineimap/pkg-plist b/mail/offlineimap/pkg-plist index c17df34ea731..94949c81486f 100644 --- a/mail/offlineimap/pkg-plist +++ b/mail/offlineimap/pkg-plist @@ -103,16 +103,3 @@ bin/offlineimap %%PYTHON_SITELIBDIR%%/offlineimap/threadutil.pyc %%PYTHON_SITELIBDIR%%/offlineimap/threadutil.pyo @dirrm %%PYTHON_SITELIBDIR%%/offlineimap -%%PORTDOCS%%%%DOCSDIR%%/Changelog.draft.rst -%%PORTDOCS%%%%DOCSDIR%%/Changelog.maint.rst -%%PORTDOCS%%%%DOCSDIR%%/Changelog.rst -%%PORTDOCS%%%%DOCSDIR%%/FAQ.rst -%%PORTDOCS%%%%DOCSDIR%%/INSTALL.rst -%%PORTDOCS%%%%DOCSDIR%%/MANUAL.rst -%%PORTDOCS%%%%DOCSDIR%%/README.rst -%%PORTDOCS%%%%DOCSDIR%%/SubmittingPatches.rst -%%PORTDOCS%%%%DOCSDIR%%/UPGRADE.rst -%%PORTDOCS%%@dirrm %%DOCSDIR%% -%%EXAMPLESDIR%%/offlineimap.conf -%%EXAMPLESDIR%%/offlineimap.conf.minimal -@dirrm %%EXAMPLESDIR%% |