From 8cbd4950048c0257c49215bdecb761c64f747bf8 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 26 Apr 2026 16:58:37 +1000 Subject: [PATCH] feat: add tea rpm --- rpms/tea/metadata.yaml | 20 ++++++++++++++++++++ rpms/tea/resources/build.sh | 10 ++++++++++ rpms/tea/resources/nfpm.yaml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 rpms/tea/metadata.yaml create mode 100755 rpms/tea/resources/build.sh create mode 100644 rpms/tea/resources/nfpm.yaml diff --git a/rpms/tea/metadata.yaml b/rpms/tea/metadata.yaml new file mode 100644 index 0000000..bbc466d --- /dev/null +++ b/rpms/tea/metadata.yaml @@ -0,0 +1,20 @@ +--- +name: tea +github: unknown/tea +description: The official CLI for Gitea. +arch: amd64 +platform: linux +maintainer: Gitea +homepage: https://gitea.com/gitea/tea +license: MIT +builds: +- repository: + - almalinux/el8 + image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: 1 + version: 0.14.0 +- repository: + - almalinux/el9 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 0.14.0 diff --git a/rpms/tea/resources/build.sh b/rpms/tea/resources/build.sh new file mode 100755 index 0000000..ea24406 --- /dev/null +++ b/rpms/tea/resources/build.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash + +set -e + +curl -L --output /app/tea-linux-amd64 https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/gitea-dl/tea/${PACKAGE_VERSION}/tea-${PACKAGE_VERSION}-linux-amd64 +chmod +x /app/tea-linux-amd64 + +envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml + +nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm diff --git a/rpms/tea/resources/nfpm.yaml b/rpms/tea/resources/nfpm.yaml new file mode 100644 index 0000000..c8a9f11 --- /dev/null +++ b/rpms/tea/resources/nfpm.yaml @@ -0,0 +1,30 @@ +# nfpm.yaml + +name: ${PACKAGE_NAME} +version: ${PACKAGE_VERSION} +release: ${PACKAGE_RELEASE} +arch: ${PACKAGE_ARCH} +platform: ${PACKAGE_PLATFORM} +section: default +priority: extra +description: "${PACKAGE_DESCRIPTION}" + +maintainer: ${PACKAGE_MAINTAINER} +homepage: ${PACKAGE_HOMEPAGE} +license: ${PACKAGE_LICENSE} + +disable_globbing: false + +replaces: + - tea + +provides: + - tea + +contents: + - src: /app/tea-linux-amd64 + dst: /usr/bin/tea + file_info: + mode: 0755 + owner: root + group: root