From 701fee729481c7f2eaafe335761ef7343fb2378a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Aug 2016 10:02:44 +0900 Subject: [PATCH] %ghc_gen_filelists: improve license handling for binlib packages --- ghc-rpm-macros.spec | 3 ++- macros.ghc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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}/\