cd6d0ce
# While we are in package playing with packaging principles, why about having
cd6d0ce
# this solved in redhat-rpm-config too?  (Also for RHELs which are alive, or
cd6d0ce
# EPELs otherwise).
cd6d0ce
%{!?_licensedir:%global license %doc}
cd6d0ce
cd6d0ce
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_of_Additional_RPM_Macros
cd6d0ce
%global macrosdir       %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
cd6d0ce
cd6d0ce
%global rrcdir          %_libexecdir
cd6d0ce
cd6d0ce
Summary: Multilib packaging helpers
cd6d0ce
Name: multilib-rpm-config
cd6d0ce
Version: 1
f2fed85
Release: 5%{?dist}
cd6d0ce
License: GPLv2+
cd6d0ce
URL: https://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks
cd6d0ce
cd6d0ce
Source0: multilib-fix
cd6d0ce
Source1: macros.ml
cd6d0ce
Source2: README
cd6d0ce
Source3: COPYING
cd6d0ce
cd6d0ce
BuildArch: noarch
cd6d0ce
cd6d0ce
# Most probably we want to move everything here?
cd6d0ce
Requires: redhat-rpm-config
cd6d0ce
cd6d0ce
%description
cd6d0ce
Set of tools (shell scripts, RPM macro files) to help with multilib packaging
cd6d0ce
issues.
cd6d0ce
cd6d0ce
cd6d0ce
%prep
cd6d0ce
%setup -c -T
cd6d0ce
install -m 644 %{SOURCE2} %{SOURCE3} .
cd6d0ce
cd6d0ce
cd6d0ce
%build
cd6d0ce
%global ml_fix %rrcdir/multilib-fix
cd6d0ce
sed -e 's|@ML_FIX@|%ml_fix|g' \
cd6d0ce
    %{SOURCE1} > macros.multilib
cd6d0ce
cd6d0ce
cd6d0ce
%install
cd6d0ce
mkdir -p %{buildroot}%{rrcdir}
cd6d0ce
mkdir -p %{buildroot}%{macrosdir}
cd6d0ce
install -m 644 -p macros.multilib %{buildroot}/%{macrosdir}
cd6d0ce
install -m 755 -p %{SOURCE0} %{buildroot}/%{ml_fix}
cd6d0ce
cd6d0ce
cd6d0ce
%files
cd6d0ce
%license COPYING
cd6d0ce
%doc README
cd6d0ce
%{rrcdir}/*
cd6d0ce
%{macrosdir}/*
cd6d0ce
cd6d0ce
cd6d0ce
%changelog
f2fed85
* Wed Jun 22 2016 Pavel Raiskup <praiskup@redhat.com> - 1-5
f2fed85
- document why there is no need for '#else' in the replacement header
f2fed85
9f438cf
* Mon Jun 13 2016 Pavel Raiskup <praiskup@redhat.com> - 1-4
aeb305b
- use '-' as a field separator by default
9f438cf
cd6d0ce
* Thu Jun 09 2016 Pavel Raiskup <praiskup@redhat.com> - 1-3
cd6d0ce
- package separately from redhat-rpm-config
cd6d0ce
cd6d0ce
* Fri Nov 27 2015 Pavel Raiskup <praiskup@redhat.com> - 1-2
cd6d0ce
- fix licensing in Sources
cd6d0ce
- allow undefined %%namespace
cd6d0ce
cd6d0ce
* Wed Nov 18 2015 Pavel Raiskup <praiskup@redhat.com> - 1-1
cd6d0ce
- initial packaging