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

⌈⌋ ⎇ branch:  cross package maker


Artifact [c41335b3dc]

Artifact c41335b3dc8bc9ebef6e10c6b0c028a6ec25a382:

Wiki page [Packfile] by mario 2015-04-15 22:58:27.
D 2015-04-15T22:58:27.716
L Packfile
N text/x-markdown
P d99d55fce1844361def1d79fb220241ff6fd7075
U mario
W 1891
<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, as it's already run within the staging directory.

### Env vars

There are a few extra environment variables available:

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

### 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           


## Purpose

Minor *mid-packaging* refinements.

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

  * It's **not** meant to delay actual build steps into the packaging phase.

  * Instead it's there to avoid packaging-workarounds creeping into and collecting dust in a regular Makefile.

  * Of course the boundaries can be somewhat arbitrary. But at least it's now feasible to cleanly spearate *Make*file and *Pack*file tasks. Less mashup / overlap.

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




Z 612e55ffb1046b1bf7fb7a7769964d3b