rpms/ghc/devel ghc.spec,1.114,1.115
Jens Petersen
petersen at fedoraproject.org
Sat Dec 12 10:47:39 UTC 2009
Author: petersen
Update of /cvs/extras/rpms/ghc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18188
Modified Files:
ghc.spec
Log Message:
- exclude ghc .conf file from package.conf.d in base package
- use ghc_reindex_haddock
- add scripts for ghc-ghc-devel and ghc-ghc-doc
- add doc bcond
Index: ghc.spec
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/ghc.spec,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -p -r1.114 -r1.115
--- ghc.spec 12 Dec 2009 03:59:37 -0000 1.114
+++ ghc.spec 12 Dec 2009 10:47:38 -0000 1.115
@@ -3,10 +3,11 @@
%ifarch %{ix86} x86_64
%bcond_without shared
%endif
+%bcond_without doc
# test builds can made faster and smaller by disabling profiled libraries
# (currently libHSrts_thr_p.a breaks no prof build)
%bcond_without prof
-# build users_guide, etc
+# build xml manuals (users_guide, etc)
%bcond_without manual
## default disabled options ##
@@ -23,7 +24,7 @@
Name: ghc
# break of haskell-platform-2009.2.0.2
Version: 6.12.1
-Release: 0.2%{?dist}
+Release: 0.3%{?dist}
Summary: Glasgow Haskell Compilation system
# fedora ghc has only been bootstrapped on the following archs:
ExclusiveArch: %{ix86} x86_64 ppc alpha
@@ -77,13 +78,17 @@ Preformatted documentation for the Glori
(GHC) and its libraries. It should be installed if you like to have local
access to the documentation in HTML format.
+%if %{with doc}
%package ghc-doc
Summary: Documentation for the ghc internals library
Group: Development/Languages
-Requires(posttrans): %{name} = %{version}-%{release}
+Requires: %{name}-doc = %{version}
+Requires(post): %{name}-doc = %{version}
+Requires(postun): %{name}-doc = %{version}
%description ghc-doc
Documentation for the ghc internals library.
+%endif
%package ghc-devel
Summary: Development files for ghc internals
@@ -147,8 +152,10 @@ cat > mk/build.mk << EOF
%if %{without prof}
GhcLibWays = v %{?with_shared:dyn}
%endif
-%if %{without manual}
+%if %{without doc}
HADDOCK_DOCS = NO
+%endif
+%if %{without manual}
BUILD_DOCBOOK_HTML = NO
%endif
%if %{with quick}
@@ -190,7 +197,7 @@ SRC_TOP=$PWD
( cd $RPM_BUILD_ROOT
find .%{_libdir}/%{name}-%{version} -maxdepth 1 -type d ! -name 'include' ! -name 'package.conf.d' ! -name 'ghc-%{version}' -fprintf $SRC_TOP/rpm-lib-dir.files "%%%%dir %%p\n"
find .%{_libdir}/%{name}-%{version} -mindepth 1 -type d \( -name 'ghc-%{version}' -prune -o -fprintf $SRC_TOP/rpm-dev-dir.files "%%%%dir %%p\n" \)
- find .%{_libdir}/%{name}-%{version} -mindepth 1 \( -name 'ghc-%{version}' -prune \) -o \( -name 'libHS*-ghc%{version}.so' -fprintf $SRC_TOP/rpm-lib.files "%%%%attr(755,root,root) %%p\n" \) -o \( \( -name '*.p_hi' -o -name '*_p.a' \) -fprint $SRC_TOP/ghc-prof.files \) -o \( \( -name '*.hi' -o -name '*.dyn_hi' -o -name 'libHS*.a' -o -name 'HS*.o' -o -name '*.h' -o -name '*.conf' -o -type f -not -name 'package.cache' \) -fprint $SRC_TOP/rpm-base.files \)
+ find .%{_libdir}/%{name}-%{version} -mindepth 1 \( -name 'ghc-%{version}*' -prune \) -o \( -name 'libHS*-ghc%{version}.so' -fprintf $SRC_TOP/rpm-lib.files "%%%%attr(755,root,root) %%p\n" \) -o \( \( -name '*.p_hi' -o -name '*_p.a' \) -fprint $SRC_TOP/ghc-prof.files \) -o \( \( -name '*.hi' -o -name '*.dyn_hi' -o -name 'libHS*.a' -o -name 'HS*.o' -o -name '*.h' -o -name '*.conf' -o -type f -not -name 'package.cache' \) -fprint $SRC_TOP/rpm-base.files \)
find .%{_docdir}/%{name}/* -type d ! -name libraries ! -name 'ghc-%{version}' ! -name src > $SRC_TOP/ghc-doc.files
)
@@ -261,11 +268,28 @@ if [ "$1" = 0 ]; then
fi
%posttrans
+# (posttrans to make sure any old libs have been removed first)
+ghc-pkg recache
+
+%post ghc-devel
+ghc-pkg recache
+
+%postun ghc-devel
ghc-pkg recache
%posttrans doc
-# (posttrans to make sure any old documentation has been removed first)
-( cd %{_docdir}/ghc/libraries && ./gen_contents_index ) || :
+# (posttrans to make sure any old docs have been removed first)
+%ghc_reindex_haddock
+
+%if %{with doc}
+%post ghc-doc
+%ghc_reindex_haddock
+
+%postun ghc-doc
+if [ "$1" -eq 0 ] ; then
+ %ghc_reindex_haddock
+fi
+%endif
%files -f ghc.files
%defattr(-,root,root,-)
@@ -279,6 +303,7 @@ ghc-pkg recache
%files doc -f ghc-doc.files
%defattr(-,root,root,-)
+%if %{with doc}
%dir %{_docdir}/%{name}/libraries
%{_docdir}/%{name}/libraries/frames.html
%{_docdir}/%{name}/libraries/gen_contents_index
@@ -292,6 +317,7 @@ ghc-pkg recache
%ghost %{_docdir}/%{name}/libraries/index*.html
%ghost %{_docdir}/%{name}/libraries/minus.gif
%ghost %{_docdir}/%{name}/libraries/plus.gif
+%endif
%if %{with shared}
%files libs -f ghc-libs.files
@@ -304,8 +330,10 @@ ghc-pkg recache
%files ghc-devel -f ghc-ghc-devel.files
%defattr(-,root,root,-)
+%if %{with doc}
%files ghc-doc -f ghc-ghc-doc.files
%defattr(-,root,root,-)
+%endif
%if %{with prof}
%files prof -f ghc-prof.files
@@ -316,6 +344,12 @@ ghc-pkg recache
%endif
%changelog
+* Sat Dec 12 2009 Jens Petersen <petersen at redhat.com> - 6.12.1-0.3
+- exclude ghc .conf file from package.conf.d in base package
+- use ghc_reindex_haddock
+- add scripts for ghc-ghc-devel and ghc-ghc-doc
+- add doc bcond
+
* Sat Dec 12 2009 Jens Petersen <petersen at redhat.com> - 6.12.1-0.2
- remove redundant mingw and perl from ghc-tarballs/
- fix exclusion of ghc internals lib from base packages with -mindepth
More information about the fedora-extras-commits
mailing list