r-builds/builder/package.alpine-324
pat-s a2196ddc49
feat: add alpine-3.24 build config
Mirror the alpine-3.23 setup across the builder Dockerfile/package,
docker-compose service, Makefile/Justfile targets, and the CI matrix.
2026-06-12 15:45:39 +02:00

74 lines
1.4 KiB
Shell

#!/bin/bash
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
fi
# R 3.x requires PCRE1. On Ubuntu 24, R 3.x also requires PCRE2 for Pango support.
pcre_libs='- pcre2-dev'
if [[ "${R_VERSION}" =~ ^3 ]]; then
pcre_libs='- pcre2-dev
- libpcre3-dev'
fi
deflate_libs='# - libdeflate-dev'
if grep -q '^LIBS *=.*[-]ldeflate' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
deflate_libs='- libdeflate-dev'
fi
cat <<EOF > /tmp/nfpm.yml
name: r-${R_VERSION}
version: 1
version_schema: none
section: universe/math
priority: optional
arch: $(arch)
maintainer: Posit Software, PBC <https://github.com/rstudio/r-builds>
description: |
GNU R statistical computation and graphics system
vendor: Posit Software, PBC
homepage: https://www.r-project.org
license: GPL-2
depends:
- g++
- gcc
- gfortran
- libbz2
# - libc6
- cairo
- libcurl
${deflate_libs}
# - libglib2.0-0t64
# - libgomp1
- icu-dev
- jpeg-dev
# - liblzma-dev
- openblas-dev
- pango
# - libpangocairo-1.0-0
- libpaper
${pcre_libs}
- libpng-dev
- readline-dev
- tcl
- tiff-dev
- libtirpc-dev
- tk
# - libx11-6
# - libxt6t64
- make
# - ucf
- unzip
- zip
- zlib-ng-dev
contents:
- src: ${R_INSTALL_PATH}
dst: ${R_INSTALL_PATH}
EOF
nfpm package \
-f /tmp/nfpm.yml \
-p apk \
-t "/tmp/output/${OS_IDENTIFIER}"
export PKG_FILE=$(ls /tmp/output/${OS_IDENTIFIER}/r-${R_VERSION}*.apk | head -1)