pkgsrc/misc/rubygems/Makefile
taca 3cbf3fe9eb Update rubygems package to 1.8.17.
=== 1.8.17 / 2012-02-17

* 2 minor enhancements:

  * Add MacRuby to the list of special cases for platforms (ferrous26)
  * Add a default for where to install rubygems itself

* 3 bug fixes:

  * Fixed gem loading issue caused by dependencies not resolving.
  * Fixed umask error when stdlib is required and unresolved dependencies exist.
  * Shebang munging would only take one arg after the cmd
  * Define SUCKAGE better, ie only MRI 1.9.2
  * Propagate env-shebang to the pristine command if set for install.


=== 1.8.16 / 2012-02-12

* 3 bug fixes:

  * Fix gem specification loading when encoding is not UTF-8. #146
  * Allow group writable if umask allows it already.
  * Uniquify the spec list based on directory order priority
2012-02-19 16:32:43 +00:00

80 lines
2.3 KiB
Makefile

# $NetBSD: Makefile,v 1.46 2012/02/19 16:32:43 taca Exp $
DISTNAME= rubygems-1.8.17
CATEGORIES= misc ruby
MASTER_SITES= http://production.cf.rubygems.org/rubygems/ \
http://rubyforge.org/frs/download.php/75309/
EXTRACT_SUFX= .tgz
MAINTAINER= taca@NetBSD.org
HOMEPAGE= http://www.rubygems.org/
COMMENT= Ruby standard for publishing and managing third party libraries
LICENSE= gnu-gpl-v2 OR ruby-license
PKG_DESTDIR_SUPPORT= user-destdir
CONFLICTS+= rubygems-[0-9]*
.include "../../mk/bsd.prefs.mk"
NO_CONFIGURE= yes
NO_BUILD= yes
REPLACE_RUBY_DIRS= bin
REPLACE_RUBY_PAT= [a-z]*
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
SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-install
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." && \
cd ${DESTDIR}${PREFIX} && \
${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \
${SORT};
# Force the Gem repository to be under ${DESTDIR}. This is harmless
# because this package depends on no other gems.
#
INSTALL_ENV+= GEM_HOME=${DESTDIR}${PREFIX}/${GEM_HOME}
INSTALL_ENV+= GEM_PATH=${DESTDIR}${PREFIX}/${GEM_HOME}
INSTALL_TARGET= install
INSTALL_TARGET+= --vendor
.if ${_USE_DESTDIR} != "no"
INSTALL_TARGET+= --destdir=${DESTDIR:Q}
.endif
# rubygem's setup.rb is not the typical setup.rb -- manually run the
# 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"