2024-06-14 13:22:43 -04:00
|
|
|
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
2023-11-13 09:33:28 -05:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
|
|
|
%define file_roots %(./scripts/spec-get.sh @PROJECT@ file_roots)
|
|
|
|
%define my_name %(./scripts/spec-get.sh @PROJECT@ name)
|
|
|
|
%define branch %(./scripts/spec-get.sh @PROJECT@ branch)
|
|
|
|
%define project %(./scripts/spec-get.sh @PROJECT@ project)
|
|
|
|
%define summary %(./scripts/spec-get.sh @PROJECT@ summary)
|
|
|
|
%define group %(./scripts/spec-get.sh @PROJECT@ group)
|
2024-06-14 13:22:43 -04:00
|
|
|
%define packager %(./scripts/spec-get.sh @PROJECT@ packager)
|
2023-11-13 09:33:28 -05:00
|
|
|
%define vendor %(./scripts/spec-get.sh @PROJECT@ vendor)
|
|
|
|
%define license_csv %(./scripts/spec-get.sh @PROJECT@ license_csv)
|
|
|
|
%define license %(./scripts/spec-get.sh @PROJECT@ license)
|
|
|
|
%define url %(./scripts/spec-get.sh @PROJECT@ url)
|
2024-06-14 13:22:43 -04:00
|
|
|
%define bug_url %(./scripts/spec-get.sh @PROJECT@ bug_url)
|
2023-11-13 09:33:28 -05:00
|
|
|
%define my_description %(./scripts/spec-get.sh @PROJECT@ description)
|
|
|
|
|
2024-06-13 08:04:18 -04:00
|
|
|
## Reproducibility.
|
|
|
|
%define source_date_epoch_from_changelog 1
|
|
|
|
%define use_source_date_epoch_as_buildtime 1
|
|
|
|
%define clamp_mtime_to_source_date_epoch 1
|
|
|
|
# Changelog is trimmed according to current date, not last date from changelog.
|
|
|
|
%define _changelog_trimtime 0
|
|
|
|
%define _changelog_trimage 0
|
|
|
|
%global _buildhost %{name}
|
|
|
|
# Python bytecode interferes when updates occur and restart is not done.
|
|
|
|
%undefine __brp_python_bytecompile
|
|
|
|
|
2023-11-13 09:33:28 -05:00
|
|
|
Name: %{project}
|
|
|
|
Version: @VERSION@
|
2024-06-12 08:44:04 -04:00
|
|
|
Release: 1%{?dist}
|
2023-11-13 09:33:28 -05:00
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
Group: %{group}
|
2024-06-14 13:22:43 -04:00
|
|
|
Packager: %{packager}
|
2023-11-13 09:33:28 -05:00
|
|
|
Vendor: %{vendor}
|
|
|
|
License: %{license}
|
|
|
|
URL: %{url}
|
2024-06-14 13:22:43 -04:00
|
|
|
BugURL: %{bug_url}
|
2023-11-13 09:33:28 -05:00
|
|
|
Source0: %{project}
|
2024-06-12 08:44:04 -04:00
|
|
|
BuildArch: noarch
|
2023-11-13 09:33:28 -05:00
|
|
|
|
2024-06-12 08:44:04 -04:00
|
|
|
Requires: qubes-mgmt-salt
|
|
|
|
Requires: qubes-mgmt-salt-dom0
|
2023-11-13 09:33:28 -05:00
|
|
|
@REQUIRES@
|
|
|
|
|
|
|
|
%description
|
|
|
|
%{my_description}
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
2024-06-14 13:22:43 -04:00
|
|
|
install -m 755 -d \
|
|
|
|
%{buildroot}%{file_roots} \
|
|
|
|
%{buildroot}%{_docdir}/%{project} \
|
|
|
|
%{buildroot}%{_defaultlicensedir}/%{project}
|
|
|
|
install -m 644 %{project}/LICENSES/* %{buildroot}%{_defaultlicensedir}/%{project}/
|
|
|
|
install -m 644 %{project}/README.md %{buildroot}%{_docdir}/%{project}/
|
|
|
|
rm -rv %{project}/LICENSES %{project}/README.md
|
2023-11-13 09:33:28 -05:00
|
|
|
cp -rv %{project} %{buildroot}%{file_roots}/%{my_name}
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
2024-06-14 13:22:43 -04:00
|
|
|
%dnl %pre
|
2023-11-13 09:33:28 -05:00
|
|
|
|
|
|
|
%post
|
|
|
|
if test "$1" = "1"; then
|
|
|
|
## Install
|
|
|
|
@POST_INSTALL@
|
|
|
|
elif test "$1" = "2"; then
|
|
|
|
## Upgrade
|
|
|
|
@POST_UPGRADE@
|
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if test "$1" = "0"; then
|
|
|
|
## Uninstall
|
|
|
|
@PREUN_UNINSTALL@
|
|
|
|
elif test "$1" = "1"; then
|
|
|
|
## Upgrade
|
|
|
|
@PREUN_UPGRADE@
|
|
|
|
fi
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if test "$1" = "0"; then
|
|
|
|
## Uninstall
|
|
|
|
@POSTUN_UNINSTALL@
|
|
|
|
elif test "$1" = "1"; then
|
|
|
|
## Upgrade
|
|
|
|
@POSTUN_UPGRADE@
|
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2024-06-13 08:04:18 -04:00
|
|
|
%license %{_defaultlicensedir}/%{project}/*
|
2024-06-14 13:22:43 -04:00
|
|
|
%doc %{_docdir}/%{project}/README.md
|
2024-06-12 08:44:04 -04:00
|
|
|
%dir %{file_roots}/%{my_name}
|
|
|
|
%{file_roots}/%{my_name}/*
|
2024-06-14 13:22:43 -04:00
|
|
|
%dnl TODO: missing '%ghost', files generated during %post, such as Qrexec policies.
|
2023-11-13 09:33:28 -05:00
|
|
|
|
|
|
|
%changelog
|
2024-06-12 08:44:04 -04:00
|
|
|
@CHANGELOG@
|