pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/rubygems + Rename some variables and modify a few...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7d721b1dfac8
branches: trunk
changeset: 539802:7d721b1dfac8
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Mar 13 18:45:05 2008 +0000
description:
+ Rename some variables and modify a few definitions so that we match
the same variables used in rubygem.mk.
+ Use a GENERATE_PLIST statement instead of manually generating a
PLIST_DYNAMIC file. This code is copied from RUBYGEM_GENERATE_PLIST
in rubygem.mk.
+ Use INSTALL_ENV, which is meant to contain the extra environment
bits for use during installation.
diffstat:
misc/rubygems/Makefile | 46 +++++++++++++++++++++-------------------------
1 files changed, 21 insertions(+), 25 deletions(-)
diffs (73 lines):
diff -r 1637e3a08a6d -r 7d721b1dfac8 misc/rubygems/Makefile
--- a/misc/rubygems/Makefile Thu Mar 13 18:29:20 2008 +0000
+++ b/misc/rubygems/Makefile Thu Mar 13 18:45:05 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2008/03/12 15:07:47 jlam Exp $
+# $NetBSD: Makefile,v 1.17 2008/03/13 18:45:05 jlam Exp $
DISTNAME= rubygems-1.0.1
PKGREVISION= 2
@@ -21,23 +21,31 @@
REPLACE_RUBY_DIRS= ${WRKSRC}/bin
REPLACE_RUBY_PAT= [a-z]*
-GEMS_SUBDIR= lib/ruby/gems/${RUBY_VER_DIR}
-REQD_DIRS= ${GEMS_SUBDIR:H}
-REQD_DIRS+= ${GEMS_SUBDIR}
-REQD_DIRS+= ${GEMS_SUBDIR}/cache
-REQD_DIRS+= ${GEMS_SUBDIR}/doc
-REQD_DIRS+= ${GEMS_SUBDIR}/gems
-REQD_DIRS+= ${GEMS_SUBDIR}/specifications
+GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR}
+GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME}
-PLIST_SRC= ${PKGDIR}/PLIST.common
-PLIST_SRC+= ${WRKDIR}/PLIST_DYNAMIC
+REQD_DIRS= ${GEM_HOME:H}
+REQD_DIRS+= ${GEM_HOME}
+REQD_DIRS+= ${GEM_HOME}/cache
+REQD_DIRS+= ${GEM_HOME}/doc
+REQD_DIRS+= ${GEM_HOME}/gems
+REQD_DIRS+= ${GEM_HOME}/specifications
+
+# Generate a dynamic PLIST for the rubygems documentation directory.
+GENERATE_PLIST+= \
+ ${ECHO} "@comment The following lines are automatically generated." && \
+ ( cd ${DESTDIR}${PREFIX} && \
+ ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \
+ ${SORT} && \
+ ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} -type d -print | \
+ ${SORT} -r | ${SED} -e "s,^,@dirrm ," );
.include "../../lang/ruby/modules.mk"
# Force the Gem repository to be under ${DESTDIR}. This is harmless
# because this packages depends on no other gems.
#
-MAKE_ENV+= GEM_HOME=${DESTDIR}${PREFIX}/${GEMS_SUBDIR}
+INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME}
INSTALL_TARGET= install
INSTALL_TARGET+= --format-executable
@@ -49,19 +57,7 @@
# command to install.
#
do-install:
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${RUBY} setup.rb \
- ${INSTALL_TARGET}
-
-post-install:
- ${RM} -f ${WRKDIR}/PLIST_DYNAMIC
- cd ${DESTDIR}${PREFIX} && \
- ${FIND} ${GEMS_SUBDIR}/doc/${DISTNAME} \! -type d -print \
- | ${SORT} \
- >> ${WRKDIR}/PLIST_DYNAMIC
- cd ${DESTDIR}${PREFIX} && \
- ${FIND} ${GEMS_SUBDIR}/doc/${DISTNAME} -type d -print \
- | ${SORT} -r \
- | ${SED} -e "s/^/@dirrm /" \
- >> ${WRKDIR}/PLIST_DYNAMIC
+ cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
+ ${RUBY} setup.rb ${INSTALL_TARGET}
.include "../../mk/bsd.pkg.mk"
Home |
Main Index |
Thread Index |
Old Index