pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www Add support for user-destdir installation.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/19f8111f29ad
branches:  trunk
changeset: 539480:19f8111f29ad
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Mar 07 05:06:16 2008 +0000

description:
Add support for user-destdir installation.

diffstat:

 www/firefox3-bin/Makefile         |   4 +++-
 www/seamonkey-bin/Makefile.common |  29 +++++++++++++++--------------
 2 files changed, 18 insertions(+), 15 deletions(-)

diffs (85 lines):

diff -r 4d0ccf810ae9 -r 19f8111f29ad www/firefox3-bin/Makefile
--- a/www/firefox3-bin/Makefile Thu Mar 06 22:16:20 2008 +0000
+++ b/www/firefox3-bin/Makefile Fri Mar 07 05:06:16 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/02/29 23:01:03 xtraeme Exp $
+# $NetBSD: Makefile,v 1.2 2008/03/07 05:08:40 jlam Exp $
 
 MOZILLA=               firefox
 MOZ_VER=               3.0b3
@@ -12,4 +12,6 @@
 EMUL_PLATFORMS=                linux-i386
 #EMUL_PLATFORMS+=      solaris-i386 solaris-sparc
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 .include "../../www/seamonkey-bin/Makefile.common"
diff -r 4d0ccf810ae9 -r 19f8111f29ad www/seamonkey-bin/Makefile.common
--- a/www/seamonkey-bin/Makefile.common Thu Mar 06 22:16:20 2008 +0000
+++ b/www/seamonkey-bin/Makefile.common Fri Mar 07 05:06:16 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.12 2008/02/13 14:43:00 obache Exp $
+# $NetBSD: Makefile.common,v 1.13 2008/03/07 05:06:16 jlam Exp $
 
 DISTNAME=              ${MOZILLA}${MOX_EXTRA}-bin      # overridden below
 PKGNAME=               ${MOZILLA}${MOZ_EXTRA}-bin-${MOZ_VER}
@@ -66,14 +66,15 @@
        ${CP} ${MOZILLA_SCRIPT} ${WRKDIR}/${MOZILLA}.sh
 
 do-install:
-       ${INSTALL_DATA_DIR} ${MOZILLA_LIB}
-       cd ${WRKSRC} && ${PAX} -rw -pm . ${MOZILLA_LIB}
-       ${INSTALL_SCRIPT} ${WRKDIR}/${MOZILLA}.sh ${PREFIX}/bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM}
-       @${FIND} ${MOZILLA_LIB} -type f -print \
+       ${INSTALL_DATA_DIR} ${DESTDIR}${MOZILLA_LIB}
+       cd ${WRKSRC} && ${PAX} -rw -pm . ${DESTDIR}${MOZILLA_LIB}
+       ${INSTALL_SCRIPT} ${WRKDIR}/${MOZILLA}.sh \
+               ${DESTDIR}${PREFIX}/bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM}
+       @${FIND} ${DESTDIR}${MOZILLA_LIB} -type f -print \
                | ${XARGS} ${CHMOD} a+r
-       @${FIND} ${MOZILLA_LIB} \( -type f -o -perm -u+x \) -print \
+       @${FIND} ${DESTDIR}${MOZILLA_LIB} \( -type f -o -perm -u+x \) -print \
                | ${XARGS} ${CHMOD} a+rx
-       @${FIND} ${MOZILLA_LIB} -type d -print \
+       @${FIND} ${DESTDIR}${MOZILLA_LIB} -type d -print \
                | ${XARGS} ${CHMOD} a+rx
 
 # builds typically want exactly 'libgtk-1.2.so.0', etc. symlink them
@@ -81,7 +82,7 @@
 post-install:
 .if defined(EMUL_IS_NATIVE)
 .  if defined(MOZ_GTK2) && !empty(MOZ_GTK2:M[Yy][Ee][Ss])
-       @cd ${MOZILLA_LIB} && \
+       @cd ${DESTDIR}${MOZILLA_LIB} &&                                 \
        ${LN} -s ${PREFIX}/lib/libatk-1.0.*so* .;                       \
        ${LN} -s ${X11PREFIX}/lib/libgdk-x11-2.0.*so* .;                \
        ${LN} -s ${PREFIX}/lib/libgdk_pixbuf-2.0.*so* .;                \
@@ -104,7 +105,7 @@
        ${LN} -s libpangox-1.0.so libpangox-1.0.so.0;                   \
        ${LN} -s libpangoxft-1.0.so libpangoxft-1.0.so.0
 .  else
-       @cd ${MOZILLA_LIB} && \
+       @cd ${DESTDIR}${MOZILLA_LIB} &&                                 \
        ${LN} -s ${PREFIX}/lib/libglib.*so* .;                          \
        ${LN} -s ${PREFIX}/lib/libgmodule.*so* .;                       \
        ${LN} -s ${X11PREFIX}/lib/libgdk.*so* .;                        \
@@ -115,14 +116,14 @@
        ${LN} -s libgmodule.so libgmodule-1.2.so.0
 .  endif
 .endif
-       @${INSTALL_DATA_DIR} ${PREFIX}/lib/mozilla-linux/plugins
+       @${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/mozilla-linux/plugins
 
 GENERATE_PLIST+=                                                       \
        ${ECHO} bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM};             \
-       ${FIND} ${MOZILLA_LIB} \( -type f -o -type l \) -print          \
-               | ${SORT} | ${SED} -e "s,${PREFIX}/,,g";                \
-       ${FIND} ${MOZILLA_LIB} -type d -print                           \
-               | ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g";      \
+       ${FIND} ${DESTDIR}${MOZILLA_LIB} \( -type f -o -type l \) -print\
+               | ${SORT} | ${SED} -e "s,${DESTDIR}${PREFIX}/,,g";      \
+       ${FIND} ${DESTDIR}${MOZILLA_LIB} -type d -print                 \
+               | ${SORT} -r | ${SED} -e "s,${DESTDIR}${PREFIX}/,@dirrm ,g"; \
        ${ECHO} "@exec ${MKDIR} %D/lib/mozilla-linux/plugins";
 
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index