From 69b9e41129cce1b10543a965c9e81ab8c6002827a078d77908c2c61b705186ae Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 11 Sep 2024 16:15:38 +0200 Subject: [PATCH] spec file changes --- autogits.spec | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/autogits.spec b/autogits.spec index d0c2807..1fcd1bb 100644 --- a/autogits.spec +++ b/autogits.spec @@ -17,12 +17,12 @@ Name: autogits -Version: 0.0.1 +Version: 0 Release: 0 Summary: GitWorkflow utilities License: GPL-2.0-or-later URL: https://src.opensuse.org/adamm/autogits -Source: https://src.opensuse.org/adamm/autogits/0.0.1.tar.zst +Source: autogits-%{version}.tar.zst Source1: vendor.tar.zst BuildRequires: golang-packaging BuildRequires: systemd-rpm-macros @@ -43,6 +43,7 @@ with a topic %prep %autosetup -p1 +cd gitea-events-rabbitmq-publisher && tar x --zstd -f %{SOURCE1} %build go build \ @@ -51,8 +52,20 @@ go build \ -buildmode=pie %install -install -D -m0755 gitea-events-rabbitmq-publisher/gitea-events-rabbitmq-publisher %{buildroot}%{_bindir} -install -D -m0755 systemd/gitea-events-rabbitmq-publisher.service %{buildroot}%{_unitdir} +install -D -m0755 gitea-events-rabbitmq-publisher/gitea-events-rabbitmq-publisher %{buildroot}%{_bindir}/gitea-events-rabbitmq-publisher +install -D -m0644 systemd/gitea-events-rabbitmq-publisher.service %{buildroot}%{_unitdir}/gitea-events-rabbitmq-publisher.service + +%pre -n gitea-events-rabbitmq-publisher +%service_add_pre gitea-events-rabbitmq-publisher.service + +%post -n gitea-events-rabbitmq-publisher +%service_add_post gitea-events-rabbitmq-publisher.service + +%preun -n gitea-events-rabbitmq-publisher +%service_del_preun gitea-events-rabbitmq-publisher.service + +%postun -n gitea-events-rabbitmq-publisher +%service_del_postun gitea-events-rabbitmq-publisher.service %files -n gitea-events-rabbitmq-publisher %license COPYING