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

Re: gemspec



On Sat, Oct 17, 2015 at 12:33 PM, Kai Noda <nodakai@gmail.com> wrote:
> Hi Per,
>
>> * The ruby-watchman package is empty, did you forget to install it
>>   in dh_auto_install target?
>
>
> That's the point, what is the correct way to generate a ruby script package
> out of the upstream-provided .gemspec file?  It doesn't seem to be an
> appropriate way to run gem2deb against a dynamically generated
> ruby-watchman.gem file.

I managed to build from your source directory by doing the following:

* add build-depends gem2deb and rake-compiler

* adding ruby to the dh --with statement in the catch all target (%)

* adding --buildsystem=ruby to the above mentioned dh statement

* using dh_ruby --install in override_dh_auto_install

* patch the Rakefile to use a rake extension to put the ruby extension
  together with the ruby code, something like this:

    +require 'rake/extensiontask'
    +
    +Rake::ExtensionTask.new("ruby-watchman/ext") do |ext|
    +  ext.lib_dir = "lib/ruby-watchman"
    +end

* removing manual copying of the watchman(1) man page and use
  debian/watchman.manpages. (Or ensure that /usr/share/man/man1
  exists.)


I am a bit unsure if it works though, I couldn't require 'ruby-watchman/ext'
from the installed package...


> Also I wonder if I support multiple versions of
> ruby in some ways.

Yes, X(S|B)-Ruby-Versions, in source and binary package stanzas in
debian/control. For more info see

    https://wiki.debian.org/Teams/Ruby/Packaging#Values_of_XS-Ruby-Versions

At the moment I guess ruby2.1 and ruby2.2 are supported, which are
the ones being built for if you supply "all".


--
Per

PS. I didn't realize that this is not a Ruby package but only includes a
Ruby gem. It doesn't make sense to put in the pkg-ruby-extras repo of
course. :-)


Reply to: