pkgsrc-Bugs archive

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

pkg/38526: mail/ssmtp: support for DESTDIR and PKGMANDIR



>Number:         38526
>Category:       pkg
>Synopsis:       mail/ssmtp: support for DESTDIR and PKGMANDIR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 27 10:05:00 +0000 2008
>Originator:     cheusov%tut.by@localhost
>Release:        NetBSD 4.0_STABLE
>Organization:
>Environment:
System: NetBSD chen.chizhovka.net 4.0_STABLE NetBSD 4.0_STABLE (GENERIC) #3: 
Wed Apr 23 00:58:08 EEST 2008 
cheusov%chen.chizhovka.net@localhost:/srv/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
fix for this:
http://www.mova.org/~cheusov/pub/pkgsrc-pbulk/NetBSD/current-destdir/log/20080426.0859/mail/ssmtp/stage_package.html

   => Generating post-install file lists
   pkg_create: can't stat 
`/tmp/obj-pkgsrc-destdir/mail/ssmtp/work/.destdir/usr/pkg/share/man/man8/ssmtp.8'
   pkg_create: can't stat 
`/tmp/obj-pkgsrc-destdir/mail/ssmtp/work/.destdir/usr/pkg/sbin/ssmtp'
   pkg_create: can't stat 
`/tmp/obj-pkgsrc-destdir/mail/ssmtp/work/.destdir/usr/pkg/share/examples/ssmtp/mailer.conf'
   pkg_create: can't stat 
`/tmp/obj-pkgsrc-destdir/mail/ssmtp/work/.destdir/usr/pkg/share/examples/ssmtp/revaliases'
   pkg_create: can't stat 
`/tmp/obj-pkgsrc-destdir/mail/ssmtp/work/.destdir/usr/pkg/share/examples/ssmtp/ssmtp.conf'
   ERROR: CONF_FILE 
/tmp/obj-pkgsrc-destdir/mail/ssmtp/work/.destdir/usr/pkg/share/examples/ssmtp/ssmtp.conf
 does not exist.
   *** Error code 1

   Stop.
   make: stopped in /srv/pkgsrc/mail/ssmtp
   *** Error code 1

>Fix:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/ssmtp/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- Makefile    18 Jan 2008 05:08:30 -0000      1.20
+++ Makefile    27 Apr 2008 09:59:31 -0000
@@ -16,6 +16,8 @@
 HOMEPAGE=      http://packages.debian.org/testing/mail/ssmtp.html
 COMMENT=       Extremely simple MTA to forward mail to a mail hub
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 WRKSRC=                        ${WRKDIR}/${PKGNAME_NOREV:S/.orig$//}
 USE_TOOLS+=            gmake
 GNU_CONFIGURE=         yes
@@ -35,14 +37,18 @@
 SUBST_SED.paths+=      -e 's,/etc/ssmtp,${PKG_SYSCONFDIR},g'
 SUBST_STAGE.paths=     post-patch
 
+INSTALLATION_DIRS+=    ${EGDIR}
+
+MAKE_FLAGS+=           prefix=${DESTDIR}${PREFIX}
+MAKE_FLAGS+=           mandir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+
 post-extract:
        @${RM} -rf ${WRKSRC}/RCS
        ${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
 
 post-install:
-       ${INSTALL_DATA_DIR} ${EGDIR}
-       ${INSTALL_DATA} ${WRKSRC}/ssmtp.conf ${EGDIR}
-       ${INSTALL_DATA} ${WRKSRC}/revaliases ${EGDIR}
-       ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/ssmtp.conf ${DESTDIR}${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/revaliases ${DESTDIR}${EGDIR}
+       ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${DESTDIR}${EGDIR}
 
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index