summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-03-12 18:53:35 +0000
committerjlam <jlam@pkgsrc.org>2008-03-12 18:53:35 +0000
commit112d0b9b5332c11dbe5bc7217c6f614134e7dc1d (patch)
treef6fe83b29be859efece30eee57ce9d19f78ca918 /misc
parentf8cb5229fcdeaa58ff16e1e26cde581cadde4a71 (diff)
downloadpkgsrc-112d0b9b5332c11dbe5bc7217c6f614134e7dc1d.tar.gz
+ For print-PLIST, don't output any files or directories in
${GEM_DOCDIR} as those are automatically listed by RUBYGEM_GENERATE_PLIST. + Clean up the intermediate build files in the "ext" directory of installed gem by removing everything that's not also in the unpacked gem.
Diffstat (limited to 'misc')
-rw-r--r--misc/rubygems/rubygem.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/misc/rubygems/rubygem.mk b/misc/rubygems/rubygem.mk
index 488ed2d834a..1a623602d61 100644
--- a/misc/rubygems/rubygem.mk
+++ b/misc/rubygems/rubygem.mk
@@ -1,4 +1,4 @@
-# $NetBSD: rubygem.mk,v 1.4 2008/03/12 16:59:13 jlam Exp $
+# $NetBSD: rubygem.mk,v 1.5 2008/03/12 18:53:35 jlam Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install Ruby gems.
@@ -88,7 +88,7 @@ PLIST_SUBST+= GEM_DOCDIR=${GEM_DOCDIR:S|^${PREFIX}/||}
PRINT_PLIST_AWK+= /^(@dirrm )?${GEM_LIBDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
{ gsub(/${GEM_LIBDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${GEM_LIBDIR}"); print; next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEM_DOCDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
- { gsub(/${GEM_DOCDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${GEM_DOCDIR}"); print; next; }
+ { next; }
PRINT_PLIST_AWK+= /^@dirrm ${GEM_HOME:S|${PREFIX}/||:S|/|\\/|g}(\/(gems|cache|doc|specifications))?$$/ \
{ next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEM_HOME:S|${PREFIX}/||:S|/|\\/|g}/ \
@@ -155,6 +155,14 @@ do-gem-install:
@${STEP_MSG} "Installing gem into buildroot"
${RUN} ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
${RUBYGEM} install ${_RUBYGEM_OPTIONS}
+ @${STEP_MSG} "Cleaning up intermediate gem build files"
+ ${RUN} cd ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR}/ext && ls | \
+ while read file; do \
+ if [ ! -f ${WRKSRC}/ext/$$file ]; then \
+ echo "rm "${GEM_LIBDIR:T}"/ext/$$file"; \
+ rm -f $$file; \
+ fi; \
+ done
@${STEP_MSG} "Copying files into installation directory"
${RUN} cd ${_RUBYGEM_BUILDROOT}${PREFIX} && \
pax -rwpe . ${DESTDIR}${PREFIX}