|
|
|
@ -28,7 +28,7 @@ fi
|
|
|
|
|
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
|
|
|
|
|
%endif\
|
|
|
|
|
LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\
|
|
|
|
|
%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="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options
|
|
|
|
|
%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(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}
|
|
|
|
@ -73,9 +73,9 @@ rm -f %{basepkg}.files %{basepkg}-devel.files\
|
|
|
|
|
touch %{basepkg}.files %{basepkg}-devel.files\
|
|
|
|
|
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
|
|
|
|
|
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
|
|
|
|
echo "%dir ${pkgdir}" >> %{basepkg}.files\
|
|
|
|
|
echo "%%dir ${pkgdir}" >> %{basepkg}.files\
|
|
|
|
|
%if %{undefined ghc_without_shared}\
|
|
|
|
|
echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
|
|
|
|
echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
|
|
|
|
%endif\
|
|
|
|
|
find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
|
|
|
|
|
find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\
|
|
|
|
@ -83,7 +83,7 @@ fi\
|
|
|
|
|
if [ -d "%{buildroot}%{docdir}" ]; then\
|
|
|
|
|
echo "%{docdir}" >> %{basepkg}-devel.files\
|
|
|
|
|
fi\
|
|
|
|
|
for i in $(ls %{buildroot}%{_defaultlicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\
|
|
|
|
|
for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\
|
|
|
|
|
echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\
|
|
|
|
|
done\
|
|
|
|
|
for i in %{basepkg}.files %{basepkg}-devel.files; do\
|
|
|
|
@ -115,7 +115,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.
|
|
|
|
|
# ghc_lib_build_without_haddock [name] [version]
|
|
|
|
|
%ghc_lib_build_without_haddock()\
|
|
|
|
|
%global debug_package %{nil}\
|
|
|
|
|
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_defaultlicensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
|
|
|
|
|
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
|
|
|
|
|
%cabal build %{?cabal_verbose}\
|
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|