summaryrefslogtreecommitdiff
path: root/misc/rubygems/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'misc/rubygems/Makefile')
-rw-r--r--misc/rubygems/Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/misc/rubygems/Makefile b/misc/rubygems/Makefile
index d9a0725c78b..0b6fb579181 100644
--- a/misc/rubygems/Makefile
+++ b/misc/rubygems/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.37 2011/03/23 14:35:04 taca Exp $
+# $NetBSD: Makefile,v 1.38 2011/03/27 13:02:17 taca Exp $
DISTNAME= rubygems-1.6.2
+PKGREVISION= 1
CATEGORIES= misc ruby
MASTER_SITES= http://production.cf.rubygems.org/rubygems/ \
http://rubyforge.org/frs/download.php/74445/
@@ -19,9 +20,7 @@ CONFLICTS+= rubygems-[0-9]*
NO_CONFIGURE= yes
NO_BUILD= yes
-RUBY_VERSION= ${RUBY18_VERSION}
-RUBY_VERSION_SUPPORTED= 18
REPLACE_RUBY_DIRS= bin
REPLACE_RUBY_PAT= [a-z]*
@@ -40,6 +39,8 @@ SUBST_FILES.conf= lib/rubygems/config_file.rb
SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
SUBST_MESSAGE.conf= Fixing configuration files.
+FILES_SUBST+= RUBYGEM_NAME=${RUBYGEM_NAME}
+
# Generate a dynamic PLIST for the rubygems documentation directory.
GENERATE_PLIST+= \
${ECHO} "@comment The following lines are automatically generated." && \
@@ -63,8 +64,18 @@ INSTALL_TARGET+= --destdir=${DESTDIR:Q}
# command to install.
#
do-install:
+ if [ -f ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} ]; then \
+ ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} \
+ ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig; \
+ fi
cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
${RUBY} setup.rb ${INSTALL_TARGET}
+ ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} \
+ ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.new
+ if [ -f ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig ]; then \
+ ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig \
+ ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}; \
+ fi
.include "../../lang/ruby/modules.mk"
.include "../../mk/bsd.pkg.mk"