From 83eef9382a63b470c87b382132c55127cbf784ab Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 6 Sep 2016 19:09:36 +0900 Subject: [PATCH] drop %ghc_licensedir and look for license correctly --- macros.ghc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/macros.ghc b/macros.ghc index d7beaaf..a06299a 100644 --- a/macros.ghc +++ b/macros.ghc @@ -25,7 +25,7 @@ fi %global _hardened_ldflags %{nil}\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_licensedir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} @@ -36,8 +36,6 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal test %{?cabal_verbose}\ %endif -%ghc_licensedir %{_defaultlicensedir}/%{name} - # no _pkgdocdir in EPEL <= 7 %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -82,7 +80,7 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{ghc_licensedir}/); do\ +for i in $(ls %{buildroot}%{_defaultlicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\