-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathinter-server-sync.spec
More file actions
91 lines (75 loc) · 2.29 KB
/
inter-server-sync.spec
File metadata and controls
91 lines (75 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# spec file for package uyuni inter server sync
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?rhel} == 8
%global debug_package %{nil}
%endif
%if 0%{?rhel}
# Fix ERROR: No build ID note found in
%undefine _missing_build_ids_terminate_build
%endif
%global provider github
%global provider_tld com
%global org uyuni-project
%global project inter-server-sync
%global provider_prefix %{provider}.%{provider_tld}/%{org}/%{project}
Name: %{project}
Version: 0.3.11
Release: 0
Summary: Export/import data on a uyuni server
License: Apache-2.0
Group: System/Management
URL: https://%{provider_prefix}
#!CreateArchive: %{name}
Source0: %{name}-%{version}.tar.gz
#!CreateArchive: vendor
Source1: vendor.tar.gz
BuildRequires: golang-packaging
%if 0%{?rhel}
BuildRequires: golang >= 1.18
%else
BuildRequires: golang(API) >= 1.20
%endif
Requires: gzip
Requires: systemd
Requires: openssl
%description
Uyuni inter server sync tool
Used to export content from one server and import it in a target server.
%prep
%autosetup
tar -zxf %{SOURCE1}
%build
export GOFLAGS=-mod=vendor
%goprep %{provider_prefix}
%gobuild -ldflags "-X github.com/uyuni-project/inter-server-sync/cmd.Version=%{version}" ...
%install
%goinstall
%gosrc
%gofilelist
# Add config files for hub
install -d -m 0750 %{buildroot}%{_var}/log/hub
%check
%if 0%{?rhel}
# Fix OBS debug_package execution.
rm -f %{buildroot}/usr/lib/debug/%{_bindir}/%{name}-%{version}-*.debug
%endif
%files -f file.lst
%dir %attr(0750, root, root) %{_var}/log/hub
%defattr(-,root,root)
%doc README.md
%license LICENSES
%{_bindir}/inter-server-sync
%changelog