pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail DESTDIR support



details:   https://anonhg.NetBSD.org/pkgsrc/rev/632f2a08c11b
branches:  trunk
changeset: 570841:632f2a08c11b
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Feb 04 02:00:36 2010 +0000

description:
DESTDIR support

diffstat:

 mail/dspam/Makefile |  45 +++++++++++++++++++++++----------------------
 mail/etpan/Makefile |  17 ++++++++++-------
 2 files changed, 33 insertions(+), 29 deletions(-)

diffs (121 lines):

diff -r 71e7016b62a1 -r 632f2a08c11b mail/dspam/Makefile
--- a/mail/dspam/Makefile       Thu Feb 04 01:57:26 2010 +0000
+++ b/mail/dspam/Makefile       Thu Feb 04 02:00:36 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.64 2009/12/15 21:54:17 joerg Exp $
+# $NetBSD: Makefile,v 1.65 2010/02/04 02:00:36 joerg Exp $
 
 DISTNAME=      dspam-3.8.0
 PKGREVISION=   5
@@ -9,6 +9,8 @@
 HOMEPAGE=      http://dspam.nuclearelephant.com/
 COMMENT=       Extremely scalable, statistical-hybrid anti-spam filter
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 GNU_CONFIGURE=         yes
 USE_LIBTOOL=           yes
 
@@ -119,45 +121,44 @@
 post-extract:
        ${CHMOD} -R go-w ${WRKSRC}
 
+INSTALLATION_DIRS+=    ${DOCDIR} ${DATADIR} ${EGDIR}
+
 post-install:
-       ${INSTALL_DATA_DIR} ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/RELEASE.NOTES ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/UPGRADING ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCDIR}
-       ${INSTALL_DATA_DIR} ${DATADIR}
-       ${INSTALL_DATA_DIR} ${EGDIR}
-       ${INSTALL_DATA} ${WRKSRC}/src/dspam.conf.in ${EGDIR}/dspam.conf
-       ${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/admins ${EGDIR}/cgi-admins
+       ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/RELEASE.NOTES ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/UPGRADING ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/src/dspam.conf.in ${DESTDIR}${EGDIR}/dspam.conf
+       ${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/admins ${DESTDIR}${EGDIR}/cgi-admins
        ${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/default.prefs \
-               ${EGDIR}/cgi-default.prefs
+           ${DESTDIR}${EGDIR}/cgi-default.prefs
        ${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/configure.pl \
-               ${EGDIR}/configure.pl
+           ${DESTDIR}${EGDIR}/configure.pl
 
 .for d in txt webui/cgi-bin webui/htdocs
-       ${INSTALL_DATA_DIR} ${DATADIR}/${d}
+       ${INSTALL_DATA_DIR} ${DESTDIR}${DATADIR}/${d}
        cd ${WRKSRC}/${d} && pax -rwppm '-s|.*/Makefile.*$$||'  \
                '-s|./admins.*$$||' '-s|./default.prefs.*$$||'          \
-               '-s|./configure.pl.*$$||' . ${DATADIR}/${d}
+               '-s|./configure.pl.*$$||' . ${DESTDIR}${DATADIR}/${d}
 .endfor
 
 .for drv in mysql pgsql
 .  if !empty(DSPAM_STORAGE_DRIVER:M${drv})
-       ${INSTALL_DATA_DIR} ${DATADIR}/${drv}
+       ${INSTALL_DATA_DIR} ${DESTDIR}${DATADIR}/${drv}
        cd ${WRKSRC}/src/tools.${drv}_drv && \
-               pax -rwpm ./*.sql ${DATADIR}/${drv}
+               pax -rwpm ./*.sql ${DESTDIR}${DATADIR}/${drv}
 .  endif
 .endfor
 
 .if !empty(DSPAM_STORAGE_DRIVER:Msqlite*)
-       ${INSTALL_DATA_DIR} ${DATADIR}/sqlite
+       ${INSTALL_DATA_DIR} ${DESTDIR}${DATADIR}/sqlite
         cd ${WRKSRC}/src/tools.sqlite_drv && \
-               pax -rwpm '-s|.*/Makefile.*$$||' . ${DATADIR}/sqlite
+               pax -rwpm '-s|.*/Makefile.*$$||' . ${DESTDIR}${DATADIR}/sqlite
 .endif
 
-       ${CHMOD} ${SHAREMODE} ${DATADIR}/webui/cgi-bin/*.txt
-       ${CHMOD} ${SHAREMODE} ${DATADIR}/webui/cgi-bin/templates/*.html
-       ${CHMOD} ${SHAREMODE} ${DATADIR}/webui/htdocs/*.css
-       ${CHMOD} ${SHAREMODE} ${DATADIR}/webui/htdocs/*.gif
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${DATADIR}/webui/cgi-bin/*.txt
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${DATADIR}/webui/cgi-bin/templates/*.html
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${DATADIR}/webui/htdocs/*.css
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${DATADIR}/webui/htdocs/*.gif
 
 .include "../../mk/bsd.pkg.mk"
diff -r 71e7016b62a1 -r 632f2a08c11b mail/etpan/Makefile
--- a/mail/etpan/Makefile       Thu Feb 04 01:57:26 2010 +0000
+++ b/mail/etpan/Makefile       Thu Feb 04 02:00:36 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2010/01/17 12:02:23 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2010/02/04 02:08:22 joerg Exp $
 #
 
 DISTNAME=      etpan-ng-0.7.1
@@ -11,18 +11,21 @@
 HOMEPAGE=      http://libetpan.sourceforge.net/etpan/
 COMMENT=       Mail console client with S/MIME and PGP support
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 USE_PKGLOCALEDIR=      yes
 USE_TOOLS+=            perl:run yacc
 GNU_CONFIGURE=         yes
 
-DOCDIR=                        ${LOCALBASE}/share/doc/etpan
+DOCDIR=                        ${PREFIX}/share/doc/etpan
 
-INSTALLATION_DIRS=     share/doc/etpan
+INSTALLATION_DIRS=     bin share/doc/etpan
 
-post-install:
-       ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/doc/CONFIG ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/doc/INTERNAL ${DOCDIR}
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/src/etpan ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/doc/CONFIG ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/doc/INTERNAL ${DESTDIR}${DOCDIR}
 
 .include "../../databases/db4/buildlink3.mk"
 .include "../../devel/ncurses/buildlink3.mk"



Home | Main Index | Thread Index | Old Index