> On Fri, Jul 08, 2005 at 04:56:22PM +0200, Jonathan Weiss wrote:
>> I'm working on some Ruby ports. One of them (rubygems) is a package
>> management for ruby libraries and applications (similar to Perl/CPAN or
>> PHP/Pear).
> 
> Good idea... i've done something similar in the past, but had no time to
> integrate it cleanly.
> My way was to create the ports so they fetched the gem-package and
> installed it locally so i could generate the plist.
> 

That is my way, download the gem and install it locally.
>From the common Makefile in devel/ruby-gems:
-----------------------------------
MODULES= lang/ruby

RUN_DEPENDS+=::devel/ruby-gems
LIB_DEPENDS+=::devel/ruby-gems

PKGNAME=        gem-${DISTNAME}

EXTRACT_SUFX= .gem
NO_EXTRACT= YES

NO_BUILD=       Yes
.if !target(do-regress)
NO_REGRESS= Yes
.endif


GEMS_BASE_DIR= lib/ruby/gems/${REV}
GEMS_DIR= ${GEMS_BASE_DIR}/gems
DOC_DIR= ${GEMS_BASE_DIR}/doc
CACHE_DIR= ${GEMS_BASE_DIR}/cache
SPEC_DIR= ${GEMS_BASE_DIR}/specifications

SUBST_VARS= GEMS_BASE_DIR GEMS_DIR DOC_DIR CACHE_DIR SPEC_DIR DISTNAME

RUBYGEMBIN= ${LOCALBASE}/bin/gem

do-install:
  mkdir -p ${PREFIX}/lib/ruby/gems/${REV} && \
  ${RUBYGEMBIN} install --install-dir ${PREFIX}/lib/ruby/gems/${REV}
${FULLDISTDIR}/${DISTNAME}${EXTRACT_SUFX}
-----------------------------------

This not done but I hope to finish it over the weekend.

> 
> Regards,
> Simon
> 

Greets,
Jonathan

--
Jonathan Weiss
http://blog.innerewut.de


Reply via email to