Blame SPECS/man-pages-overrides.spec

21adc7
%global debug_package   %{nil}
21adc7
21adc7
Summary: Complementary and updated manual pages
21adc7
Name: man-pages-overrides
21adc7
Version: 9.0.0.0
21adc7
Release: 1%{?dist}
21adc7
# license is the same as for the man-pages package
21adc7
License: GPL+ and GPLv2+ and BSD and MIT and Copyright only and IEEE
21adc7
# there is no public download location for this package
21adc7
Source: man-pages-overrides-%{version}.tar.xz
21adc7
21adc7
Patch0: 1706882-mpo-9.0.0.0-rpc.3.patch
21adc7
21adc7
BuildArch: noarch
21adc7
21adc7
# make sure man-pages-overrides is installed with man-pages
21adc7
Supplements: man-pages
21adc7
21adc7
%description
21adc7
A collection of manual ("man") pages to complement other packages or update
21adc7
those contained therein. Always have the latest version of this package
21adc7
installed.
21adc7
21adc7
%prep
21adc7
%autosetup -p1
21adc7
# remove unwanted *.orig files
21adc7
find -name "*.orig" -delete
21adc7
21adc7
%build
21adc7
# nothing to build
21adc7
21adc7
%install
21adc7
mkdir -p $RPM_BUILD_ROOT%{_mandir}/overrides
21adc7
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
21adc7
for i in *; do
21adc7
    if [[ -d "$i" ]]; then
21adc7
        for j in $(ls "$i"); do
21adc7
           if [[ -d "$i/$j" ]]; then
21adc7
               mkdir -p "$RPM_BUILD_ROOT%{_mandir}/overrides/$j"
21adc7
               for k in $(ls "$i/$j"); do
21adc7
                   if [[ -d "$i/$j/$k" ]]; then
21adc7
                       mkdir -p "$RPM_BUILD_ROOT%{_mandir}/overrides/$j/$k"
21adc7
                       cp -f "$i/$j/$k"/* "$RPM_BUILD_ROOT%{_mandir}/overrides/$j/$k"
21adc7
                   else
21adc7
                       cp -f "$i/$j"/* "$RPM_BUILD_ROOT%{_mandir}/overrides/$j"
21adc7
                   fi
21adc7
               done
21adc7
           else
21adc7
              mkdir -p "$RPM_BUILD_ROOT%{_docdir}/%{name}/$i"
21adc7
              cp "$i/$j" "$RPM_BUILD_ROOT%{_docdir}/%{name}/$i"
21adc7
           fi
21adc7
        done
21adc7
    fi
21adc7
done
21adc7
21adc7
%files
21adc7
%doc %{_docdir}/%{name}
21adc7
%{_mandir}/overrides/
21adc7
21adc7
%changelog
21adc7
* Mon Nov 30 2020 Nikola Forró <nforro@redhat.com> - 9.0.0.0-1
21adc7
- Initial package for RHEL 9