drop %ghc_licensedir and look for license correctly

epel9
Jens Petersen 9 years ago
parent d0eef0681b
commit 83eef9382a

@ -25,7 +25,7 @@ fi
%global _hardened_ldflags %{nil}\ %global _hardened_ldflags %{nil}\
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ 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 # install
%cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} %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}\ %cabal test %{?cabal_verbose}\
%endif %endif
%ghc_licensedir %{_defaultlicensedir}/%{name}
# no _pkgdocdir in EPEL <= 7 # no _pkgdocdir in EPEL <= 7
%ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
@ -82,7 +80,7 @@ fi\
if [ -d "%{buildroot}%{docdir}" ]; then\ if [ -d "%{buildroot}%{docdir}" ]; then\
echo "%{docdir}" >> %{basepkg}-devel.files\ echo "%{docdir}" >> %{basepkg}-devel.files\
fi\ 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\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\
done\ done\
for i in %{basepkg}.files %{basepkg}-devel.files; do\ for i in %{basepkg}.files %{basepkg}-devel.files; do\

Loading…
Cancel
Save