forked from ublue-os/ublue-update
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ublue-update.spec.rpkg
74 lines (63 loc) · 2.3 KB
/
ublue-update.spec.rpkg
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
Name: {{{ git_dir_name }}}
Vendor: ublue-os
Version: {{{ ublue_update_version }}}
Release: 1%{?dist}
Summary: Centralized update service/checker made for Universal Blue
License: Apache-2.0
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 }}}
BuildArch: noarch
Supplements: rpm-ostree flatpak
BuildRequires: make
BuildRequires: systemd-rpm-macros
BuildRequires: black
BuildRequires: ShellCheck
BuildRequires: python-flake8
BuildRequires: python-build
BuildRequires: python-setuptools
BuildRequires: python
BuildRequires: python-devel
BuildRequires: pyproject-rpm-macros
BuildRequires: python-setuptools_scm
BuildRequires: python-wheel
Requires: skopeo
Requires: libnotify
%global sub_name %{lua:t=string.gsub(rpm.expand("%{NAME}"), "^ublue%-", ""); print(t)}
%description
Installs and configures ublue-update script, systemd services, and systemd timers for auto update
%prep
{{{ git_dir_setup_macro }}}
%build
ls
ls src
black src
flake8 src
shellcheck files/etc/%{NAME}.d/*.sh
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files ublue_update
cp -rp files/etc files/usr %{buildroot}
%post
%systemd_user_post %{NAME}.timer
%preun
%systemd_user_preun %{NAME}.timer
%files -f %{pyproject_files}
%attr(0755,root,root) %{_bindir}/%{name}
%attr(0644,root,root) %{_exec_prefix}/lib/systemd/user/%{NAME}.service
%attr(0644,root,root) %{_exec_prefix}/lib/systemd/user/%{NAME}.timer
%attr(0644,root,root) %{_exec_prefix}/lib/systemd/user-preset/00-%{NAME}.preset
%attr(0644,root,root) %{_exec_prefix}/etc/%{NAME}/%{NAME}.toml
%attr(0755,root,root) %{_sysconfdir}/%{NAME}.d/00-system-update.sh
%attr(0755,root,root) %{_sysconfdir}/%{NAME}.d/01-flatpak-system-update.sh
%attr(0755,root,root) %{_sysconfdir}/%{NAME}.d/02-flatpak-user-update.sh
%attr(0755,root,root) %{_sysconfdir}/%{NAME}.d/03-flatpak-system-repair-cleanup.sh
%attr(0755,root,root) %{_sysconfdir}/%{NAME}.d/04-flatpak-user-repair-cleanup.sh
%attr(0755,root,root) %{_sysconfdir}/%{NAME}.d/05-distrobox-user-update.sh
%changelog
%autochangelog