| |
@@ -82,6 +82,21 @@
|
| |
# Documentation
|
| |
Source900: buildflags.md
|
| |
|
| |
+ # Spec templates
|
| |
+ # Because redhat-rpm-config does not have a proper upstream repository like
|
| |
+ # everyone else files end up directly in the src.rpm. Therefore, use a fake
|
| |
+ # extension for example spec files as otherwise copr tries to build them
|
| |
+ # instead of the main spec file. However, that also means pretty much every dev
|
| |
+ # tool from text editors to SCM web frontends won't apply the correct syntax
|
| |
+ # highlighting when inspecting those files. And the spec files get more
|
| |
+ # complicated as a result. This sucks.
|
| |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1655322
|
| |
+ Source950: spectemplate-forge-0-release.fake
|
| |
+ Source951: spectemplate-forge-1-tag.fake
|
| |
+ Source952: spectemplate-forge-2-commit.fake
|
| |
+ Source953: spectemplate-forge-3-multi.fake
|
| |
+ Source954: spectemplate-forge-4-branch.fake
|
| |
+
|
| |
BuildArch: noarch
|
| |
BuildRequires: perl-generators
|
| |
Requires: coreutils
|
| |
@@ -115,24 +130,43 @@
|
| |
Conflicts: gcc < 8.0.1-0.22
|
| |
|
| |
Provides: system-rpm-config = %{version}-%{release}
|
| |
+ Provides: redhat-rpm-macros = %{version}-%{release}
|
| |
|
| |
%global rrcdir /usr/lib/rpm/redhat
|
| |
+ # Pull in _spectemplatedir definition, the spec file uses it
|
| |
+ %{load:%{SOURCE100}}
|
| |
|
| |
%description
|
| |
Red Hat specific rpm configuration files.
|
| |
|
| |
%package -n kernel-rpm-macros
|
| |
Summary: Macros and scripts for building kernel module packages
|
| |
- Requires: redhat-rpm-config >= 13
|
| |
+ Requires: %{name} = %{version}-%{release}
|
| |
|
| |
%description -n kernel-rpm-macros
|
| |
Macros and scripts for building kernel module packages.
|
| |
|
| |
+ %package -n redhat-rpm-templates
|
| |
+ Summary: Example rpm spec templates for the macros provided by %{name}
|
| |
+ BuildArch: noarch
|
| |
+ Requires: %{name} = %{version}-%{release}
|
| |
+ Requires: rpmdevtools
|
| |
+
|
| |
+ %description -n redhat-rpm-templates
|
| |
+ This package contains documented rpm spec templates showcasing how to use the
|
| |
+ macros provided by %{name}.
|
| |
+
|
| |
%prep
|
| |
# Not strictly necessary but allows working on file names instead
|
| |
# of source numbers in install section
|
| |
%setup -c -T
|
| |
cp -p %{sources} .
|
| |
+ for template in spectemplate*\.fake ; do
|
| |
+ rad="${template%.fake}"
|
| |
+ mv "${rad}.fake" "${rad}.spec"
|
| |
+ grep -v '^#' "${rad}.spec" > "${rad}-bare.spec"
|
| |
+ touch -r "${rad}.spec" "${rad}-bare.spec"
|
| |
+ done
|
| |
|
| |
%install
|
| |
mkdir -p %{buildroot}%{rrcdir}
|
| |
@@ -161,6 +195,10 @@
|
| |
install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora common.lua
|
| |
install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
| |
|
| |
+ install -m 0755 -vd %{buildroot}%{_spectemplatedir}
|
| |
+ install -m 0644 -vp spectemplate*\.spec \
|
| |
+ %{buildroot}%{_spectemplatedir}
|
| |
+
|
| |
%files
|
| |
%dir %{rrcdir}
|
| |
%{rrcdir}/macros
|
| |
@@ -185,7 +223,7 @@
|
| |
%dir %{_rpmluadir}/fedora
|
| |
%dir %{_rpmluadir}/fedora/srpm
|
| |
%dir %{_rpmluadir}/fedora/rpm
|
| |
- %{_rpmluadir}/fedora/*.lua
|
| |
+ %{_rpmluadir}/fedora/*lua
|
| |
%{_rpmluadir}/fedora/srpm/*lua
|
| |
|
| |
%doc buildflags.md
|
| |
@@ -201,6 +239,9 @@
|
| |
%{rrcdir}/find-provides.d/modalias.prov
|
| |
%{_rpmconfigdir}/macros.d/macros.kmp
|
| |
|
| |
+ %files -n redhat-rpm-templates
|
| |
+ %{_spectemplatedir}/*.spec
|
| |
+
|
| |
%changelog
|
| |
* Mon Jul 01 2019 Florian Festi <ffesti@redhat.com> - 134-1
|
| |
- Switch binary payload compression to Zstandard level 19
|
| |
Obsoletes
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/49
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/47
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/46
because it is all taking too long and I’m sick of playing branch ping pong