diff --git a/rpms/hadolint/metadata.yaml b/rpms/hadolint/metadata.yaml new file mode 100644 index 0000000..3a7a666 --- /dev/null +++ b/rpms/hadolint/metadata.yaml @@ -0,0 +1,20 @@ +--- +name: hadolint +github: hadolint/hadolint +description: A smarter Dockerfile linter that helps you build best practice Docker images. +arch: amd64 +platform: linux +maintainer: hadolint +homepage: https://github.com/hadolint/hadolint +license: GPL-3.0 +builds: +- repository: + - almalinux/el8 + image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: 1 + version: 2.14.0 +- repository: + - almalinux/el9 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 2.14.0 diff --git a/rpms/hadolint/resources/build.sh b/rpms/hadolint/resources/build.sh new file mode 100755 index 0000000..291b8c0 --- /dev/null +++ b/rpms/hadolint/resources/build.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash + +set -e + +wget -O /app/hadolint https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/hadolint/hadolint/releases/download/v${PACKAGE_VERSION}/hadolint-linux-x86_64 +chmod +x /app/hadolint + +envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml + +nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm diff --git a/rpms/hadolint/resources/nfpm.yaml b/rpms/hadolint/resources/nfpm.yaml new file mode 100644 index 0000000..1f16854 --- /dev/null +++ b/rpms/hadolint/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: + - hadolint + +provides: + - hadolint + +contents: + - src: /app/hadolint + dst: /usr/bin/hadolint + file_info: + mode: 0755 + owner: root + group: root