# To ensure this is always installable even when _vendor is different
%global dist_vendor midipix
Name: midipix-rpm-config
Version: 0
Release: 0%{?dist}
Summary: Midipix specific rpm configuration files
# From GROUPS
Group: System Environment/Base
# License identifer from: https://fedoraproject.org/wiki/Licensing:Main#Software_License_List
License: GPLv2+
URL: https://midipix.org
Source0: %{name}-%{version}.tar.gz
BuildRequires: rpm >= 4.15.1
Requires: rpm >= 4.15.1
# Generic Provides for alternatives to this package,
# to make it easy to replace this with a different vendor config
# One of these names should be required by the rpm-build package.
Provides: system-rpm-config = %{version}-%{release}
Provides: distribution-rpm-config = %{version}-%{release}
BuildArch: noarch
%description
This package provides the base Midipix-specific configuration
for RPM so that packages produced by RPM in the Midipix environment
are built consistently.
%prep
%autosetup
%build
# Nothing to build
%install
# Install main vendor files
mkdir -p %{buildroot}%{_rpmconfigdir}/%{_dist_vendor}
install -tpm 0644 %{buildroot}%{_rpmconfigdir}/%{_dist_vendor} %{_dist_vendor}/*
# Install other macros
mkdir -p %{buildroot}%{_rpmmacrodir}
install -tpm 0644 %{buildroot}%{_rpmmacrodir} macros.d/*
# Install dependency generators
mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs
install -tpm 0644 %{buildroot}%{_rpmconfigdir}/fileattrs fileattrs/*.attr
%files
%license COPYING
%doc README.md
%{_rpmconfigdir}/%{_dist_vendor}/
%{_rpmconfigdir}/fileattrs/*.attr
%{_rpmmacrodir}/macros.*
%changelog