/[gentoo-x86]/eclass/ruby-fakegem.eclass
Gentoo

Diff of /eclass/ruby-fakegem.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.27 Revision 1.29
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.27 2010/12/28 12:07:15 graaff Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.29 2011/04/25 08:36:51 graaff Exp $
4# 4#
5# @ECLASS: ruby-fakegem.eclass 5# @ECLASS: ruby-fakegem.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# 8#
159 ruby_fakegem_metadata_gemspec ${metadata} ${gemspec} 159 ruby_fakegem_metadata_gemspec ${metadata} ${gemspec}
160 else 160 else
161 ruby_fakegem_genspec ${gemspec} 161 ruby_fakegem_genspec ${gemspec}
162 fi 162 fi
163 fi 163 fi
164 ) || "Unable to generate gemspec file." 164 ) || die "Unable to generate gemspec file."
165 165
166 insinto $(ruby_fakegem_gemsdir)/specifications 166 insinto $(ruby_fakegem_gemsdir)/specifications
167 newins ${gemspec} ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec || die "Unable to install gemspec file." 167 newins ${gemspec} ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec || die "Unable to install gemspec file."
168} 168}
169 169
210 # copies with different implementations; while for now we're using 210 # copies with different implementations; while for now we're using
211 # the same exact content, we might have differences in the future, 211 # the same exact content, we might have differences in the future,
212 # so better taking this into consideration. 212 # so better taking this into consideration.
213 local quoted_description=${DESCRIPTION//\"/\\\"} 213 local quoted_description=${DESCRIPTION//\"/\\\"}
214 cat - > $1 <<EOF 214 cat - > $1 <<EOF
215# generated by ruby-fakegem.eclass $Revision: 1.27 $ 215# generated by ruby-fakegem.eclass $Revision: 1.29 $
216Gem::Specification.new do |s| 216Gem::Specification.new do |s|
217 s.name = "${RUBY_FAKEGEM_NAME}" 217 s.name = "${RUBY_FAKEGEM_NAME}"
218 s.version = "${RUBY_FAKEGEM_VERSION}" 218 s.version = "${RUBY_FAKEGEM_VERSION}"
219 s.summary = "${quoted_description}" 219 s.summary = "${quoted_description}"
220 s.homepage = "${HOMEPAGE}" 220 s.homepage = "${HOMEPAGE}"
260 260
261 cat - > "${T}"/gembin-wrapper-${gembinary} <<EOF 261 cat - > "${T}"/gembin-wrapper-${gembinary} <<EOF
262#!${rubycmd} 262#!${rubycmd}
263# This is a simplified version of the RubyGems wrapper 263# This is a simplified version of the RubyGems wrapper
264# 264#
265# Generated by ruby-fakegem.eclass $Revision: 1.27 $ 265# Generated by ruby-fakegem.eclass $Revision: 1.29 $
266 266
267require 'rubygems' 267require 'rubygems'
268 268
269load Gem::default_path[-1] + "/gems/${relativegembinary}" 269load Gem::default_path[-1] + "/gems/${relativegembinary}"
270 270
293 # extracted twice and the mtime from the archive _has_ to be 293 # extracted twice and the mtime from the archive _has_ to be
294 # ignored (it's always set to epoch 0). 294 # ignored (it's always set to epoch 0).
295 for archive in ${A}; do 295 for archive in ${A}; do
296 case "${archive}" in 296 case "${archive}" in
297 *.gem) 297 *.gem)
298 # Make sure that we're not running unoack for more than 298 # Make sure that we're not running unpack for more than
299 # one .gem file, since we won't support that at all. 299 # one .gem file, since we won't support that at all.
300 [[ -d "${S}" ]] && die "Unable to unpack ${archive}, ${S} exists" 300 [[ -d "${S}" ]] && die "Unable to unpack ${archive}, ${S} exists"
301 301
302 ebegin "Unpacking .gem file..." 302 ebegin "Unpacking .gem file..."
303 tar -mxf ${DISTDIR}/${archive} || die 303 tar -mxf ${DISTDIR}/${archive} || die

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20