diff --git a/rpms/yq/metadata.yaml b/rpms/yq/metadata.yaml new file mode 100644 index 0000000..7bcccec --- /dev/null +++ b/rpms/yq/metadata.yaml @@ -0,0 +1,20 @@ +--- +name: yq +github: mikefarah/yq +description: yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor. +arch: amd64 +platform: linux +maintainer: mikefarah +homepage: https://github.com/mikefarah/yq +license: MIT +builds: +- repository: + - almalinux/el8 + image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: 1 + version: 4.53.2 +- repository: + - almalinux/el9 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 4.53.2 diff --git a/rpms/yq/resources/build.sh b/rpms/yq/resources/build.sh new file mode 100755 index 0000000..f88021b --- /dev/null +++ b/rpms/yq/resources/build.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash + +set -e + +wget -O /app/yq https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/mikefarah/yq/releases/download/v${PACKAGE_VERSION}/yq_linux_amd64 +chmod +x /app/yq + +envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml + +nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm diff --git a/rpms/yq/resources/nfpm.yaml b/rpms/yq/resources/nfpm.yaml new file mode 100644 index 0000000..ace2032 --- /dev/null +++ b/rpms/yq/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: + - yq + +provides: + - yq + +contents: + - src: /app/yq + dst: /usr/bin/yq + file_info: + mode: 0755 + owner: root + group: root