pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/print/cups Add DESTDIR support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a2413a70f3e
branches:  trunk
changeset: 535163:2a2413a70f3e
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Nov 08 20:03:21 2007 +0000

description:
Add DESTDIR support.

diffstat:

 print/cups/Makefile |  19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 977ebc0702aa -r 2a2413a70f3e print/cups/Makefile
--- a/print/cups/Makefile       Thu Nov 08 19:53:25 2007 +0000
+++ b/print/cups/Makefile       Thu Nov 08 20:03:21 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.128 2007/11/05 20:16:19 adrianp Exp $
+# $NetBSD: Makefile,v 1.129 2007/11/08 20:03:21 joerg Exp $
 #
 # The CUPS author is very good about taking back changes into the main
 # CUPS distribution.  The correct place to send patches or bug-fixes is:
@@ -24,6 +24,8 @@
 HOMEPAGE=      http://www.cups.org/
 COMMENT=       Common UNIX Printing System
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 CONFLICTS+=    LPRng-[0-9]* LPRng-core-[0-9]*
 
 #PKG_INSTALLATION_TYPES=       overwrite pkgviews
@@ -143,6 +145,9 @@
 SUBST_SED.rpathfix=    -e 's|@EXPORT_LDFLAGS@|${COMPILER_RPATH_FLAG}${LOCALBASE}/lib|g'
 SUBST_STAGE.rpathfix=  post-patch
 
+INSTALLATION_DIRS=     ${DOCDIR} ${EGDIR}
+INSTALL_ENV+=          DSTROOT=${DESTDIR:Q}
+
 pre-configure:
        cd ${WRKSRC} && aclocal && autoconf
 
@@ -150,22 +155,22 @@
        ${CP} ${FILESDIR}/cups.pam ${WRKDIR}/cups.pam
 
 post-install:
-       ${INSTALL_DATA_DIR} ${DOCDIR}
-       for file in LICENSE.txt README.txt; do  \
-               ${INSTALL_DATA} ${WRKSRC}/$${file} ${DOCDIR}/$${file};  \
+       for file in LICENSE.txt README.txt; do                          \
+               ${INSTALL_DATA} ${WRKSRC}/$${file}                      \
+                    ${DESTDIR}${DOCDIR}/$${file}; \
        done
-       ${INSTALL_DATA_DIR} ${EGDIR}
        cd ${WRKSRC}/conf; for file in *.conf mime.*; do                \
                case $${file} in                                        \
                pam.conf)                                               \
                        ;;                                              \
                *)                                                      \
-                       ${INSTALL_DATA} $${file} ${EGDIR}/$${file};     \
+                       ${INSTALL_DATA} $${file}                        \
+                           ${DESTDIR}${EGDIR}/$${file};                \
                        ;;                                              \
                esac;                                                   \
        done
 .if !empty(PKG_OPTIONS:Mpam)
-       ${INSTALL_DATA} ${WRKDIR}/cups.pam ${EGDIR}
+       ${INSTALL_DATA} ${WRKDIR}/cups.pam ${DESTDIR}${EGDIR}
 .endif
 
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index