From 5ea394c61070f108df517b3e1e819feec068ff02 Mon Sep 17 00:00:00 2001 From: Benoit Date: Thu, 25 Apr 2024 22:06:25 +0900 Subject: [PATCH] Add pkg script for Ubuntu 22.04 --- pkg/ubuntu2204-amd64.sh | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 pkg/ubuntu2204-amd64.sh diff --git a/pkg/ubuntu2204-amd64.sh b/pkg/ubuntu2204-amd64.sh new file mode 100755 index 0000000..129786d --- /dev/null +++ b/pkg/ubuntu2204-amd64.sh @@ -0,0 +1,49 @@ +#!/bin/bash -e + +OUTPUT_DIR=$PWD + +SOURCE_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]})/..) + +VERSION=$(cd "$SOURCE_DIR" && git describe --tags --abbrev=8 --dirty)-1~upstream-ubuntu2204 + +DOCKER_TAG=$(docker build -q - < laminar/DEBIAN/control +Package: laminar +Version: $VERSION +Section: +Priority: optional +Architecture: amd64 +Maintainer: Oliver Giles +Depends: libcapnp-0.8.0, libsqlite3-0, zlib1g +Description: Lightweight Continuous Integration Service +EOF +echo /etc/laminar.conf > laminar/DEBIAN/conffiles +cat < laminar/DEBIAN/postinst +#!/bin/bash +echo Creating laminar user with home in /var/lib/laminar +useradd -r -d /var/lib/laminar -s /usr/sbin/nologin laminar +mkdir -p /var/lib/laminar/cfg/{jobs,contexts,scripts} +chown -R laminar: /var/lib/laminar +EOF +chmod +x laminar/DEBIAN/postinst + +dpkg-deb --build laminar +mv laminar.deb /output/laminar_${VERSION}_amd64.deb +EOS +