- Notifications
You must be signed in to change notification settings - Fork3
Set up Alpine Linux packaging environment with a breeze! 🏔
License
orhun/alpkg
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Set up Alpine Linux packaging environment with a breeze! Seethis blog post.
alpkg
is a tool forall your Alpine packaging needs. It can create a chroot with preinstalled tools in a matter of seconds, set upaports repository, and fetch/update packages. Most importantly, it provides a split layout viaZellij for easy editing/buildingAPKBUILD
files.
Usage: alpkg [init|edit|fetch|update] [<package>]Commands: init Initialize an Alpine chroot. edit <package> Edit or create a package. fetch <package> Fetch an existing package from the remote repository. update <package> Update the package on the remote repository. destroy Remove the chroot and repository.Options: --packager "Your Name <your@email.address>" The name and email address of the package maintainer. --aports "https://gitlab.alpinelinux.org/<user>/aports" The URL of the remote APorts repository.Environment variables: CHROOT_DIR Directory for Alpine chroot. (default: /alpine) APORTS_DIR Directory for remote APorts repository. (default: /home/user/aports) PACKAGE_DIR Directory for APK packages built and stored. (default: /home/user/apkbuilds in chroot)
To create an Alpine Linux chroot and initializeaports repository for packaging, simply run:
alpkg init --packager"Your Name <your@email.address>" --aports"https://gitlab.alpinelinux.org/<user>/aports"
It is possible to pass options toalpine-chroot-install
via environment variables.
* You need to create an account onhttps://gitlab.alpinelinux.org and fork theaports repository under your user.
* If you runalpkg init
in your$HOME
directory, the Alpine working directory will point to$HOME/apkbuilds
.
To create a newAPKBUILD
, you can use theedit
command. Note that it usesnewapkbuild
under the hood so you can passnewapkbuild
options to it:
alpkg edit<newapkbuild_opts><package_name>
For example:
alpkg edit -r -d"A highly customizable changelog generator" -l"GPL-3.0-only" -u"https://github.com/orhun/git-cliff" git-cliff
Or you can generate an empty package with the following command:
alpkg edit testpkg
If the packagealready exists, you can also useedit
command to edit the contents of theAPKBUILD
.
To fetch existing packages fromaports
and edit them:
alpkg fetch<package_name>
To commit the changes to theaports
repository:
alpkg update<package_name>
This project is licensed underThe MIT License.
Copyright © 2023,Orhun Parmaksız
About
Set up Alpine Linux packaging environment with a breeze! 🏔