chore: add xh rpm
- add xh to list of RPMs to build
This commit is contained in:
parent
c6d8e33a54
commit
6c468c40d1
18
rpms/xh/metadata.yaml
Normal file
18
rpms/xh/metadata.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
arch: amd64
|
||||||
|
builds:
|
||||||
|
- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||||
|
release: '1'
|
||||||
|
repository: [almalinux/el8]
|
||||||
|
version: 0.25.3
|
||||||
|
- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
|
release: '1'
|
||||||
|
repository: [almalinux/el9]
|
||||||
|
version: 0.25.3
|
||||||
|
description: A friendly and fast tool for sending HTTP requests (HTTPie reimplementation in Rust)
|
||||||
|
github: ducaale/xh
|
||||||
|
homepage: https://github.com/ducaale/xh
|
||||||
|
license: MIT
|
||||||
|
maintainer: ducaale
|
||||||
|
name: xh
|
||||||
|
platform: linux
|
||||||
14
rpms/xh/resources/build.sh
Executable file
14
rpms/xh/resources/build.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Download and extract xh
|
||||||
|
wget -O /app/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl.tar.gz https://github.com/ducaale/xh/releases/download/v${PACKAGE_VERSION}/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl.tar.gz
|
||||||
|
tar xf /app/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl.tar.gz
|
||||||
|
mv /app/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl/* /app/
|
||||||
|
|
||||||
|
# Process the nfpm.yaml template with environment variables
|
||||||
|
envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
||||||
38
rpms/xh/resources/nfpm.yaml
Normal file
38
rpms/xh/resources/nfpm.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# 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:
|
||||||
|
- xh
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- xh
|
||||||
|
|
||||||
|
# Files to include in the package
|
||||||
|
contents:
|
||||||
|
- src: /app/xh
|
||||||
|
dst: /usr/bin/xh
|
||||||
|
file_info:
|
||||||
|
mode: 0755
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
# Scripts to run during installation/removal (optional)
|
||||||
|
# scripts:
|
||||||
|
# preinstall: ./scripts/preinstall.sh
|
||||||
|
# postinstall: ./scripts/postinstall.sh
|
||||||
|
# preremove: ./scripts/preremove.sh
|
||||||
|
# postremove: ./scripts/postremove.sh
|
||||||
Loading…
Reference in New Issue
Block a user