From 474e9fe6a524704b8323dfd4f3cf9ace54d13d69 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 1 Feb 2026 12:09:10 +0100 Subject: [PATCH] Initial Commit --- .SRCINFO | 27 ++++++++++++++ .editorconfig | 12 ++++++ .gitignore | 6 +++ PKGBUILD | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 61 ++++++++++++++++++++++++++++++ renovate.json | 7 ++++ 6 files changed, 214 insertions(+) create mode 100644 .SRCINFO create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 PKGBUILD create mode 100644 README.md create mode 100644 renovate.json diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..1d10f44 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = artifacthub + pkgdesc = Find, install and publish Cloud Native packages + pkgver = 1.22.0 + pkgrel = 1 + url = https://github.com/artifacthub/hub + arch = aarch64 + arch = x86_64 + license = Apache 2.0 + makedepends = go + depends = tensorflow + source = https://github.com/artifacthub/hub/archive/refs/tags/v1.22.0.zip + sha512sums = 1d636cbfd1dca3aba5764e70d52ad066b6eaf08d99bc9e69689984a1cbbac88e383633d9499bed99ad9c4c975ff9535988b522f0869f24bf9480b9371be57805 + b2sums = 50edb0b262cd168db3cdf113ffddd3d0c0f38ee43b17f82a9e125738363252de8f6b07bcb9963a699ffd60ae7e7c5b2aefd756df795056ca9e9660c797193c79 + +pkgname = artifacthub-cli + pkgdesc = Artifact Hub CLI tool + +pkgname = artifacthub-hub + pkgdesc = Artifact Hub is a web-based application that enables finding, installing, and publishing Kubernetes packages + +pkgname = artifacthub-scanner + pkgdesc = Artifact Hub scanner tool + depends = artifacthub-hub + +pkgname = artifacthub-tracker + pkgdesc = Artifact Hub tracker tool + depends = artifacthub-hub diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1166a4a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c60cd8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +pkg +src +*tar.gz +*tar.zst +*tar.zst.sig +*zip \ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..8317c11 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,101 @@ +# Maintainer: Markus Pesch + +pkgbase=artifacthub +pkgname=( + 'artifacthub-cli' + 'artifacthub-hub' + 'artifacthub-scanner' + 'artifacthub-tracker' +) +pkgver=1.22.0 # renovate: datasource=github-tags depName=artifacthub/hub extractVersion='^v?(?.*)$' +pkgrel=1 +pkgdesc="Find, install and publish Cloud Native packages" +arch=('aarch64' 'x86_64') +url="https://github.com/artifacthub/hub" +license=('Apache 2.0') +makedepends=("go" "tensorflow") +source=( + "$url/archive/refs/tags/v${pkgver}.zip" +) +sha512sums=('1d636cbfd1dca3aba5764e70d52ad066b6eaf08d99bc9e69689984a1cbbac88e383633d9499bed99ad9c4c975ff9535988b522f0869f24bf9480b9371be57805') +b2sums=('50edb0b262cd168db3cdf113ffddd3d0c0f38ee43b17f82a9e125738363252de8f6b07bcb9963a699ffd60ae7e7c5b2aefd756df795056ca9e9660c797193c79') + +prepare() { + cd hub-${pkgver} + + export GONOSUMDB="${GONOSUMDB}" + export GOPATH="${srcdir}" + export GOPROXY="${GOPROXY}" + + env | sort | grep -E '^C?GO' + + go mod download -modcacherw +} + +build() { + # https://wiki.archlinux.org/title/Go_package_guidelines + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + + export GONOSUMDB="${GONOSUMDB}" + export GOPATH="${srcdir}" + export GOPROXY="${GOPROXY}" + + env | sort | grep -E '^C?GO' + + for bin in ah scanner; do + echo "building ${bin}..." + + cd "hub-${pkgver}/cmd/${bin}" + + go build -v \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "\ + -s -w + -X main.version=${pkgver} + -X main.gitCommit=${pkgver} + " \ + -trimpath \ + -o "${bin}" . + + cd "${srcdir}" + done +} + +package_artifacthub-cli() { + pkgdesc="Artifact Hub CLI tool" + + # binary + install -D --mode 0755 "hub-${pkgver}/cmd/ah/ah" "$pkgdir/usr/bin/ah" + + # license + install -D --mode 0755 "hub-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_artifacthub-hub(){ + pkgdesc="Artifact Hub is a web-based application that enables finding, installing, and publishing Kubernetes packages" + + install -D --mode 0755 "hub-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_artifacthub-scanner(){ + pkgdesc="Artifact Hub scanner tool" + depends=( + "artifacthub-hub" + ) + + install -D --mode 0755 "hub-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_artifacthub-tracker(){ + pkgdesc="Artifact Hub tracker tool" + depends=( + "artifacthub-hub" + ) + + install -D --mode 0755 "hub-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..b67d80f --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# opa-regal + +![AUR version](https://img.shields.io/aur/version/opa-regal?label=AUR) +![AUR votes](https://img.shields.io/aur/votes/opa-regal) + +This repository contains build files to build the Arch Linux package `opa-regal`. Instead of building the package +yourself, it can also be obtained from the following private repository. More detailed are described +[here](#obtaining-pre-built-packages-from-a-repository). + +## Build + +Clone this repository and use `makepkg` to build the package by yourself. For example: + +```bash +git clone https://aur.archlinux.org/opa-regal.git +cd opa-regal +makepkg +``` + +## Yay + +The build files are also available via AUR and can be installed via an AUR helper like `yay`. + +```bash +yay --sync --aur opa-regal +``` + +## Obtaining pre-built packages from a repository + +Instead of building the packages locally, it is also possible to configure an additional repository to install the +package directly via `pacman`. The following commands are used to create the repository, configure the GPG key to verify +the packages and install the package: + +```bash +# Create drop-in directory +sudo mkdir --parents /etc/pacman.d/repos + +# Create configuration of the repository 'volker.raschek' +sudo tee /etc/pacman.d/repos/volker.raschek.conf > /dev/null <<'EOF' +[volker.raschek] +SigLevel = PackageRequired TrustedOnly +Include = /etc/pacman.d/repos/volker.raschek.list +EOF + +# Create mirror list of the repository 'volker.raschek' +sudo tee /etc/pacman.d/repos/volker.raschek.list > /dev/null <<'EOF' +Server = https://aur.cryptic.systems/$repo/$arch +EOF + +# Import gpg key of the repository 'volker.raschek' +sudo pacman-key --keyserver hkps://keys.openpgp.org --recv-keys 9B146D11A9ED6CA7E279EB1A852BCC170D81A982 + +# Extend existing pacman configuration of the repository 'volker.raschek' +sudo echo "Include = /etc/pacman.d/repos/*.conf" >> /etc/pacman.conf + +# Update pacman cache +sudo pacman --sync --refresh + +# Install the package and receive updates directly via pacman :) +sudo pacman --sync opa-regal +``` diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..29b2cb9 --- /dev/null +++ b/renovate.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>volker.raschek/renovate-config:default#master", + "local>volker.raschek/renovate-config:regexp#master" + ] +} \ No newline at end of file