Changes

Jump to: navigation, search

Create a package

1,049 bytes added, 04:16, 18 March 2018
Quick start: newapkbuild: update to new syntax, add download example
Create a template for a new package called <code>mynewpackage</code> in <code>aports/main</code>:
<syntaxhighlight lang="shell-session">
$ pmbootstrap newapkbuild main mynewpackage
[21:34:27] Create /home/user/code/pmbootstrap/aports/main/mynewpackage
[21:34:27] Done
</syntaxhighlight>
We directly use <code>{{alpine|newapkbuild</code> }} from Alpine, which has lots of parameters to quickly customize the templates it generates. It is even possible to just specify the URL and let it download the tarball and automatically recognize the build system, package name and version: <syntaxhighlight lang="shell-session">$ pmbootstrap newapkbuild "https://github.com/alpinelinux/abuild/archive/v3.1.0.tar.gz"</syntaxhighlight> For reference, see the full help output:
<syntaxhighlight lang="shell-session">
$ pmbootstrap newapkbuild main -husage: pmbootstrap newapkbuild 3.1.0[-h] [-r4 - generate a new APKBUILDUsage: newapkbuild folder FOLDER] [-n NAMEPKGNAME] [-d DESCPKGDESC] [-l LICENSE] [-u URL] [-aCpya | -C | -m | -p | -y] [-s] [-cfhc] [-f] PKGNAME[-PKGVER]|SRCURLOptionspositional arguments: PKGNAME[-PKGVER] | SRCURL set either the package name (optionally with the PKGVER at the end, e.g. 'hello-world-1.0') or the download link to the source archive optional arguments: -h, --help show this help message and exit --folder FOLDER set postmarketOS aports folder (default: main) -n Set PKGNAME set package name to NAME(only use with SRCURL) -d Set PKGDESC set package description (pkgdesc) to DESC -l Set LICENSE set package license to LICENSEidentifier from <https://spdx.org/licenses/> -u Set URL set package URL -a Create create autotools package (use ./configure ...) -C Create create CMake pakckage package (Assume assume cmake/ is there) -m Create create meson package (Assume assume meson.build is there) -p Create create perl package (Assume assume Makefile.PL is there) -y Create create python package (Assume assume setup.py is there) -s Use use sourceforge source URL -c Copy copy a sample init.d, conf.d, and install script to new directory -f Force force even if directory already exist -h Show this helpexists
</syntaxhighlight>

Navigation menu