43b24a206d
- drop ghc-requires script for now
39 lines
1.6 KiB
Plaintext
39 lines
1.6 KiB
Plaintext
%cabal %{_bindir}/runghc Setup
|
|
|
|
%cabal_configure \
|
|
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid'
|
|
|
|
%cabal_makefile \
|
|
%cabal makefile -f cabal-rpm.mk \
|
|
make -f cabal-rpm.mk %{_smp_mflags} \
|
|
%{nil}
|
|
|
|
%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v
|
|
|
|
%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version}
|
|
%ghcpkgdir %{_libdir}/ghc-%(ghc --numeric-version)/%{?pkg_name}%{!?pkg_name:%name}-%{version}
|
|
|
|
%ghc_gen_filelists() \
|
|
rm -f %1-devel.files %1-prof.files %1-doc.files \
|
|
echo '%defattr(-,root,root,-)' > %1-devel.files \
|
|
find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \
|
|
find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \
|
|
echo '%defattr(-,root,root,-)' > %1-prof.files \
|
|
find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \
|
|
sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \
|
|
echo '%defattr(-,root,root,-)' > %1-doc.files \
|
|
echo '%{ghcdocdir}' >> %1-doc.files \
|
|
%{nil}
|
|
|
|
%ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script
|
|
|
|
%ghc_install_scripts install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{ghcpkgdir}
|
|
|
|
%ghc_register_pkg %{ghcpkgdir}/register.sh >/dev/null || :
|
|
|
|
%ghc_unregister_pkg %{ghcpkgdir}/unregister.sh >/dev/null || :
|
|
|
|
%ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :
|
|
|
|
%ghc_version %(ghc --numeric-version)
|