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

⌈⌋ ⎇ branch:  cross package maker


Artifact [be03724593]

Artifact be037245936b8f08ce344eea16c66820b44efc0d:

Wiki page [Packfile] by mario 2015-05-01 00:18:24.
D 2015-05-01T00:18:24.722
L Packfile
N text/x-markdown
P cb847edf07cd9b53a72d8842d35b0ed5b8a4c52b
U mario
W 1923
<h2> <kbd><em>-u</em> packfile</kbd> </h2>

Runs a `Packfile` (via `make`) after all source files have been collected into the staging dir.

  - The main `Packfile` will be picked up from wherever `fpm` was invoked at.  
    Runs within the base `/tmp/pack-xyz123-staging/` path.
  - Any Packfiles that were grabbed along with source files (e.g. `usr/share/doc/Packfile`) will be run in the according staging subdirectory.  
    And of course they'll be automatically removed after being run.

### Simple

An example Packfile could just be:

    all: 
           gzip -9 usr/share/doc/mypkg/changelog

Note that the paths are relative, because it's already run within the staging path set as current working dir.

### Env vars

There are a few extra environment variables available:

  - `PACK_TYPE` = deb
  - `PKG_FLAG` = PKG_DEB
  - `PACK_NAME` = mypkg
  - `PACK_VERSION` = 1.2.3
  - `PACK_ARCH` = native
  - `PACK_STAGING` = /tmp/pack-dir-staging-123/
  - `PACK_DIRECTORIES` = ""

### Package-type specific rules

So you *could* add rules depending on target package types for example:

    all: $(PACK_TYPE)
    deb:
           gzip -9 usr/share/doc/mypkg/changelog
    rpm:
           mv etc/rc.d/05-mypkg etc/init.d/mypkg           
    arch:
           sed -i '1 s/python/python2/' usr/bin/*

## Purpose

Meant for *minor* **mid-packaging** refinements.

  * Packfiles came to be because they're more flexibile than builtin/default <kbd>-u</kbd> filters. They permit cusomized hooks and packaging tweaks.

  * They're **not** meant to delay actual build steps into the packaging phase.

  * Instead it's there to avoid packaging-workarounds creeping into a regular Makefile. The differentation is somewhat arbitrary, of course. But it's feasible to reduce overlap now.

  * Suitable for minor file renaming, data compression or stub/default creation tasks.




Z 1f0a380e82ff16295e5dea0e210b9223