diff options
author | jlam <jlam@pkgsrc.org> | 2008-03-13 18:45:05 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2008-03-13 18:45:05 +0000 |
commit | 73af02e25b5edaf13a1cd2412d324584765a804c (patch) | |
tree | cb695e27c9ec066414dcb9fef78549032463900a /misc/rubygems | |
parent | 37de960a0966f923f81172c4bf8ae88f174b4c68 (diff) | |
download | pkgsrc-73af02e25b5edaf13a1cd2412d324584765a804c.tar.gz |
+ 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 (limited to 'misc/rubygems')
-rw-r--r-- | misc/rubygems/Makefile | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/misc/rubygems/Makefile b/misc/rubygems/Makefile index 8e3f055fc5a..38f304c0783 100644 --- a/misc/rubygems/Makefile +++ b/misc/rubygems/Makefile @@ -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 @@ RUBY_REQD= 1.8.3 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 - -PLIST_SRC= ${PKGDIR}/PLIST.common -PLIST_SRC+= ${WRKDIR}/PLIST_DYNAMIC +GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR} +GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME} + +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 @@ INSTALL_TARGET+= --buildroot=${DESTDIR:Q} # 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" |