From e7cb50168964acda5dbf0a805dc513d6a0f459b4 Mon Sep 17 00:00:00 2001 From: feiloo <105425286+feiloo@users.noreply.github.com> Date: Fri, 14 Feb 2025 01:28:26 +0100 Subject: [PATCH] opensuse leap rpm spec file (#227) * add rpm package build script for opensuse leap 15.6 * add more fields to opensuse rpm spec file --- pkg/opensuse-leap15.6-x86_64.sh | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 pkg/opensuse-leap15.6-x86_64.sh diff --git a/pkg/opensuse-leap15.6-x86_64.sh b/pkg/opensuse-leap15.6-x86_64.sh new file mode 100755 index 0000000..cb53fe2 --- /dev/null +++ b/pkg/opensuse-leap15.6-x86_64.sh @@ -0,0 +1,63 @@ +#!/bin/bash -e + +OUTPUT_DIR=$PWD + +SOURCE_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]})/..) + +VERSION=$(cd "$SOURCE_DIR" && git describe --tags --abbrev=8 --dirty | tr - .)~upstream_suse_leap_15.6 + +DOCKER_TAG=$(docker build -q - < laminar.spec +Summary: Lightweight Continuous Integration Service +Name: laminar +Version: $VERSION +Release: 1 +License: GPL +URL: https://laminar.ohwg.net/ +BuildArch: x86_64 +BuildRequires: cmake make gcc-c++ sqlite3-devel boost-devel zlib-devel capnproto libcapnp-devel rapidjson-devel + +%description +Lightweight Continuous Integration Service + +%prep + +%build +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLAMINAR_VERSION=$VERSION -DSYSTEMD_UNITDIR=%{_unitdir} %{_sourcedir}/laminar-$VERSION +pwd +make %{?_smp_mflags} + +%install +%make_install + +%files +%{_bindir}/laminarc +%{_sbindir}/laminard +%{_unitdir}/laminar.service +%config(noreplace) %{_sysconfdir}/laminar.conf +%{_datarootdir}/bash-completion/completions/laminarc +%{_datarootdir}/zsh/site-functions/_laminarc +%{_mandir}/man8/laminard.8.gz +%{_mandir}/man1/laminarc.1.gz + +%post +echo Creating laminar user with home in %{_sharedstatedir}/laminar +useradd -r -d %{_sharedstatedir}/laminar -s %{_sbindir}/nologin laminar +mkdir -p %{_sharedstatedir}/laminar/cfg/{jobs,contexts,scripts} +chown -R laminar: %{_sharedstatedir}/laminar +EOF + +rpmbuild -ba laminar.spec +mv /usr/src/packages/RPMS/x86_64/laminar-$VERSION-1.x86_64.rpm /output/ +EOS