Index: Makefile =================================================================== --- Makefile (revision 354375) +++ Makefile (working copy) @@ -10,12 +10,10 @@ MAINTAINER= bzeeb+freebsd+ports@zabbadoz.net COMMENT= DragonFly Mail Agent, a small MTA for local/outbound mail -LICENSE= BSD +LICENSE= BSD3CLAUSE USE_OPENSSL= yes -MAN8= dma.8 - USE_GITHUB= yes GH_COMMIT= 2bb8bcb GH_ACCOUNT= corecode @@ -29,15 +27,17 @@ USE_RC_SUBR= dma_flushq SUB_FILES= pkg-message +PLIST_SUB+= RESETPREFIX=${PREFIX} # Allow subports to extend. CONFFILES+= dma.conf auth.conf -NO_STAGE= yes .include .if ${OSVERSION} < 900000 -IGNORE= Does not build in 8.x +EXTRA_PATCHES= ${.CURDIR:H:H}/mail/dma/files/extrapatch-8-spool.c +.else +EXTRA_PATCHES= ${.CURDIR:H:H}/mail/dma/files/extrapatch-else-spool.c .endif pre-patch: @@ -54,24 +54,15 @@ .endif do-install: - ${INSTALL} -o root -g mail -m 2555 ${WRKSRC}/dma/dma ${PREFIX}/libexec + ${INSTALL} -o root -g mail -m 2555 ${WRKSRC}/dma/dma ${STAGEDIR}/${PREFIX}/libexec ${INSTALL} -o root -g mail -m 4550 \ - ${WRKSRC}/dma-mbox-create/dma-mbox-create ${PREFIX}/libexec - ${INSTALL_MAN} ${WRKSRC}/dma.8 ${PREFIX}/man/man8/ - ${MKDIR} ${PREFIX}/etc/dma + ${WRKSRC}/dma-mbox-create/dma-mbox-create ${STAGEDIR}/${PREFIX}/libexec + ${INSTALL_MAN} ${WRKSRC}/dma.8 ${STAGEDIR}/${PREFIX}/man/man8/ + ${MKDIR} ${STAGEDIR}/${PREFIX}/etc/dma .for i in ${CONFFILES} - ${INSTALL_DATA} -m 0644 ${WRKSRC}/${i} ${PREFIX}/etc/dma/${i}.sample + ${INSTALL_DATA} -m 0644 ${WRKSRC}/${i} ${STAGEDIR}/${PREFIX}/etc/dma/${i}.sample .endfor - ${CHMOD} o-r ${PREFIX}/etc/dma/auth.conf.sample -.for i in ${CONFFILES} - if [ ! -f ${PREFIX}/etc/dma/${i} ]; then \ - ${CP} -p ${PREFIX}/etc/dma/${i}.sample \ - ${PREFIX}/etc/dma/${i} ; \ - fi -.endfor + ${CHMOD} o-r ${STAGEDIR}/${PREFIX}/etc/dma/auth.conf.sample ${INSTALL} -d -o root -g mail -m 770 /var/spool/dma -post-install: - @${CAT} ${PKGMESSAGE} - .include Index: files/extrapatch-8-spool.c =================================================================== --- files/extrapatch-8-spool.c (revision 0) +++ files/extrapatch-8-spool.c (working copy) @@ -0,0 +1,19 @@ +--- spool.c 2013-06-03 14:03:15.000000000 +0000 ++++ spool.c.8 2014-05-17 18:14:45.000000000 +0000 +@@ -36,6 +36,7 @@ + + #include + #include ++#include + + #include + #include +@@ -415,7 +416,7 @@ + return (0); + + /* Did the flush file get touched within the last period seconds? */ +- if (st.st_mtim.tv_sec + period >= now.tv_sec) ++ if (st.st_mtime + (int)period >= now.tv_sec) + return (1); + else + return (0); Property changes on: files/extrapatch-8-spool.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/extrapatch-else-spool.c =================================================================== --- files/extrapatch-else-spool.c (revision 0) +++ files/extrapatch-else-spool.c (working copy) @@ -0,0 +1,11 @@ +--- spool.c.orig 2013-06-03 14:03:15.000000000 +0000 ++++ spool.c 2013-08-22 11:07:47.000000000 +0000 +@@ -415,7 +415,7 @@ flushqueue_since(unsigned int period) + return (0); + + /* Did the flush file get touched within the last period seconds? */ +- if (st.st_mtim.tv_sec + period >= now.tv_sec) ++ if (st.st_mtim.tv_sec + (int)period >= now.tv_sec) + return (1); + else + return (0); Property changes on: files/extrapatch-else-spool.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: files/patch-spool.c =================================================================== --- files/patch-spool.c (revision 354375) +++ files/patch-spool.c (working copy) @@ -1,11 +0,0 @@ ---- spool.c.orig 2013-06-03 14:03:15.000000000 +0000 -+++ spool.c 2013-08-22 11:07:47.000000000 +0000 -@@ -415,7 +415,7 @@ flushqueue_since(unsigned int period) - return (0); - - /* Did the flush file get touched within the last period seconds? */ -- if (st.st_mtim.tv_sec + period >= now.tv_sec) -+ if (st.st_mtim.tv_sec + (int)period >= now.tv_sec) - return (1); - else - return (0); Index: pkg-plist =================================================================== --- pkg-plist (revision 354375) +++ pkg-plist (working copy) @@ -1,11 +1,9 @@ libexec/dma libexec/dma-mbox-create -@unexec if cmp -s %D/etc/dma/dma.conf.sample %D/etc/dma/dma.conf; then rm -f %D/etc/dma/dma.conf; fi -etc/dma/dma.conf.sample -@exec if [ ! -f %B/dma.conf ] ; then cp -p %B/%f %B/dma.conf; fi -@unexec if cmp -s %D/etc/dma/auth.conf.sample %D/etc/dma/auth.conf; then rm -f %D/etc/dma/auth.conf; fi -etc/dma/auth.conf.sample -@exec if [ ! -f %B/auth.conf ] ; then cp -p %B/%f %B/auth.conf; fi +@sample etc/dma/dma.conf.sample +@sample etc/dma/auth.conf.sample +man/man8/dma.8.gz @dirrmtry etc/dma -@exec install -d -o root -g mail -m 770 /var/spool/dma -@dirrmtry rmdir /var/spool/dma +@cwd / +@dirrmtry var/spool/dma +@cwd %%RESETPREFIX%%