svn commit: r351860 - in head/mail/fetchmail: . files

Rene Ladan rene at FreeBSD.org
Tue Apr 22 16:10:51 UTC 2014


Author: rene
Date: Tue Apr 22 16:10:50 2014
New Revision: 351860
URL: http://svnweb.freebsd.org/changeset/ports/351860
QAT: https://qat.redports.org/buildarchive/r351860/

Log:
  - Add license information [1]
  - Fix shebang for fetchmailconf.py [1]
  - Convert POP2 knob into an option [1]
  - Use option helpers [1]
  - Fix staging of documentation and X11 files [1]
  - Simplify post-install target and pkg-plist
  - Replace USE_GMAKE and USE_XZ by their USES equivalents
  - Do not display pkg-message in post-install
  - Do not create /var/run/fetchmail in pkg-plist
  
  PR:		ports/185572 [1]
  Submitted by:	Takefu <takefu at airport.fm>
  Approved by:	maintainer timeout (<chalpin at cs.wisc.edu>)

Added:
  head/mail/fetchmail/files/pkg-deinstall.in   (contents, props changed)
  head/mail/fetchmail/files/pkg-install.in   (contents, props changed)
Modified:
  head/mail/fetchmail/Makefile
  head/mail/fetchmail/pkg-plist

Modified: head/mail/fetchmail/Makefile
==============================================================================
--- head/mail/fetchmail/Makefile	Tue Apr 22 16:03:28 2014	(r351859)
+++ head/mail/fetchmail/Makefile	Tue Apr 22 16:10:50 2014	(r351860)
@@ -10,18 +10,23 @@ MASTER_SITES=	SF/${PORTNAME}/branch_6.3/
 MAINTAINER=	chalpin at cs.wisc.edu
 COMMENT=	Batch mail retrieval utility for IMAP/POP3/ETRN/ODMR
 
+LICENSE=	GPLv2 LGPL21
+LICENSE_COMB=	dual
+
 RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss
 
 # Note USERS can only contain a single word as parts below rely on that.
-USERS=	${PORTNAME}
-GROUPS=	${USERS}
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
+
+USES=		gmake shebangfix tar:xz
+SHEBANG_FILES=	fetchmailconf.py
+python_OLD_CMD=	/usr/bin/env python
 
 USE_RC_SUBR=	fetchmail
-FETCHMAILRC=	${PREFIX}/etc/fetchmailrc
-SUB_FILES=	pkg-message
+SUB_FILES=	pkg-message pkg-install pkg-deinstall
+SUB_LIST+=	USERS=${USERS} GROUPS=${GROUPS} PORTNAME=${PORTNAME}
 
-USE_XZ=	yes
-USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 USE_OPENSSL=	yes
 CONFIGURE_ARGS=	--enable-opie --enable-RPA --enable-SDPS \
@@ -29,44 +34,37 @@ CONFIGURE_ARGS=	--enable-opie --enable-R
 		--with-ssl=${OPENSSLBASE}
 
 LDFLAGS+=	-L${LOCALBASE}/lib
-MAN1=	fetchmail.1
-MLINKS=	fetchmail.1 fetchmailconf.1
 
-OPTIONS_DEFINE=	X11 NLS NTLM GSSAPI
+OPTIONS_DEFINE=	X11 NLS NTLM GSSAPI POP2
 OPTIONS_DEFAULT=	GSSAPI
+OPTIONS_SUB=	yes
 X11_DESC=	Python/Tkinter dependencies for ``fetchmailconf''
-NTLM_DESC=	Build in support for NTLM/MSN authentication
-GSSAPI_DESC=	Build GSSAPI/Kerberos 5 support
+POP2_DESC=	POP2 Protocol support[obsolete]
+
+NLS_USES=	gettext
+NLS_CONFIGURE_ENABLE=	nls
+NLS_CONFIGURE_ON=	--enable-nls
+NLS_CONFIGURE_OFF=	--disable-nls
 
 PORTDOCS=	FAQ FEATURES NEWS NOTES README README.SSL \
 		design-notes.html fetchmail-FAQ.html fetchmail-features.html \
 		esrs-design-notes.html
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 # Pop2 is obsolete
-.if defined(WITH_POP2)
+.if ${PORT_OPTIONS:MPOP2}
 CONFIGURE_ARGS+=	--enable-POP2
 .endif
 
 .if ${PORT_OPTIONS:MX11}
 USE_PYTHON_RUN=	yes
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}tkinter>=0:${PORTSDIR}/x11-toolkits/py-tkinter
-PLIST_SUB+=	X11="" NOX11="@comment "
+PLIST_SUB+=	NOX11="@comment "
 .else
 CONFIGURE_ARGS+=	PYTHON=:
 SUB_FILES+=	fetchmailconf
-PLIST_SUB+=	X11="@comment " NOX11=""
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-CONFIGURE_ARGS+=	--enable-nls
-PLIST_SUB+=	NLS=""
-USES+=		gettext
-.else
-CONFIGURE_ARGS+=	--disable-nls
-PLIST_SUB+=	NLS="@comment "
+PLIST_SUB+=	NOX11=""
 .endif
 
 .if ${PORT_OPTIONS:MGSSAPI}
@@ -92,33 +90,20 @@ CONFIGURE_ARGS+=	--enable-NTLM
 PORTDOCS+=	README.NTLM
 .endif
 
-pre-patch:
-	@${REINPLACE_CMD} -e "s,^#!/usr/bin/env python,#!${LOCALBASE}/bin/python,g" \
-		${WRKSRC}/fetchmailconf.py
-
 post-build:
 	@${MAKE} -C ${WRKSRC} check
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
 .endif
 
 .if empty(PORT_OPTIONS:MX11)
-	${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${PREFIX}/bin
-	${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${PREFIX}/libexec
+	${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${STAGEDIR}${PREFIX}/libexec
 .endif
-	${MKDIR} -m 0755 "/var/run/${PORTNAME}"
-	${CHOWN} "${USERS}:${GROUPS}" "/var/run/${PORTNAME}"
-	${INSTALL} -m 644 -o ${USERS} -g ${GROUPS} ${FILESDIR}/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc.sample
-	if [ ! -f ${PREFIX}/etc/fetchmailrc ]; then \
-		${CP} -p ${PREFIX}/etc/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc ; \
-		${CHMOD} 600 ${PREFIX}/etc/fetchmailrc ; \
-	fi
-
-	@${ECHO_CMD} ""
-	@${CAT} ${PKGMESSAGE}
-	@${ECHO_CMD} ""
+	${INSTALL} ${FILESDIR}/fetchmailrc.sample \
+		${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample
 
 .include <bsd.port.mk>

Added: head/mail/fetchmail/files/pkg-deinstall.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/fetchmail/files/pkg-deinstall.in	Tue Apr 22 16:10:50 2014	(r351860)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ x$2 != xPOST-DEINSTALL ]; then
+  exit
+fi
+
+if [ -f /var/run/%%PORTNAME%%/fetchmail.pid ] ; then
+  /bin/rm -f /var/run/%%PORTNAME%%/fetchmail.pid
+fi
+
+/bin/rmdir /var/run/%%PORTNAME%%
+
+exit

Added: head/mail/fetchmail/files/pkg-install.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/fetchmail/files/pkg-install.in	Tue Apr 22 16:10:50 2014	(r351860)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ x$2 != xPOST-INSTALL ]; then
+  exit
+fi
+
+/bin/mkdir -m 0755 -p /var/run/%%PORTNAME%%
+/usr/sbin/chown "%%USERS%%:%%GROUPS%%" /var/run/%%PORTNAME%%
+/usr/sbin/chown "%%USERS%%:%%GROUPS%%" %%PREFIX%%/etc/fetchmailrc*
+/bin/chmod 0600 %%PREFXI%%/etc/fetchmailrc
+/bin/chmod 0644 %%PREFXI%%/etc/fetchmailrc.sample
+
+exit

Modified: head/mail/fetchmail/pkg-plist
==============================================================================
--- head/mail/fetchmail/pkg-plist	Tue Apr 22 16:03:28 2014	(r351859)
+++ head/mail/fetchmail/pkg-plist	Tue Apr 22 16:10:50 2014	(r351860)
@@ -1,5 +1,8 @@
+ at comment $FreeBSD: mail/fetchmail/pkg-plist 315268 2013-03-26 08:56:28Z mandree $
 bin/fetchmail
 bin/fetchmailconf
+man/man1/fetchmail.1.gz
+man/man1/fetchmailconf.1.gz
 %%NOX11%%libexec/fetchmailconf.py
 %%NLS%%share/locale/ca/LC_MESSAGES/fetchmail.mo
 %%NLS%%share/locale/cs/LC_MESSAGES/fetchmail.mo
@@ -28,10 +31,6 @@ bin/fetchmailconf
 %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.py
 %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyc
 %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyo
- at exec /usr/bin/install -d -m 755 -o fetchmail -g fetchmail /var/run/fetchmail
 @unexec if cmp -s %D/etc/fetchmailrc.sample %D/etc/fetchmailrc; then rm -f %D/etc/fetchmailrc; fi
 etc/fetchmailrc.sample
 @exec if [ ! -f %D/etc/fetchmailrc ] ; then cp -p %D/%F %B/fetchmailrc; fi
- at cwd /var/run
- at unexec rm -f %D/fetchmail/fetchmail.pid 2>/dev/null || true
- at dirrmtry fetchmail


More information about the svn-ports-all mailing list