[DRE-maint] Packaging setup.rb?

Antonio Terceiro terceiro at softwarelivre.org
Mon Nov 26 02:22:57 UTC 2007


[long time without activity in this thread ...]

Gunnar Wolf escreveu isso aí:
> Paul van Tilburg dijo [Fri, Nov 09, 2007 at 10:46:05AM +0100]:
> > > Of course - but we can symlink it. We could even make it part of our
> > > cdbs class - If no ./setup.rb is found, then at the beginning of the
> > > build phase we can 'ln -s /usr/lib/ruby/1.8/setup.rb setup.rb', and
> > > remove it in clean if it is a symlink. What do you think?
> > 
> > This doesn't work in the case that the upstream source has an old
> > setup.rb.
> 
> Of course, as backwards compatibility is not guaranteed. Anyway,
> sometimes code is more expressive than words - What do you think of:
> 
> ------------------------------------------------------------
> --- /usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk	2006-08-19 21:29:37.000000000 -0500
> +++ /tmp/ruby-setup-rb.mk	2007-11-09 12:18:24.000000000 -0600
> @@ -34,6 +34,7 @@
>  
>  include /usr/share/ruby-pkg-tools/1/class/ruby-common.mk
>  
> +PACKAGED_RUBY_SETUP_CMD = /usr/lib/ruby/1.8/setup.rb
>  DEB_RUBY_SETUP_CMD = setup.rb
>  DEB_RUBY_CONFIG_ARGS = --siteruby=$(DEB_RUBY_LIBDIR) --siterubyver=$(DEB_RUBY_LIBDIR)/$(cdbs_ruby_ver)
>  DEB_RUBY_CLEAN_TARGET = distclean
> @@ -41,6 +42,7 @@
>  
>  # Build simple packages
>  $(patsubst %,build/%,$(DEB_RUBY_SIMPLE_PACKAGES)) :: build/% :
> +	[ -f $(DEB_RUBY_SETUP_CMD) ] || ln -s $(PACKAGED_RUBY_SETUP_CMD) $(DEB_RUBY_SETUP_CMD)
>  	cd $(DEB_SRCDIR) && /usr/bin/ruby $(DEB_RUBY_SETUP_CMD) config $(DEB_RUBY_CONFIG_ARGS) && /usr/bin/ruby $(DEB_RUBY_SETUP_CMD) setup
>  	$(call push_cfg_file,$(cdbs_curpkg))
>  
> @@ -67,5 +69,6 @@
>  	/usr/bin/ruby $(DEB_RUBY_SETUP_CMD) config $(DEB_RUBY_CONFIG_ARGS)
>  	/usr/bin/ruby $(DEB_RUBY_SETUP_CMD) $(DEB_RUBY_CLEAN_TARGET)
>  	rm -f $(DEB_SRCDIR)/.config-*
> +	[ -L $(DEB_RUBY_SETUP_CMD) ] && rm -f $(DEB_RUBY_SETUP_CMD)
>  
>  endif
> ------------------------------------------------------------

This sounds reasonable to me. After all, as Gunnar said, if the
maintainer saw that there was no setup.rb and still wants to use
ruby-setup-rb.mk ... ;)

BTW, how is setup.rb packaging? Since I have a package (libferret-ruby)
that needs ruby-pkg-tools 0.13 to build correcly (see #420028), I would
be willing to help with that if need.

-- 
Antonio Terceiro <terceiro at softwarelivre.org>
http://people.softwarelivre.org/~terceiro/
GnuPG ID: 0F9CB28F





More information about the Pkg-ruby-extras-maintainers mailing list