From 452a250213d0f5d2112450643b8848f52d4db5bb Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 27 Aug 2016 12:13:06 +0200 Subject: [PATCH] fix %license path when not subpackaging --- macros.ghc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros.ghc b/macros.ghc index dac15f2..30e4596 100644 --- a/macros.ghc +++ b/macros.ghc @@ -81,7 +81,7 @@ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ for i in $(ls %{buildroot}%{_docdir}/%{basepkg}/); do\ -echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ +echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\ done\ @@ -142,7 +142,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{name}\ -mv %{buildroot}%ghc_pkgdocdir/* %{buildroot}%{_defaultlicensedir}/%{name}/\ +mv %{buildroot}%{ghc_pkgdocdir}/* %{buildroot}%{_defaultlicensedir}/%{name}/\ %{!?1:%ghc_strip_dynlinked}\ %{nil}