feat: add jsonnet-language-server package configuration #62

Merged
unkinben merged 1 commits from benvin/jsonnet-language-server into master 2025-09-30 22:00:41 +10:00
5 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,18 @@
FROM git.unkin.net/unkin/almalinux9-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 resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: jsonnet-language-server
release: 1
version: 0.16.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: grafana/jsonnet-language-server

View File

@ -0,0 +1,10 @@
#!/usr/bin/bash
# Download the required files
curl -L -o /app/jsonnet-language-server https://github.com/grafana/jsonnet-language-server/releases/download/v${PACKAGE_VERSION}/jsonnet-language-server_${PACKAGE_VERSION}_linux_amd64
# Make the binary executable
chmod +x /app/jsonnet-language-server
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,38 @@
# nfpm.yaml
name: jsonnet-language-server
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "Jsonnet Language Server Protocol implementation for the Jsonnet templating language."
maintainer: Grafana Labs
homepage: https://github.com/grafana/jsonnet-language-server
license: Apache-2.0
disable_globbing: false
replaces:
- jsonnet-language-server
provides:
- jsonnet-language-server
# Files to include in the package
contents:
- src: /app/jsonnet-language-server
dst: /usr/bin/jsonnet-language-server
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