Skip to main content

Convert GitHub project releases to Archlinux package, with autoupdate.

Project description

arch-github-package

Convert GitHub project releases to Archlinux package, with autoupdate.

Why

A lot of packages in Archlinux's AUR are just a single PKGBUILD file that downloads the latest release from GitHub, and many of them are human-maintained, which means that they are not updated as soon as a new release is published.

This script provides an alternative. If a GitHub project has binary releases, it can automatically download a release tarball, create a PKGBUILD file, makepkg, and install it. It can also rebuild the package if a new release is found.

Installation

pipx install arch-github-package

pipx installs the package in a virtualenv, so it doesn't pollute your system.

You can also use pip:

pip install --user arch-github-package

Usage

Install a package

agp install <github-repo>

Example:

agp install cortesi/devd

How does it work:

  1. It looks for the latest release on GitHub.

  2. It tries to find a pre-built package for your system, by looking for keywords like "linux", "x86-64", "x86_64", "amd64", "gnu" in the release assets.

  3. It downloads the tarball, extracts it, and tries to dertermine which file goes where. E.g.:

    • If a file is ELF, or its x modbit is set, it goes to /usr/bin.
    • Files like *.1.gz go to /usr/share/man.
    • LICENSE and README.* go to /usr/share/doc/<package-name>.
  4. It creates a PKGBUILD file, and runs makepkg -si to build and install it. The package name is <github-project-name>-github. E.g., ortesi/devd becomes devd-github.

List installed packages

agp list

Check for upgrades

agp upgrade

You can also use agp upgrade <package-name> to upgrade a single package.

Uninstall a package

agp uninstall <package-name>

If you uninstall an -github package with pacman, it will still be listed by agp list. So remember to use agp uninstall to remove it.

Internals

Package metadata

Metadata is stored under ~/.local/share/arch-github-package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arch_github_package-0.0.3.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

arch_github_package-0.0.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file arch_github_package-0.0.3.tar.gz.

File metadata

  • Download URL: arch_github_package-0.0.3.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for arch_github_package-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4b8cfef2d298e85ec700c850576a3da62d2cf6131928c3e1d2065f70a19b78b3
MD5 6af69b8b5ecbe4ccc54aea9352ffdfe6
BLAKE2b-256 af1abbdf05a48861cb5571a4925760f391d4428d40c5e89953c076383c2d2526

See more details on using hashes here.

File details

Details for the file arch_github_package-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for arch_github_package-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b13488fe1806864567781a98a2cab88f5d47a68250b70acc65f51f577439a729
MD5 5b574c53ff0b942d2b2719684c07792f
BLAKE2b-256 f11261c76e80009ad82442b9437c45b397c408d924ddeed50c9f5777a1645ef5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page