Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orhun/alpkg
Set up Alpine Linux packaging environment with a breeze! π
https://github.com/orhun/alpkg
alpine alpine-linux alpine-package-builder alpine-packaging chroot chroot-environment packaging packaging-scripts packaging-tool
Last synced: about 1 month ago
JSON representation
Set up Alpine Linux packaging environment with a breeze! π
- Host: GitHub
- URL: https://github.com/orhun/alpkg
- Owner: orhun
- License: mit
- Created: 2023-03-25T14:32:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-14T12:58:05.000Z (11 months ago)
- Last Synced: 2024-10-05T16:28:16.661Z (about 2 months ago)
- Topics: alpine, alpine-linux, alpine-package-builder, alpine-packaging, chroot, chroot-environment, packaging, packaging-scripts, packaging-tool
- Language: Shell
- Homepage: https://blog.orhun.dev/alpine-packaging-setup/
- Size: 8.72 MB
- Stars: 24
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# `alpkg` π
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/orhun/alpkg/ci.yml?logo=GitHub)](https://github.com/orhun/alpkg/actions)
**Set up Alpine Linux packaging environment with a breeze!** See [**this blog post**](https://blog.orhun.dev/alpine-packaging-setup).
![alpkg demo](assets/demo.gif)
`alpkg` is a tool for _all_ your Alpine packaging needs. It can create a chroot with preinstalled tools in a matter of seconds, set up [aports repository](https://gitlab.alpinelinux.org/alpine/aports), and fetch/update packages. Most importantly, it provides a split layout via [Zellij](https://github.com/zellij-org/zellij) for easy editing/building [`APKBUILD`](https://wiki.alpinelinux.org/wiki/APKBUILD_Reference) files.
## Requirements
- [alpine-chroot-install](https://github.com/alpinelinux/alpine-chroot-install)
- See [requirements](https://github.com/alpinelinux/alpine-chroot-install#requirements).## Usage
```
Usage: alpkg [init|edit|fetch|update] []Commands:
init Initialize an Alpine chroot.
edit Edit or create a package.
fetch Fetch an existing package from the remote repository.
update Update the package on the remote repository.
destroy Remove the chroot and repository.Options:
--packager "Your Name " The name and email address of the package maintainer.
--aports "https://gitlab.alpinelinux.org//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)
```## Features
### `init`
To create an Alpine Linux chroot and initialize [aports repository](https://gitlab.alpinelinux.org/alpine/aports) for packaging, simply run:
```sh
alpkg init --packager "Your Name " --aports "https://gitlab.alpinelinux.org//aports"
```It is possible to pass options to `alpine-chroot-install` via environment variables.
Demo
![alpkg init](assets/init.gif)
\* You need to create an account on [https://gitlab.alpinelinux.org](https://gitlab.alpinelinux.org) and fork the [aports repository](https://gitlab.alpinelinux.org/alpine/aports) under your user.
\* If you run `alpkg init` in your `$HOME` directory, the Alpine working directory will point to `$HOME/apkbuilds`.
### `edit`
To create a new `APKBUILD`, you can use the `edit` command. Note that it uses [`newapkbuild`](https://wiki.alpinelinux.org/wiki/Include:Newapkbuild) under the hood so you can pass `newapkbuild` options to it:
```sh
alpkg edit
```For example:
```sh
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:
```sh
alpkg edit testpkg
```Demo
![alpkg edit I](assets/edit-1.gif)
If the package _already exists_, you can also use `edit` command to edit the contents of the `APKBUILD`.
Demo
![alpkg edit II](assets/edit-2.gif)
### `fetch`
To fetch existing packages from `aports` and edit them:
```sh
alpkg fetch
```Demo
![alpkg fetch](assets/fetch.gif)
### `update`
To commit the changes to the `aports` repository:
```sh
alpkg update
```Demo
![alpkg update](assets/update.gif)
## License
This project is licensed under [The MIT License](./LICENSE).
## Copyright
Copyright Β© 2023, [Orhun ParmaksΔ±z](mailto:[email protected])