1 # $NetBSD: Makefile,v 1.29 2009/09/25 16:09:00 minskim Exp $
3 DISTNAME= rubygems-1.3.5
6 MASTER_SITES= http://rubyforge.org/frs/download.php/60718/
9 MAINTAINER= minskim@NetBSD.org
10 HOMEPAGE= http://www.rubygems.org/
11 COMMENT= Ruby standard for publishing and managing third party libraries
13 PKG_DESTDIR_SUPPORT= user-destdir
15 .include "../../mk/bsd.prefs.mk"
21 REPLACE_RUBY_DIRS= bin
22 REPLACE_RUBY_PAT= [a-z]*
24 GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR}
25 GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME}
27 REQD_DIRS= ${GEM_HOME:H}
28 REQD_DIRS+= ${GEM_HOME}
29 REQD_DIRS+= ${GEM_HOME}/cache
30 REQD_DIRS+= ${GEM_HOME}/doc
31 REQD_DIRS+= ${GEM_HOME}/gems
32 REQD_DIRS+= ${GEM_HOME}/specifications
35 SUBST_STAGE.conf= pre-install
36 SUBST_FILES.conf= lib/rubygems/config_file.rb
37 SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
38 SUBST_MESSAGE.conf= Fixing configuration files.
41 # Generate a dynamic PLIST for the rubygems documentation directory.
43 ${ECHO} "@comment The following lines are automatically generated." && \
44 cd ${DESTDIR}${PREFIX} && \
45 ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \
48 .include "../../lang/ruby/modules.mk"
50 # Force the Gem repository to be under ${DESTDIR}. This is harmless
51 # because this package depends on no other gems.
53 INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME}
54 INSTALL_ENV+= GEM_PATH=${DESTDIR}${GEM_HOME}
56 INSTALL_TARGET= install
57 INSTALL_TARGET+= --vendor
58 INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18"
59 .if ${_USE_DESTDIR} != "no"
60 INSTALL_TARGET+= --destdir=${DESTDIR:Q}
63 # rubygem's setup.rb is not the typical setup.rb -- manually run the
67 cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
68 ${RUBY} setup.rb ${INSTALL_TARGET}
70 .include "../../mk/bsd.pkg.mk"