Skip to content

Instantly share code, notes, and snippets.

@christianchristensen
Last active December 19, 2015 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianchristensen/5948396 to your computer and use it in GitHub Desktop.
Save christianchristensen/5948396 to your computer and use it in GitHub Desktop.
Packaging (with FPM)

Packaging with fpm

Note: remove .git reference prior to putting files in a package. Note: -e option allows specification of metadata.

bundle exec fpm -s dir -t deb -n packageName -v 1.0.0 -C /path/to/code .

On the target system:

  • Info: dpkg -I packageName.deb
  • List files in the package: dpkg -c packageName.deb
  • Install: sudo dpkg -i packageName.deb
  • List installed files: dpkg-query -L packageName
  • Remove: dpkg -r packageName
    • Purge: dpkg -P packageName

References

Other tools


Example

bundle exec fpm -s dir -t deb -a all -n packageName -v 1.0.7 -d 'libapache2-mod-php5' ~/code/packageName=/srv/org ./sites-enabled=/etc/apache2/sites-enabled
# or
bundle exec fpm -s dir -t deb -a all -n packageName -v 1.0.7 -d 'libapache2-mod-php5' --prefix=/srv/org/packageName -C ~/code/org/packageName .

See: Using apt to install one or more .deb files+deps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment