From 2d136c953891cad07cc8dfefd024716822655a2b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 18 Aug 2016 14:24:03 +0900 Subject: [PATCH] %ghc_sublib_install: handle different license filenames --- macros.ghc-extra | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index 51433c1..07a63b3 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -85,8 +85,9 @@ name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ cd $name-$ver\ %ghc_lib_install $name $ver\ -echo "%%license $name-$ver/LICENSE" >> ghc-$name.files\ -rm %{buildroot}%{_docdir}/ghc-$name/LICENSE\ +LICENSE_FILE=$(ls %{buildroot}%{_docdir}/ghc-$name/)\ +echo "%%license $name-$ver/$LICENSE_FILE" >> ghc-$name.files\ +rm %{buildroot}%{_docdir}/ghc-$name/$LICENSE_FILE\ mv *.files ..\ cd ..\ done\