From a788bdd6cb4859a3e1427ff56bf2320791480f42 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 25 May 2025 13:34:02 +1000 Subject: [PATCH] feat: unrar 7.11 - add freeware-only unrar package --- rpms/unrar/7.11/release | 1 + rpms/unrar/Dockerfile | 25 +++++++++++++++++++++++++ rpms/unrar/nfpm.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 rpms/unrar/7.11/release create mode 100644 rpms/unrar/Dockerfile create mode 100644 rpms/unrar/nfpm.yaml diff --git a/rpms/unrar/7.11/release b/rpms/unrar/7.11/release new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/rpms/unrar/7.11/release @@ -0,0 +1 @@ +1 diff --git a/rpms/unrar/Dockerfile b/rpms/unrar/Dockerfile new file mode 100644 index 0000000..f31b9ee --- /dev/null +++ b/rpms/unrar/Dockerfile @@ -0,0 +1,25 @@ +# Start with the AlmaLinux 8.10 base image +FROM git.query.consul/unkin/almalinux8-rpmbuilder:latest + +# Create output directory for RPMs +RUN mkdir -p /app/dist + +# Set working directory +WORKDIR /app + +ARG PACKAGE_RELEASE +ENV PACKAGE_RELEASE=${PACKAGE_RELEASE} +ARG PACKAGE_VERSION +ENV PACKAGE_VERSION=${PACKAGE_VERSION} + +# Copy nfpm.yaml from the context into the container +COPY nfpm.yaml /app/nfpm.yaml + +# Download the required files +RUN export DOWNLOAD_VERSION=$(echo $PACKAGE_VERSION | sed s/\\.//) && \ + wget -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/ + +# Default command to build RPMs +CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm diff --git a/rpms/unrar/nfpm.yaml b/rpms/unrar/nfpm.yaml new file mode 100644 index 0000000..18bab6d --- /dev/null +++ b/rpms/unrar/nfpm.yaml @@ -0,0 +1,38 @@ +# nfpm.yaml + +name: unrar +version: ${PACKAGE_VERSION} +release: ${PACKAGE_RELEASE} +arch: amd64 +platform: linux +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." + +maintainer: RARLAB +homepage: https://www.rarlab.com/ +license: Freeware (UNRAR 7.11 freeware Copyright (c) 1993-2025 Alexander Roshal) + +disable_globbing: false + +replaces: + - unrar + +provides: + - unrar + +# Files to include in the package +contents: + - src: /app/unrar + dst: /usr/bin/unrar + 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