- use gen_contents_index to re-index haddock
- add %%pkg_docdir to cabal_configure - requires(post) ghc for haddock for doc - improve doc file lists - no longer need to create ghost package.conf.old - remove or rename alternatives files more consistently
This commit is contained in:
parent
4b8e6f699e
commit
c7ae1a2bd5
@ -1,2 +1,2 @@
|
||||
ghc-6.8.3-src-extralibs.tar.bz2
|
||||
ghc-6.8.3-src.tar.bz2
|
||||
ghc-6.10.0.20081007-src.tar.bz2
|
||||
ghc-6.10.0.20081007-src-extralibs.tar.bz2
|
||||
|
@ -1,7 +1,7 @@
|
||||
%cabal %{_bindir}/runhaskell Setup
|
||||
|
||||
%cabal_configure \
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{_docdir}/%{hsc_name}/libraries/%{pkg_name} --haddockdir=%{_docdir}/%{hsc_name}/libraries/%{pkg_name} --libsubdir='$compiler/$pkgid'
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{pkg_docdir} --haddockdir=%{pkg_docdir} --libsubdir='$compiler/$pkgid'
|
||||
|
||||
%cabal_build \
|
||||
%cabal build \
|
||||
@ -56,10 +56,5 @@ install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{pkg_libdir} \
|
||||
%{nil}
|
||||
|
||||
%ghc_reindex_haddock \
|
||||
if [ -f %{_bindir}/haddock -a -d %{_docdir}/%{hsc_name}/libraries ]; then \
|
||||
cd %{_docdir}/%{hsc_name}/libraries && \
|
||||
haddock --gen-index --gen-contents -o . -t 'Haskell Hierarchical Libraries' \\\
|
||||
$(find . \\( \\( -path ./ghc -o -path ./ghc-prim \\) -prune \\) -o \\( -name '*.haddock' -print \\) \\\
|
||||
| sed 's!.*/\\([^/]*\\).haddock!--read-interface=\\1,\\0!'); \
|
||||
fi \
|
||||
( cd %{_docdir}/ghc/libraries && ./gen_contents_index ) || : \
|
||||
%{nil}
|
||||
|
48
ghc.spec
48
ghc.spec
@ -16,7 +16,7 @@
|
||||
|
||||
Name: ghc
|
||||
Version: 6.10.0.20081007
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Glasgow Haskell Compilation system
|
||||
# See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239713
|
||||
ExcludeArch: alpha ppc64
|
||||
@ -65,6 +65,8 @@ needed.
|
||||
Summary: Documentation for GHC
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
# for haddock
|
||||
Requires(post): %{name} = %{version}-%{release}
|
||||
|
||||
%description doc
|
||||
Preformatted documentation for the Glorious Glasgow Haskell
|
||||
@ -126,7 +128,8 @@ cp -p %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc
|
||||
SRC_TOP=$PWD
|
||||
rm -f rpm-*-filelist rpm-*.files
|
||||
( cd $RPM_BUILD_ROOT
|
||||
find .%{_libdir}/%{name}-%{version} \( -type d -fprintf $SRC_TOP/rpm-dir.files "%%%%dir %%p\n" \) -o \( -type f \( -name '*.p_hi' -o -name '*_p.a' \) -fprint $SRC_TOP/rpm-prof.files \) -o \( -not -name 'package.conf' -fprint $SRC_TOP/rpm-lib.files \)
|
||||
find .%{_libdir}/%{name}-%{version} \( -type d -fprintf $SRC_TOP/rpm-dir.files "%%%%dir %%p\n" \) -o \( -type f \( -name '*.p_hi' -o -name '*_p.a' \) -fprint $SRC_TOP/rpm-prof.files \) -o \( -not -name 'package.conf*' -fprint $SRC_TOP/rpm-lib.files \)
|
||||
find .%{_docdir}/%{name}/* -type d ! -name libraries > $SRC_TOP/rpm-doc-dir.files
|
||||
)
|
||||
|
||||
# make paths absolute (filter "./usr" to "/usr")
|
||||
@ -137,19 +140,21 @@ cat rpm-dir.files rpm-lib.files > rpm-base-filelist
|
||||
cat rpm-dir.files rpm-prof.files > rpm-prof-filelist
|
||||
%endif
|
||||
|
||||
# create package.conf.old
|
||||
touch $RPM_BUILD_ROOT%{_libdir}/ghc-%{version}/package.conf.old
|
||||
|
||||
# these are handled as alternatives
|
||||
mv ${RPM_BUILD_ROOT}%{_bindir}/hsc2hs{,-ghc}
|
||||
rm ${RPM_BUILD_ROOT}%{_bindir}/runhaskell
|
||||
for i in hsc2hs runhaskell; do
|
||||
if [ -x ${RPM_BUILD_ROOT}%{_bindir}/$i-ghc ]; then
|
||||
rm ${RPM_BUILD_ROOT}%{_bindir}/$i
|
||||
else
|
||||
mv ${RPM_BUILD_ROOT}%{_bindir}/$i{,-ghc}
|
||||
fi
|
||||
done
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
semanage fcontext -a -t unconfined_execmem_exec_t %{_libdir}/ghc-%{version}/ghc >/dev/null 2>&1 || :
|
||||
restorecon %{_libdir}/ghc-%{version}/ghc >/dev/null
|
||||
restorecon %{_libdir}/ghc-%{version}/ghc
|
||||
|
||||
# Alas, GHC, Hugs, and nhc all come with different set of tools in
|
||||
# addition to a runFOO:
|
||||
@ -170,11 +175,7 @@ update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
||||
|
||||
|
||||
%post doc
|
||||
cd %{_docdir}/ghc/libraries && \
|
||||
haddock --gen-index --gen-contents -o . -t 'Haskell Hierarchical Libraries' \
|
||||
$(find . \( \( -path ./ghc -o -path ./ghc-prim \) -prune \) -o \( -name '*.haddock' -print \) \
|
||||
| sed 's!.*/\([^/]*\).haddock!--read-interface=\1,\0!')
|
||||
|
||||
( cd %{_docdir}/ghc/libraries && ./gen_contents_index ) || :
|
||||
|
||||
%preun
|
||||
if test "$1" = 0; then
|
||||
@ -200,9 +201,12 @@ fi
|
||||
|
||||
|
||||
%if %{build_doc}
|
||||
%files doc
|
||||
%files doc -f rpm-doc-dir.files
|
||||
%defattr(-,root,root,-)
|
||||
%{_docdir}/%{name}
|
||||
%dir %{_docdir}/%{name}
|
||||
%{_docdir}/%{name}/index.html
|
||||
%{_docdir}/%{name}/libraries/gen_contents_index
|
||||
%dir %{_docdir}/%{name}/libraries
|
||||
%ghost %{_docdir}/%{name}/libraries/doc-index.html
|
||||
%ghost %{_docdir}/%{name}/libraries/haddock.css
|
||||
%ghost %{_docdir}/%{name}/libraries/haddock-util.js
|
||||
@ -214,6 +218,14 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Oct 23 2008 Jens Petersen <petersen@redhat.com> - 6.10.0.20081007-7
|
||||
- use gen_contents_index to re-index haddock
|
||||
- add %%pkg_docdir to cabal_configure
|
||||
- requires(post) ghc for haddock for doc
|
||||
- improve doc file lists
|
||||
- no longer need to create ghost package.conf.old
|
||||
- remove or rename alternatives files more consistently
|
||||
|
||||
* Tue Oct 14 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.10.0.20081007-6
|
||||
- Update macros to install html and haddock bits in the right places
|
||||
|
||||
@ -241,7 +253,7 @@ fi
|
||||
- Drop unneeded haddock patch
|
||||
- Rename hsc2hs to hsc2hs-ghc so the alternatives symlink to it will work
|
||||
|
||||
* Wed Sep 24 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-5.fc10
|
||||
* Wed Sep 24 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-5
|
||||
- bring back including haddock-generated lib docs, now under docdir/ghc
|
||||
- fix macros.ghc filepath (#460304)
|
||||
- spec file cleanups:
|
||||
@ -251,9 +263,9 @@ fi
|
||||
- setup docs building in build.mk
|
||||
- no longer need to remove network/include/Typeable.h
|
||||
- install binaries under libdir not libexec
|
||||
- remove hsc2hs and runhaskell binaries since are alternatives
|
||||
- remove hsc2hs and runhaskell binaries since they are alternatives
|
||||
|
||||
* Wed Sep 17 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-4.fc10
|
||||
* Wed Sep 17 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-4
|
||||
- add macros.ghc for new Haskell Packaging Guidelines (#460304)
|
||||
|
||||
* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.8.3-3
|
||||
|
Loading…
Reference in New Issue
Block a user