[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: help: providing ruby-gnome2 gemspec



On Wed, Jul 26, 2017 at 11:13:08PM +0900, dai@debian.org wrote:
> Hi all,
> 
> I am working on #757464 "ruby-gnome2: Please provide rubygem meta-information".
> 
> As first step, I converted from debian/build to dh_ruby (see attached patch).
> AFAICS it builds same packages compared with using debian/build,
> but I think that "export make" and override_dh_auto_install are bit dirty trick.
> Any idea to clean up this?
> 
> Then, it does not generate gemspecs yet.
> Because upstream tarball does not provide any gemspecs.
> 
> * Request upstream to provide gemspecs.
> * Generate gemspecs by some own scripts.
> 
> Which approach I should do?

I think the Rakefile in each submodule should have a task that can be
called to write the gemspec to the current directory, e.g. `rake
gemspec`. See the attached patch, you will want to send that upstream.

then you would call `rake gemspec` for each module on
override_dh_auto_build, and clean them up in override_dh_auto_clean.
Something like this:

MODULES = $(grep-dctrl -n -s X-DhRuby-Root '' debian/control)

override_dh_auto_build:
	for mod in $(MODULES); do (cd $$mod && rake gemspec); done
	dh_auto_build

override_dh_auto_clean:
	for mod in $(MODULES); do (cd $$mod && rm -f *.gemspec); done
	dh_auto_clean

With this, it should all Just Work™.

Attachment: signature.asc
Description: PGP signature


Reply to: