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

⌈⌋ ⎇ branch:  cross package maker


Check-in [7083395b68]

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

Overview
Comment:- move rpm to target/
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7083395b6803910a020f17bfe7ce40d95088d9e6
User & Date: jls@semicomplete.com 2011-01-06 19:15:27
Context
2011-01-07
02:39
- Allow tar to take a chdir option. check-in: 3651b0db11 user: jls@semicomplete.com tags: trunk
2011-01-06
19:15
- move rpm to target/ check-in: 7083395b68 user: jls@semicomplete.com tags: trunk
06:54
- Allow a package name. check-in: 8aa4dad592 user: jls@semicomplete.com tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Deleted lib/fpm/rpm.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
class FPM::Rpm < FPM::Package
  def assemble(params)
    # TODO [Jay] a lot of this is duplication from deb.rb,
    # and can be factored out.

    raise "No package name given. Can't assemble package" if !@name

    root = params['root'] || '.'
    paths = params['paths']
    output = params['output']

    type = "rpm"

    output.gsub!(/VERSION/, "#{@version}-#{@iteration}")
    output.gsub!(/ARCH/, @architecture)

    builddir = "#{Dir.pwd}/build-#{type}-#{File.basename(output)}"

    Dir.mkdir(builddir) if !File.directory?(builddir)

    Dir.chdir root do
      tar("#{builddir}/data.tar", paths)
      system(*["gzip", "-f", "#{builddir}/data.tar"])
    end
  end
end
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































Added lib/fpm/target/rpm.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
class FPM::Rpm < FPM::Package
  def assemble(params)
    # TODO [Jay] a lot of this is duplication from deb.rb,
    # and can be factored out.

    raise "No package name given. Can't assemble package" if !@name

    root = params['root'] || '.'
    paths = params['paths']
    output = params['output']

    type = "rpm"

    output.gsub!(/VERSION/, "#{@version}-#{@iteration}")
    output.gsub!(/ARCH/, @architecture)

    builddir = "#{Dir.pwd}/build-#{type}-#{File.basename(output)}"

    Dir.mkdir(builddir) if !File.directory?(builddir)

    Dir.chdir root do
      tar("#{builddir}/data.tar", paths)
      system(*["gzip", "-f", "#{builddir}/data.tar"])
    end
  end
end