diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4775be7..a7c1e74 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -137,7 +137,8 @@ EOF %changelog * Fri Aug 26 2016 Jens Petersen - 1.6.6-1 - ghc_gen_filelists: support packages with more than one license file -- move licenses out of docdir instead of removing, also for ghc_bin_install +- move licenses from docdir to licensedir instead of removing, + also for ghc_bin_install * Thu Aug 25 2016 Jens Petersen - 1.6.5-1 - ghc_gen_filelists now handles license files automatically diff --git a/macros.ghc b/macros.ghc index 30e4596..7eb8646 100644 --- a/macros.ghc +++ b/macros.ghc @@ -80,7 +80,7 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{_docdir}/%{basepkg}/); do\ +for i in $(ls %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg})/); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\