Packages Tutorial

About SZPM and ZPM

There are 2 types of package files:

szpm

The source zammad package module (szpm) contains the locations and meta information of your zammad custom development. It will be used to build the package.

zpm

The zammad package module (zpm) is the compressed version of your source file and contains all data of your customized files as based64 encoded strings in a json file.


To build it, you will need a *.szpm with your modified or new files:

example_package.szpm

{
  "name": "Example-Package",
  "version": "1.0.0",
  "vendor": "Example GmbH",
  "license": "GNU AFFERO GENERAL PUBLIC LICENSE",
  "url": "http://example.com/",
  "files": [
    {
      "location": "public/assets/test.txt",
      "permission": 644
    }
  ]
}

public/assets/test.txt

Hello World

The result of the compressed zpm file will look like this:

example_package-1.0.0.zpm

{
  "name": "Example-Package",
  "version": "1.0.0",
  "vendor": "Example GmbH",
  "license": "GNU AFFERO GENERAL PUBLIC LICENSE",
  "url": "http://example.com/",
  "files": [
    {
      "location": "public/assets/test.txt",
      "permission": 644,
      "encode": "base64",
      "content": "SGVsbG8gV29ybGQK"
    }
  ]
}

You should name your package like Vendor-Feature and be aware that also the downcased file naming is also important for migration handling and the package installation.

2 Likes