Initial Commit

This commit is contained in:
2026-02-01 12:09:10 +01:00
commit 474e9fe6a5
6 changed files with 214 additions and 0 deletions

27
.SRCINFO Normal file
View File

@@ -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

12
.editorconfig Normal file
View File

@@ -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

6
.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
pkg
src
*tar.gz
*tar.zst
*tar.zst.sig
*zip

101
PKGBUILD Normal file
View File

@@ -0,0 +1,101 @@
# Maintainer: Markus Pesch <markus.pesch plus apps at cryptic.systems>
pkgbase=artifacthub
pkgname=(
'artifacthub-cli'
'artifacthub-hub'
'artifacthub-scanner'
'artifacthub-tracker'
)
pkgver=1.22.0 # renovate: datasource=github-tags depName=artifacthub/hub extractVersion='^v?(?<version>.*)$'
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"
}

61
README.md Normal file
View File

@@ -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
```

7
renovate.json Normal file
View File

@@ -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"
]
}