refactor: modernise RPM builder with Python tooling v2
- Migrate from legacy shell-based build system to modern Python tooling - Update all metadata.yaml files to new schema with per-distro builds - Standardise build scripts with curl -L, envsubst, and error handling - Convert nfpm.yaml templates to use environment variable substitution - Update Dockerfile to accept all package metadata as build arguments - Modernise Makefile to use new Python build tool commands - Update CI workflow to use tools/build instead of make
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
---
|
||||
arch: amd64
|
||||
builds:
|
||||
- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||
release: '1'
|
||||
repository: [almalinux/el8]
|
||||
version: 7.11.0
|
||||
- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
release: '1'
|
||||
repository: [almalinux/el9]
|
||||
version: 7.11.0
|
||||
description: WinRAR is a powerful archive manager. It can backup your data and reduce the size of email attachments, open and unpack RAR, ZIP and other files downloaded from Internet, create new archives in RAR and ZIP file format.
|
||||
github: unknown/unrar
|
||||
homepage: https://www.rarlab.com/
|
||||
license: Freeware (UNRAR 7.11 freeware Copyright (c) 1993-2025 Alexander Roshal)
|
||||
maintainer: RARLAB
|
||||
name: unrar
|
||||
release: 1
|
||||
version: 7.11.0
|
||||
build:
|
||||
- distro: el/8
|
||||
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||
- distro: el/9
|
||||
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
platform: linux
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Download and extract unrar (with version formatting)
|
||||
export DOWNLOAD_VERSION=$(echo $PACKAGE_VERSION | sed s/\\.//)
|
||||
curl -o /app/rarlinux.tar.gz https://www.rarlab.com/rar/rarlinux-x64-${DOWNLOAD_VERSION}.tar.gz
|
||||
curl -L -o /app/rarlinux.tar.gz https://www.rarlab.com/rar/rarlinux-x64-${DOWNLOAD_VERSION}.tar.gz
|
||||
tar xf /app/rarlinux.tar.gz
|
||||
mv /app/rar/unrar /app/
|
||||
|
||||
# Build the RPM
|
||||
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||
# Process the nfpm.yaml template with environment variables
|
||||
envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml
|
||||
|
||||
nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
||||
@@ -1,17 +1,17 @@
|
||||
# nfpm.yaml
|
||||
|
||||
name: unrar
|
||||
name: ${PACKAGE_NAME}
|
||||
version: ${PACKAGE_VERSION}
|
||||
release: ${PACKAGE_RELEASE}
|
||||
arch: amd64
|
||||
platform: linux
|
||||
arch: ${PACKAGE_ARCH}
|
||||
platform: ${PACKAGE_PLATFORM}
|
||||
section: default
|
||||
priority: extra
|
||||
description: "WinRAR is a powerful archive manager. It can backup your data and reduce the size of email attachments, open and unpack RAR, ZIP and other files downloaded from Internet, create new archives in RAR and ZIP file format."
|
||||
description: "${PACKAGE_DESCRIPTION}"
|
||||
|
||||
maintainer: RARLAB
|
||||
homepage: https://www.rarlab.com/
|
||||
license: Freeware (UNRAR 7.11 freeware Copyright (c) 1993-2025 Alexander Roshal)
|
||||
maintainer: ${PACKAGE_MAINTAINER}
|
||||
homepage: ${PACKAGE_HOMEPAGE}
|
||||
license: ${PACKAGE_LICENSE}
|
||||
|
||||
disable_globbing: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user