PLIST Files¶
PLIST (Package List) files define which files are included in a package.
Purpose¶
PLIST files serve several purposes:
- Include files - Specify which files go into the SPK
- Set destinations - Define where files are installed
- Track files - Used during upgrades and uninstalls
File Location¶
cross/<package>/PLIST- For cross packagesspk/<package>/PLIST- For SPK packages (if needed)
Basic Format¶
Entry Types¶
| Type | Description |
|---|---|
bin |
Executables |
lib |
Libraries |
rsc |
Resources (scripts, data files, configs) |
lnk |
Symbolic links |
Example¶
Installation Locations¶
Files are installed relative to the package installation directory. See Synology FHS for DSM file system hierarchy details.
| Path | Description |
|---|---|
bin/ |
Package executables |
lib/ |
Package libraries |
share/ |
Data files |
etc/ |
Configuration templates |
Wildcards¶
Glob Patterns¶
Symbolic Links¶
Use lnk: for symbolic links:
Auto-Generated PLIST¶
For cross packages, PLIST can be auto-generated by creating an empty PLIST.auto file:
When building, the framework will analyze the staging directory and create appropriate PLIST entries based on file types:
- ELF executables →
bin: - ELF libraries →
lib: - Scripts →
rsc: - Symbolic links →
lnk: - Other files →
rsc:
Manual PLIST Generation¶
This generates a PLIST from the staging directory contents which you can then refine.
Best Practices¶
Do Include¶
- Executables the user will run
- Libraries required at runtime
- Configuration templates
- Essential data files
Don't Include¶
- Development headers (unless needed)
- Static libraries (usually)
- Man pages (saves space)
- Documentation (link to online docs instead)
Common Patterns¶
# Binary with library
bin:bin/myapp
lib:lib/libmyapp.so*
# Application with data
bin:bin/myapp
rsc:share/myapp/*
Debugging PLIST Issues¶
View Staging Contents¶
Test Package Contents¶
After building, examine the SPK:
PLIST Transform¶
For complex cases, use PLIST_TRANSFORM in your Makefile to modify the PLIST dynamically: