forked from ublue-os/uupd
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uupd.spec
58 lines (47 loc) · 1.53 KB
/
uupd.spec
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
Name: uupd
Version: 1.0
Release: 1%{?dist}
Summary: Centralized update service/checker made for Universal Blue
Vendor: ublue-os
URL: https://github.com/%{vendor}/%{name}
# Detailed information about the source Git repository and the source commit
# for the created rpm package
VCS: {{{ git_dir_vcs }}}
# git_dir_pack macro places the repository content (the source files) into a tarball
# and returns its filename. The tarball will be used to build the rpm.
Source: {{{ git_dir_pack }}}
License: Apache-2.0
BuildRequires: golang
BuildRequires: systemd-rpm-macros
Requires: bootc
Requires: distrobox
Requires: flatpak
Requires: libnotify
Requires: systemd
Provides: %{name} = %{version}
%description
A simple updater for Universal Blue systems
%global debug_package %{nil}
%prep
{{{ git_dir_setup_macro }}}
%build
go build -v -o %{name}
%install
install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -Dpm 644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -Dpm 644 %{name}.timer %{buildroot}%{_unitdir}/%{name}.timer
install -Dpm 644 %{name}.rules %{buildroot}%{_sysconfdir}/polkit-1/rules.d/%{name}.rules
%check
# go test should be here if you have tests, e.g.
# go test -v ./...
%post
%systemd_post %{name}.timer
%preun
%systemd_preun %{name}.timer
%files
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.timer
%config(noreplace) %{_sysconfdir}/polkit-1/rules.d/%{name}.rules
%changelog
%autochangelog