Skip to content
Dr-Bean edited this page May 3, 2014 · 8 revisions

What is a PLIST file used for?

A PLIST file has one main purpose: minimize the size of a (cross) package.

To achieve that result, during building the package, spksrc/mk/spksrc.strip.mk reads PLIST, and does two things:

  • Anything not included in PLIST is not included in the package;
  • It strips unnecessary information from binary files (the file types bin and lib).

How do I prepare a PLIST file?

When you build a package with make arch-<ARCH>, a file called <package>.plist.tmp is created in $(WORK_DIR). This file can be used as a starting point to create a correct PLIST file.

  1. Save the temporary file as PLIST in the directory.

  2. Note that the file originally contains all the files created during the build process. Any unnecessary files that are not needed for the package to work should be removed from the PLIST file. Examples of removable files are README files, man files, and files ending on .a, .la, .mo, .pyc.

  3. All remaining files should be prepended with the correct file type, with a colon (:) as delimiter:

  • bin is used for binary files, commonly found in /bin or /sbin folders
  • lib is used for libraries (i.e files ending on .so), commonly found in /lib folder
  • lnk is used for linker files to libraries, commonly found in /lib folder
  • rsc is used for all other files.

You should prepend the file type as follows: <file type>:<file>. Example: bin:bin/python2.7 An example PLIST file, containing all the file types is /cross/python/PLIST.

Clone this wiki locally