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

⌈⌋ ⎇ branch:  cross package maker


Check-in [17fb692e02]

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

Overview
Comment:very rough initial pkgin support for fpm
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 17fb692e02af18776e77b22708cf792bf78846b6
User & Date: brian.akins@turner.com 2013-10-04 18:14:21
Context
2013-10-29
21:03
Merge pull request #567 from bakins/smartos Smartos pkgsrc initial rough support check-in: 0089ef6ef0 user: jls@semicomplete.com tags: trunk
2013-10-04
18:14
very rough initial pkgin support for fpm check-in: 17fb692e02 user: brian.akins@turner.com tags: trunk
18:13
Add pkgin check-in: 8d033299cc user: brian.akins@turner.com tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added lib/fpm/package/pkgin.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
class FPM::Package::Pkgin < FPM::Package

  def output(output_path)
    output_check(output_path)

    File.write(build_path("build-info"), `pkg_info -X pkg_install | egrep '^(MACHINE_ARCH|OPSYS|OS_VERSION|PKGTOOLS_VERSION)'`)

    cwd = ::Dir.pwd
    ::Dir.chdir(staging_path)

    files = []
    Find.find(".") do |path|
      stat = File.lstat(path)
      next unless stat.symlink? or stat.file?
      files << path
    end
    ::Dir.chdir(cwd)

    File.write(build_path("packlist"), files.sort.join("\n"))

    File.write(build_path("comment"),  self.description + "\n")

    File.write(build_path("description"), self.description + "\n")

    args = [ "-B", build_path("build-info"), "-c", build_path("comment"), "-d", build_path("description"), "-f", build_path("packlist"), "-I", "/opt/local", "-p", staging_path,  "-U", "#{cwd}/#{name}-#{self.version}-#{iteration}.tgz" ]
    safesystem("pkg_create", *args)

  end

  def iteration
    return @iteration ? @iteration : 1
  end

end