Skip to content

Close #836: Wrap Alpine's newapkbuild

postmarketOS Bot requested to merge feature/wrap-newapkbuild into master

Created by: ollieparanoid

newapkbuild creates APKBUILDs and other files (e.g. OpenRC service file templates). It is quite powerful and always installed, when installing the build environment anyway. This PR adds a simple wrapper, to make it conveniently usable with pmbootstrap newapkbuild.

Examples

pmbootstrap newapkbuild -h

usage: pmbootstrap newapkbuild [-h] folder ...

positional arguments:
  folder       aports subfolder, where the new aport will be located (main,
               cross, device, ...)
  args_passed  arguments directly passed to Alpine's newapkbuild, more
               information: 'pmbootstrap newapkbuild main -h'

optional arguments:
  -h, --help   show this help message and exit

pmbootstrap newapkbuild main -h

newapkbuild 3.1.0-r1 - generate a new APKBUILD
Usage: newapkbuild [-n NAME] [-d DESC] [-l LICENSE] [-u URL]
       [-aCpy] [-s] [-cfh]
       PKGNAME[-PKGVER]|SRCURL
Options:
  -n  Set package name to NAME
  -d  Set package description (pkgdesc) to DESC
  -l  Set package license to LICENSE
  -u  Set package URL
  -a  Create autotools package (use ./configure ...)
  -C  Create CMake pakckage (Assume cmake/ is there)
  -m  Create meson package (Assume meson.build is there)
  -p  Create perl package (Assume Makefile.PL is there)
  -y  Create python package (Assume setup.py is there)
  -s  Use sourceforge source URL
  -c  Copy a sample init.d, conf.d, and install script to new directory
  -f  Force even if directory already exist
  -h  Show this help

pmbootstrap newapkbuild main -d "testdescription" -c testaport

>>> testaport: Updating the sha512sums in APKBUILD...
[00:40:37] Create /home/user/code/pmbootstrap/aports/main/testaport
[00:40:37] Done

Merge request reports