2018-07-02 16:53:41 +02:00
|
|
|
#
|
|
|
|
# spec file for package rpm-config-SUSE
|
|
|
|
#
|
2022-01-19 16:19:17 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2018-07-02 16:53:41 +02:00
|
|
|
# Copyright (c) 2018 Neal Gompa <ngompa13@gmail.com>.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-01-20 13:52:26 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-07-02 16:53:41 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: rpm-config-SUSE
|
2022-09-23 11:28:03 +02:00
|
|
|
Version: 20220421
|
2018-07-02 16:53:41 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: SUSE specific RPM configuration files
|
|
|
|
License: GPL-2.0-or-later
|
2021-06-25 15:47:15 +02:00
|
|
|
Group: System/Packages
|
2018-07-02 16:53:41 +02:00
|
|
|
URL: https://github.com/openSUSE/rpm-config-SUSE
|
2022-04-14 15:11:59 +02:00
|
|
|
Source: %{name}-%{version}.tar.zst
|
|
|
|
BuildRequires: zstd
|
2022-03-18 13:18:10 +01:00
|
|
|
#!BuildIgnore: rpm-config-SUSE
|
2018-07-02 16:53:41 +02:00
|
|
|
# RPM owns the directories we need
|
|
|
|
Requires: rpm
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
2022-04-14 14:56:59 +02:00
|
|
|
This package contains the RPM configuration data for the SUSE and
|
|
|
|
openSUSE distribution families.
|
2018-07-02 16:53:41 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
# Set up the SUSE Linux version macros
|
|
|
|
sed -e 's/@suse_version@/%{?suse_version}%{!?suse_version:0}/' \
|
|
|
|
-e 's/@sles_version@/%{?sles_version}%{!?sles_version:0}/' \
|
|
|
|
-e 's/@ul_version@/%{?ul_version}%{!?ul_version:0}/' \
|
|
|
|
-e '/@is_opensuse@%{?is_opensuse:nomatch}/d' \
|
|
|
|
-e 's/@is_opensuse@/%{?is_opensuse}%{!?is_opensuse:0}/' \
|
2021-04-14 14:08:27 +02:00
|
|
|
%if 0%{?usrmerged}
|
|
|
|
-e 's/@usrmerged@/%{?usrmerged}/' \
|
|
|
|
%else
|
|
|
|
-e '/@usrmerged@/d' \
|
|
|
|
%endif
|
2018-07-02 16:53:41 +02:00
|
|
|
%if 0%{?is_opensuse}
|
|
|
|
-e '/@sle_version@%{?sle_version:nomatch}/d' \
|
|
|
|
-e 's/@sle_version@/%{?sle_version}%{!?sle_version:0}/' \
|
|
|
|
%else
|
|
|
|
-e '/@sle_version@/d' \
|
|
|
|
%endif
|
|
|
|
< suse_macros.in > suse_macros
|
|
|
|
|
2022-04-21 14:54:00 +02:00
|
|
|
%if 0%{?is_opensuse}
|
|
|
|
cat <<EOF > macros.d/macros.opensuse
|
|
|
|
# trim binary changelogs to include roughly 3 years
|
|
|
|
# maxnum,cuttime,minnum
|
|
|
|
%%_binarychangelogtrim 0,$(date -d "Jan 1 UTC 3 years ago" +%s),10
|
|
|
|
EOF
|
|
|
|
%endif
|
|
|
|
|
2022-04-14 14:54:14 +02:00
|
|
|
cat <<EOF > macros.d/macros.sbat
|
|
|
|
# Common SBAT values for secure boot
|
|
|
|
# https://github.com/rhboot/shim/blob/main/SBAT.md
|
|
|
|
|
|
|
|
%if 0%{?is_opensuse}
|
|
|
|
%%sbat_distro opensuse
|
|
|
|
%%sbat_distro_summary The openSUSE Project
|
|
|
|
%else
|
|
|
|
%%sbat_distro sle
|
|
|
|
%%sbat_distro_summary SUSE Linux Enterprise
|
|
|
|
%endif
|
|
|
|
%%sbat_distro_url mailto:security@suse.de
|
|
|
|
EOF
|
|
|
|
|
2018-07-02 16:53:41 +02:00
|
|
|
%install
|
|
|
|
# Install SUSE vendor macros and rpmrc
|
|
|
|
mkdir -p %{buildroot}%{_rpmconfigdir}/suse
|
|
|
|
cp -a suse_macros %{buildroot}%{_rpmconfigdir}/suse/macros
|
|
|
|
|
|
|
|
# Install vendor dependency generators
|
|
|
|
cp -a fileattrs %{buildroot}%{_rpmconfigdir}
|
|
|
|
cp -a scripts/* %{buildroot}%{_rpmconfigdir}
|
|
|
|
cp -a macros.d %{buildroot}%{_rpmconfigdir}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license COPYING
|
|
|
|
%doc README.md
|
|
|
|
%{_rpmconfigdir}/suse/
|
|
|
|
%{_rpmconfigdir}/macros.d/macros.*
|
|
|
|
%{_rpmconfigdir}/fileattrs/*
|
|
|
|
%{_rpmconfigdir}/brp-suse
|
|
|
|
%{_rpmconfigdir}/firmware.prov
|
|
|
|
%{_rpmconfigdir}/sysvinitdeps.sh
|
2019-10-10 17:22:50 +02:00
|
|
|
%{_rpmconfigdir}/locale.prov
|
2018-07-02 16:53:41 +02:00
|
|
|
# kmod deps
|
|
|
|
%{_rpmconfigdir}/find-provides.ksyms
|
|
|
|
%{_rpmconfigdir}/find-requires.ksyms
|
|
|
|
%{_rpmconfigdir}/find-supplements.ksyms
|
|
|
|
|
|
|
|
%changelog
|