postmarketOS
Creating a package
Here is a practical approach on how to port packages from other Linux distributions to pmOS (because that is usually the fastest way). Feel free to extend this information, and to add other distributions.
General information
- Please read this section from our upstream friends wiki (which we should also extend and improve)
- Please always package the latest version of a software (unless it is impossible because of software that depends on it, but try to avoid that!)
- Please do not copy maintainers/contributors from the other packages to your new ports (so they won't get annoyed by questions for pmOS/Alpine packages!). Instead please credit them in the commit messages (maybe with a link to the original build recipe)
- Alpine Linux uses
musl
as libc, not glibc
. Never add glibc
as dependency.
- Alpine uses busybox'
sh
for building packages. Do not use bash specific features.
- Manpages and other documentation goes into an extra -doc package in Alpine, and abuild will complain if the main package contains them. The solution is to add this:
subpackages="$pkgname-doc"
(more info)
- You can look up the exact meaning of every variable and function in the APKBUILD Reference
- Set up the git hook from the [[development guide]] article to automatically verify checksums in your APKBUILDs and therefore making your life easier
Porting packages from Arch Linux
Find the package
Search here, click the package name, click on "Source Files" on the top right. A git repo with the PKGBUILD
and all other files (such as patches appears).
Differences between APKBUILDs and PKGBUILDs
APKBUILD
s do not have the arrays from bash, use flat strings instead
- There's no
optdepends
-doc
subpackages (see above)
APKBUILD
has different options (!makeflags won't work, but it has !strip and !check)