Blame SPECS/man-pages-overrides.spec

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