Bug 180362 - [patch] mail/cyrus-imapd23: add Cyrus man pages to manpath
Summary: [patch] mail/cyrus-imapd23: add Cyrus man pages to manpath
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: Hajimu UMEMOTO
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-07 13:50 UTC by Panagiotis Christias
Modified: 2013-07-15 20:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.82 KB, patch)
2013-07-07 13:50 UTC, Panagiotis Christias
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Panagiotis Christias 2013-07-07 13:50:00 UTC
FreeBSD 9.0 and newer use /usr/local/etc/man.d for local configuration files, see man(1). It can be used to easily add Cyrus man pages to manpath.

Fix: See attached patch file (based on lang/perl5.14 port).

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-07-07 13:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ume

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-07-15 20:44:29 UTC
Author: ume
Date: Mon Jul 15 19:44:20 2013
New Revision: 323074
URL: http://svnweb.freebsd.org/changeset/ports/323074

Log:
  Add Cyrus man pages to manpath.
  
  PR:		ports/180362

Added:
  head/mail/cyrus-imapd23/files/cyrus-imapd-man.conf   (contents, props changed)
Modified:
  head/mail/cyrus-imapd23/Makefile
  head/mail/cyrus-imapd23/pkg-plist

Modified: head/mail/cyrus-imapd23/Makefile
==============================================================================
--- head/mail/cyrus-imapd23/Makefile	Mon Jul 15 19:44:13 2013	(r323073)
+++ head/mail/cyrus-imapd23/Makefile	Mon Jul 15 19:44:20 2013	(r323074)
@@ -2,7 +2,7 @@
 
 PORTNAME=	cyrus-imapd
 PORTVERSION=	2.3.18
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	mail ipv6
 MASTER_SITES=	ftp://ftp.cyrusimap.org/cyrus-imapd/
 
@@ -171,6 +171,12 @@ PLIST_SUB+=	LDAP_PTLOADER=""
 PLIST_SUB+=	LDAP_PTLOADER="@comment "
 .endif
 
+.if ${OSVERSION} >= 900022
+PLIST_SUB+=	MANCONF=""
+.else
+PLIST_SUB+=	MANCONF="@comment "
+.endif
+
 .if !exists(/usr/lib/libkrb5.a)
 CONFIGURE_ARGS+=--disable-gssapi
 .endif
@@ -230,6 +236,9 @@ post-patch:
 			${WRKSRC}/tools/masssievec
 		@${REINPLACE_CMD} -e "s|-lpthread|\$$(PTHREAD_LIBS)|g" \
 			${WRKSRC}/imap/Makefile.in
+		@${SED} -e "s|%%PREFIX%%|${PREFIX}|g;" \
+			${FILESDIR}/cyrus-imapd-man.conf \
+			> ${WRKDIR}/cyrus-imapd-man.conf
 .if ${PORT_OPTIONS:MDRAC}
 		@${RM} -rf ${WRKSRC}/autom4te.cache
 .endif
@@ -237,8 +246,7 @@ post-patch:
 post-install:
 .for f in ${CYRUS_MAN3}
 		@${GZIP_CMD} ${PREFIX}/${PERLMAN}/man/man3/${f}
-		@${ECHO_CMD} ${PERLMAN}/man/man3/${f}.gz \
-			>>${TMPPLIST}
+		@${ECHO_CMD} ${PERLMAN}/man/man3/${f}.gz >>${TMPPLIST}
 .endfor
 .for f in ${CYRUS_MAN8}
 		@${GZIP_CMD} ${PREFIX}/cyrus/man/man8/${f}
@@ -286,6 +294,10 @@ post-install:
 			${PREFIX}/cyrus/bin/mkimap
 		@${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \
 			${PREFIX}/cyrus/bin/masssievec
+.if ${OSVERSION} >= 900022
+		@${INSTALL_DATA} ${WRKDIR}/cyrus-imapd-man.conf \
+			${PREFIX}/etc/man.d/cyrus-imapd.conf
+.endif
 		@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} \
 			POST-INSTALL
 		@${CAT} ${PKGMESSAGE}

Added: head/mail/cyrus-imapd23/files/cyrus-imapd-man.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/cyrus-imapd23/files/cyrus-imapd-man.conf	Mon Jul 15 19:44:20 2013	(r323074)
@@ -0,0 +1 @@
+MANPATH %%PREFIX%%/cyrus/man

Modified: head/mail/cyrus-imapd23/pkg-plist
==============================================================================
--- head/mail/cyrus-imapd23/pkg-plist	Mon Jul 15 19:44:13 2013	(r323073)
+++ head/mail/cyrus-imapd23/pkg-plist	Mon Jul 15 19:44:20 2013	(r323074)
@@ -107,6 +107,7 @@ lib/libcyrus.a
 %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.bs
 %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so
 %%EXAMPLESDIR%%/imapd.conf
+%%MANCONF%%etc/man.d/cyrus-imapd.conf
 @dirrm cyrus/bin
 @dirrm include/cyrus
 @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Hajimu UMEMOTO freebsd_committer freebsd_triage 2013-07-15 20:46:24 UTC
State Changed
From-To: open->closed

Committed, thanks!