Bug 185572 - [PATCH] mail/fetchmail: fix StageDir
Summary: [PATCH] mail/fetchmail: fix StageDir
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: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-08 04:10 UTC by takefu
Modified: 2014-04-22 17:20 UTC (History)
1 user (show)

See Also:


Attachments
fetchmail-6.3.26.patch (4.11 KB, patch)
2014-01-08 04:10 UTC, takefu
no flags Details | Diff
mail__fetchmail.diff (6.31 KB, patch)
2014-04-06 12:52 UTC, Rene Ladan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description takefu 2014-01-08 04:10:00 UTC
fix StageDir

Port maintainer (chalpin@cs.wisc.edu) is cc'd.

Generated with FreeBSD Port Tools 0.99_11 (mode: change, diff: ports)
Comment 1 Edwin Groothuis freebsd_committer 2014-01-08 04:54:39 UTC
Maintainer of mail/fetchmail,

Please note that PR ports/185572 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/185572

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2014-01-08 04:54:40 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 takefu 2014-01-24 09:12:20 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

It was not possible to correct it with 8.4-RELEASE though the patch was tried.
I want you to try because it made the patch improved a little.


Pkg-install pkg-deinstall operates correctly.
NLS option reform.
shebangfix fetchmailconf.py


- --- fetchmail-6.3.26.patch begins here ---
diff -ruN /usr/ports/mail/fetchmail/Makefile ./Makefile
- --- /usr/ports/mail/fetchmail/Makefile	2013-09-21 04:59:12.000000000 +0900
+++ ./Makefile	2014-01-24 17:46:25.000000000 +0900
@@ -10,17 +10,25 @@
 MAINTAINER=	chalpin@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}
+NULLDIR?=	# None. portlint compliance
+
+USES=		shebangfix
+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_XZ=		yes
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 USE_OPENSSL=	yes
@@ -29,44 +37,37 @@
 		--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}
@@ -74,7 +75,7 @@
 .if exists(${LOCALBASE}/lib/libkrb5.a)
 KRB5_HOME=	${LOCALBASE}
 .elif exists(/usr/lib/libkrb5.a)
- -KRB5_HOME=	/usr
+KRB5_HOME=	${NULLDIR}/usr
 .endif
 .endif

@@ -92,29 +93,26 @@
 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
+	${MKDIR} -m 0755 "${STAGEDIR}/var/run/${PORTNAME}"
+	${INSTALL} -m 644 ${FILESDIR}/fetchmailrc.sample\
+		${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample
 	if [ ! -f ${PREFIX}/etc/fetchmailrc ]; then \
- -		${CP} -p ${PREFIX}/etc/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc ; \
- -		${CHMOD} 600 ${PREFIX}/etc/fetchmailrc ; \
+		${CP} -p ${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample\
+			${STAGEDIR}${PREFIX}/etc/fetchmailrc ; \
+		${CHMOD} 600 ${STAGEDIR}${PREFIX}/etc/fetchmailrc ; \
 	fi

 	@${ECHO_CMD} ""
diff -ruN /usr/ports/mail/fetchmail/files/pkg-deinstall.in ./files/pkg-deinstall.in
- --- /usr/ports/mail/fetchmail/files/pkg-deinstall.in	1970-01-01 09:00:00.000000000 +0900
+++ ./files/pkg-deinstall.in	2014-01-24 17:56:16.000000000 +0900
@@ -0,0 +1,11 @@
+#!/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
+
+exit
diff -ruN /usr/ports/mail/fetchmail/files/pkg-install.in ./files/pkg-install.in
- --- /usr/ports/mail/fetchmail/files/pkg-install.in	1970-01-01 09:00:00.000000000 +0900
+++ ./files/pkg-install.in	2014-01-24 17:51:24.000000000 +0900
@@ -0,0 +1,11 @@
+#!/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*
+
+exit
diff -ruN /usr/ports/mail/fetchmail/pkg-plist ./pkg-plist
- --- /usr/ports/mail/fetchmail/pkg-plist	2014-01-22 08:40:21.000000000 +0900
+++ ./pkg-plist	2014-01-23 10:12:37.000000000 +0900
@@ -1,5 +1,8 @@
+@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
- --- fetchmail-6.3.26.patch ends here ---

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlLiLnQACgkQxqPFoZw+j1Y1OwCfa5evAvHtxHDWqndYQdxY5cDe
BTIAnijEWF2kDWN++OgLYjPjidX5zX8c
=w6Ye
-----END PGP SIGNATURE-----
Comment 4 takefu 2014-02-11 01:42:23 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> It looks like something mangled your patchfile.  It had "- -" at the beginning of the line where it should be "-".  After fixing that problem, I was able to apply and test it.  It still fails poudriere testport.  This is because the Makefile contained:
I'm sorry.
My mail user agent's plug-in seems to have influenced.

> In the attached revision, I've put all of the manipulation of /var/run/fetchmail into the pkg-(de)install scripts.  Poudriere testport still complains about %%ETCDIR%%rc and $$ETCDIR%%rc.sample -- but I believe these to be false positives.
In my PC, the problem did not occur.

:-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlL5f/8ACgkQxqPFoZw+j1ZgdACguSvc1eESfSDaUIoZxzTQoSO/
oZUAn1kqX7pZqUllcIkhXzdSl06/0qyk
=EJp4
-----END PGP SIGNATURE-----
Comment 5 Rene Ladan freebsd_committer 2014-04-06 12:52:09 UTC
The patch looks mostly OK to me, I made some changes (attached):
- USE_GMAKE and USE_XZ replaced by their USES equivalents
- removed NULLDIR, portlint is just whining here and this would add
unneeded complexity
- simplified post-install target and pkg-plist
- removed displaying pkg-message from post-install, this is handled
automatically by the staging framework
- removed creation of /var/run/fetchmail from pkg-plist, this is already
done in pkg-install.in

Both a 'poudriere testport' on a 8.4-i386 jail and a 'make check-orphans
; make package' as user succeeded without any warnings about leftover or
missing files.

René
Comment 6 Rene Ladan freebsd_committer 2014-04-06 12:53:59 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Take
Comment 7 takefu 2014-04-14 02:08:46 UTC
I tried the patch.
It seems doesn't work pkg-install.

> =3D=3D=3D> Staging rc.d startup script(s)
> =3D=3D=3D=3D> Items missing from pkg-plist (check-orphans)
> =3D=3D=3D>  Building package for fetchmail-6.3.26
> =3D=3D=3D>  Installing for fetchmail-6.3.26
> =3D=3D=3D>  Checking if mail/fetchmail already installed
> =3D=3D=3D>   Registering installation for fetchmail-6.3.26
> =3D=3D=3D> Creating users and/or groups.
> Using existing group 'fetchmail'.
> Using existing user 'fetchmail'.
> /usr/sbin/chmod: not found
> /usr/sbin/chmod: not found
> pkg-static: POST-INSTALL script failed

The fix, and then try again.

--- /dev/null	2014-04-14 10:00:04.000000000 +0900
+++ mail/fetchmail/files/pkg-install.in	2014-04-14 09:59:52.000000000 +09=
00
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ x$2 !=3D 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 %%PREFIX%%/etc/fetchmailrc
+/bin/chmod 0644 %%PREFIX%%/etc/fetchmailrc.sample
+
+exit



Ren=C3=A9 Ladan =E3=81=95=E3=82=93=E3=81=AF=E6=9B=B8=E3=81=8D=E3=81=BE=E3=
=81=97=E3=81=9F (2014/04/06 20:52):
> The patch looks mostly OK to me, I made some changes (attached):
> - USE_GMAKE and USE_XZ replaced by their USES equivalents
> - removed NULLDIR, portlint is just whining here and this would add
> unneeded complexity
> - simplified post-install target and pkg-plist
> - removed displaying pkg-message from post-install, this is handled
> automatically by the staging framework
> - removed creation of /var/run/fetchmail from pkg-plist, this is alread=
y
> done in pkg-install.in
>=20
> Both a 'poudriere testport' on a 8.4-i386 jail and a 'make check-orphan=
s
> ; make package' as user succeeded without any warnings about leftover o=
r
> missing files.
>=20
> Ren=C3=A9
>=20


--=20
Comment 8 Rene Ladan freebsd_committer 2014-04-22 17:10:55 UTC
State Changed
From-To: feedback->closed

Committed, thanks
Comment 9 dfilter service freebsd_committer 2014-04-22 17:10:55 UTC
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@airport.fm>
  Approved by:	maintainer timeout (<chalpin@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@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 @@
+@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
-@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
-@cwd /var/run
-@unexec rm -f %D/fetchmail/fetchmail.pid 2>/dev/null || true
-@dirrmtry fetchmail
_______________________________________________
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"