diff options
-rw-r--r-- | misc/rubygems/DEINSTALL | 12 | ||||
-rw-r--r-- | misc/rubygems/INSTALL | 12 | ||||
-rw-r--r-- | misc/rubygems/Makefile | 17 | ||||
-rw-r--r-- | misc/rubygems/PLIST | 4 |
4 files changed, 40 insertions, 5 deletions
diff --git a/misc/rubygems/DEINSTALL b/misc/rubygems/DEINSTALL new file mode 100644 index 00000000000..d272743ae1a --- /dev/null +++ b/misc/rubygems/DEINSTALL @@ -0,0 +1,12 @@ +# $NetBSD: DEINSTALL,v 1.1 2011/03/27 13:02:17 taca Exp $ + +RUBYGEM="@PREFIX@/bin/@RUBYGEM_NAME@" + +case ${STAGE} in +DEINSTALL) + ${MV} ${RUBYGEM} ${RUBYGEM}.new + if [ -f ${RUBYGEM}.orig ]; then + ${MV} ${RUBYGEM}.orig ${RUBYGEM} + fi + ;; +esac diff --git a/misc/rubygems/INSTALL b/misc/rubygems/INSTALL new file mode 100644 index 00000000000..f71f36e1205 --- /dev/null +++ b/misc/rubygems/INSTALL @@ -0,0 +1,12 @@ +# $NetBSD: INSTALL,v 1.1 2011/03/27 13:02:17 taca Exp $ + +RUBYGEM="@PREFIX@/bin/@RUBYGEM_NAME@" + +case ${STAGE} in +POST-INSTALL) + if [ -f ${RUBYGEM} ]; then + ${MV} ${RUBYGEM} ${RUBYGEM}.orig + fi + ${CP} -p ${RUBYGEM}.new ${RUBYGEM} + ;; +esac 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" diff --git a/misc/rubygems/PLIST b/misc/rubygems/PLIST index 58a2033fc91..86173ff4d26 100644 --- a/misc/rubygems/PLIST +++ b/misc/rubygems/PLIST @@ -1,5 +1,5 @@ -@comment $NetBSD: PLIST,v 1.16 2011/03/23 14:35:04 taca Exp $ -bin/gem${RUBY_VER} +@comment $NetBSD: PLIST,v 1.17 2011/03/27 13:02:17 taca Exp $ +bin/gem${RUBY_VER}.new ${RUBY_VENDORLIB}/gauntlet_rubygems.rb ${RUBY_VENDORLIB}/rbconfig/datadir.rb ${RUBY_VENDORLIB}/rubygems.rb |