Class FPM::Package
In: lib/fpm/package.rb
lib/fpm/namespace.rb
lib/fpm/package.rb
lib/fpm/namespace.rb
Parent: Object

This class is the parent of all packages. If you want to implement an FPM package type, you‘ll inherit from this.

Methods

Included Modules

FPM::Util Cabin::Inspectable FPM::Util Cabin::Inspectable

Classes and Modules

Class FPM::Package::APK
Class FPM::Package::CPAN
Class FPM::Package::Deb
Class FPM::Package::Dir
Class FPM::Package::Empty
Class FPM::Package::FileAlreadyExists
Class FPM::Package::FreeBSD
Class FPM::Package::Gem
Class FPM::Package::InvalidArgument
Class FPM::Package::NPM
Class FPM::Package::OSXpkg
Class FPM::Package::P5P
Class FPM::Package::PEAR
Class FPM::Package::Pacman
Class FPM::Package::ParentDirectoryMissing
Class FPM::Package::Pkgin
Class FPM::Package::PleaseRun
Class FPM::Package::Puppet
Class FPM::Package::Python
Class FPM::Package::RPM
Class FPM::Package::Sh
Class FPM::Package::Solaris
Class FPM::Package::Tar
Class FPM::Package::Virtualenv
Class FPM::Package::Zip

Attributes

architecture  [RW]  What architecture is this package for?
architecture  [RW]  What architecture is this package for?
attributes  [RW]  Any other attributes specific to this package. This is where you‘d put rpm, deb, or other specific attributes.
attributes  [RW]  Any other attributes specific to this package. This is where you‘d put rpm, deb, or other specific attributes.
attrs  [RW] 
attrs  [RW] 
category  [RW]  The category of this package. RedHat calls this ‘Group’ Debian calls this ‘Section’ FreeBSD would put this in /usr/ports/<category>/…
category  [RW]  The category of this package. RedHat calls this ‘Group’ Debian calls this ‘Section’ FreeBSD would put this in /usr/ports/<category>/…
config_files  [RW]  Array of configuration files
config_files  [RW]  Array of configuration files
conflicts  [RW]  Array of things this package conflicts with. (Not all packages support this)
conflicts  [RW]  Array of things this package conflicts with. (Not all packages support this)
dependencies  [RW]  Array of dependencies.
dependencies  [RW]  Array of dependencies.
description  [RW]  a summary or description of the package
description  [RW]  a summary or description of the package
directories  [RW] 
directories  [RW] 
epoch  [RW]  The epoch version of this package This is used most when an upstream package changes it‘s versioning style so standard comparisions wouldn‘t work.
epoch  [RW]  The epoch version of this package This is used most when an upstream package changes it‘s versioning style so standard comparisions wouldn‘t work.
iteration  [RW]  The iteration of this package.
  Debian calls this 'release' and is the last '-NUMBER' in the version
  RedHat has this as 'Release' in the .spec file
  FreeBSD calls this 'PORTREVISION'

Iteration can be nil. If nil, the fpm package implementation is expected to handle any default value that should be instead.

iteration  [RW]  The iteration of this package.
  Debian calls this 'release' and is the last '-NUMBER' in the version
  RedHat has this as 'Release' in the .spec file
  FreeBSD calls this 'PORTREVISION'

Iteration can be nil. If nil, the fpm package implementation is expected to handle any default value that should be instead.

license  [RW]  A identifier representing the license. Any string is fine.
license  [RW]  A identifier representing the license. Any string is fine.
maintainer  [RW]  Who maintains this package? This could be the upstream author or the package maintainer. You pick.
maintainer  [RW]  Who maintains this package? This could be the upstream author or the package maintainer. You pick.
name  [RW]  The name of this package
name  [RW]  The name of this package
provides  [RW]  Array of things this package provides. (Not all packages support this)
provides  [RW]  Array of things this package provides. (Not all packages support this)
replaces  [RW]  Array of things this package replaces. (Not all packages support this)
replaces  [RW]  Array of things this package replaces. (Not all packages support this)
scripts  [RW]  hash of scripts for maintainer/package scripts (postinstall, etc)

The keys are :before_install, etc The values are the text to use in the script.

scripts  [RW]  hash of scripts for maintainer/package scripts (postinstall, etc)

The keys are :before_install, etc The values are the text to use in the script.

url  [RW]  URL for this package. Could be the homepage. Could be the download url. You pick.
url  [RW]  URL for this package. Could be the homepage. Could be the download url. You pick.
vendor  [RW]  A identifier representing the vendor. Any string is fine. This is usually who produced the software.
vendor  [RW]  A identifier representing the vendor. Any string is fine. This is usually who produced the software.
version  [RW]  The version of this package (the upstream version)
version  [RW]  The version of this package (the upstream version)

Public Class methods

Public Instance methods

Clean up any temporary storage used by this class.

Clean up any temporary storage used by this class.

Convert this package to a new package type

Convert this package to a new package type

This method is invoked on a package when it has been converted to a new package format. The purpose of this method is to do any extra conversion steps, like translating dependency conditions, etc.

This method is invoked on a package when it has been converted to a new package format. The purpose of this method is to do any extra conversion steps, like translating dependency conditions, etc.

List all files in the staging_path

The paths will all be relative to staging_path and will not include that path.

This method will emit ‘leaf’ paths. Files, symlinks, and other file-like things are emitted. Intermediate directories are ignored, but empty directories are emitted.

List all files in the staging_path

The paths will all be relative to staging_path and will not include that path.

This method will emit ‘leaf’ paths. Files, symlinks, and other file-like things are emitted. Intermediate directories are ignored, but empty directories are emitted.

Add a new source to this package. The exact behavior depends on the kind of package being managed.

For instance:

The idea is that you can keep pumping in new things to a package for later conversion or output.

Implementations are expected to put files relevant to the ‘input’ in the staging_path

Add a new source to this package. The exact behavior depends on the kind of package being managed.

For instance:

The idea is that you can keep pumping in new things to a package for later conversion or output.

Implementations are expected to put files relevant to the ‘input’ in the staging_path

Output this package to the given path.

Output this package to the given path.

Get the contents of the script by a given name.

If template_scripts? is set in attributes (often by the —template-scripts flag), then apply it as an ERB template.

Get the contents of the script by a given name.

If template_scripts? is set in attributes (often by the —template-scripts flag), then apply it as an ERB template.

Get the ‘type’ for this instance.

For FPM::Package::ABC, this returns ‘abc‘

Get the ‘type’ for this instance.

For FPM::Package::ABC, this returns ‘abc‘

Get the version of this package

Get the version of this package

[Validate]