Cross package maker. DEB/RPM generation or conversion. Derived from jordansissel/fpm.

⌈⌋ ⎇ branch:  cross package maker


Check-in [c47500075e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:- Start working on npm source
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c47500075ee6f577a0e4c3a168f1d76c364f3f4f
User & Date: jls@semicomplete.com 2011-01-21 17:24:03
Context
2011-01-22
06:35
Merge branch 'master' of https://github.com/pyro/fpm into pull/3 check-in: aea6334dec user: jls@semicomplete.com tags: trunk
2011-01-21
17:24
- Start working on npm source check-in: c47500075e user: jls@semicomplete.com tags: trunk
01:40
- Version bump check-in: d13a12a08d user: jls@semicomplete.com tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added lib/fpm/source/npm.rb.







































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require "fpm/namespace"
require "fpm/source"
require "fileutils"

class FPM::Source::Npm < FPM::Source
  def get_source(params)
    @npm = @paths.first
  end # def get_source

  def download(npm_name, version=nil)
  end # def download

  def get_metadata
    # set self[:...] values
    # :name
    # :maintainer
    # :url
    # :category
    # :dependencies
  end # def get_metadata

  def make_tarball!(tar_path, builddir)
    tmpdir = "#{tar_path}.dir"
    installdir = "#{tmpdir}/#{::Gem::dir}"
    ::FileUtils.mkdir_p(installdir)
    args = ["gem", "install", "--quiet", "--no-ri", "--no-rdoc",
       "--install-dir", installdir, "--ignore-dependencies", @paths.first]
    system(*args)
    tar(tar_path, ".", tmpdir)

    # TODO(sissel): Make a helper method.
    system(*["gzip", "-f", tar_path])
  end

end # class FPM::Source::Gem