--- a/ChangeLog Tue Jul 20 19:45:08 2010 +0000
+++ b/ChangeLog Wed Jul 21 13:38:11 2010 +0000
@@ -1,3 +1,17 @@
+2010-07-21 Mark Wright <[email protected]>
+
+ * SFEghc-xmobar.spec, patches/ghc-xmobar-01-StatFS.hsc.diff,
+ SFEghc-xmonad-contrib.spec, SFEghc-xmonad-utils.spec,
+ SFEghc-xmonad-extras.spec: *NEW* xmonad tiling window manager packages
+ * SFEghc-X11.spec: rename SFEghc-xmonad to SFEghc-X11, only provide
+ Haskell X11 Windows bindings, most of the other dependencies that were
+ in SFEghc-xmonad are now in SFEghc-haskell-platform
+ * SFEghc-*.spec: add --enable-library-profiling option
+ * SFEghc-xmonad.spec: replaced by SFEghc-X11.spec and
+ SFEghc-haskell-platform.spec
+ * SFExmonad.spec: bump to 0.9.1
+ * SFEghc-parsec.spec: bump 3.1.0
+
2010-07-20 Milan Jurik <[email protected]>
* SFEopenttd.spec: update to 1.0.2
--- a/SFEghc-AspectAG.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-AspectAG.spec Wed Jul 21 13:38:11 2010 +0000
@@ -83,6 +83,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-Boolean.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-Boolean.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-ChristmasTree.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-ChristmasTree.spec Wed Jul 21 13:38:11 2010 +0000
@@ -87,6 +87,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-Diff.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-Diff.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-HList.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-HList.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-HStringTemplate.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-HStringTemplate.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-HaXml.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-HaXml.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-List.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-List.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-ListLike.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-ListLike.spec Wed Jul 21 13:38:11 2010 +0000
@@ -87,6 +87,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-MemoTrie.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-MemoTrie.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-SyntaxMacros.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-SyntaxMacros.spec Wed Jul 21 13:38:11 2010 +0000
@@ -85,6 +85,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-TTTAS.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-TTTAS.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEghc-X11.spec Wed Jul 21 13:38:11 2010 +0000
@@ -0,0 +1,169 @@
+#
+# spec file for package SFEghc-X11
+#
+# Copyright 2010 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include Solaris.inc
+
+%define cc_is_gcc 1
+%include base.inc
+
+%define ghc_version 6.12.3
+
+Name: X11
+Summary: X11 - A binding to the X11 graphics library
+Version: 1.5.0.0
+Release: 1
+License: BSD
+Group: Development/Languages/Haskell
+Distribution: Java Desktop System
+Vendor: Sun Microsystems, Inc.
+URL: http://hackage.haskell.org/platform/
+Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+SUNW_Pkg: SFEghc-X11
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%include default-depend.inc
+Requires: SFEgcc
+Requires: SFEghc
+Requires: SFEghc-haskell-platform
+BuildRequires: SUNWgzip
+Requires: SUNWxorg-clientlibs
+Requires: SUNWxorg-headers
+
+%description
+A Haskell binding to the X11 graphics library. The binding is a direct
+translation of the C binding; for documentation of these calls, refer
+to The Xlib Programming Manual, available online at
+http://tronche.com/gui/x/xlib/.
+
+%package -n SFEghc-X11-prof
+Summary: %{summary} - profiling libraries
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-X11
+
+%package -n SFEghc-X11-doc
+Summary: %{summary} - doc files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-X11
+
+%prep
+%setup -q -n %{name}-%{version}
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+
+# Need to use same gcc as we used to build ghc (gcc 4.x)
+export CC=/usr/gnu/bin/gcc
+export CXX=/usr/gnu/bin/g++
+export CXXFLAGS="%{gcc_cxx_optflags}"
+export CFLAGS="%optflags"
+export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%else
+export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
+%endif
+export PERL="/usr/perl5/bin/perl"
+
+GHC=/usr/bin/ghc
+GHC_PKG=/usr/bin/ghc-pkg
+HSC2HS=/usr/bin/hsc2hs
+VERBOSE=--verbose=3
+
+sed -i -e 's,#! /bin/sh,#! /bin/bash,' configure
+
+chmod a+x ./Setup.hs
+runghc ./Setup.hs configure --prefix=%{_prefix} \
+ --libdir=%{_cxx_libdir} \
+ --docdir=%{_docdir}/%{name}-%{version} \
+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
+ --libsubdir='$compiler/$pkgid' \
+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
+ --haddock-option="--html" \
+ --enable-library-profiling \
+ ${VERBOSE}
+
+%build
+export LD_LIBRARY_PATH='/usr/gnu/lib'
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+runghc ./Setup.hs build ${VERBOSE}
+runghc ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
+
+%install
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+rm -rf $RPM_BUILD_ROOT
+
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}
+runghc ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf
+runghc ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
+
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/
+install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+# Prepare lists of files for packaging
+cd %{_builddir}/%{name}-%{version}
+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
+find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files
+sort pkg-prof.files > pkg-prof-sort.files
+sort pkg-all.files > pkg-all-sort.files
+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
+sort pkg-doc.files > pkg-doc-sort.files
+# Clean up syntax for %files section
+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+# The %install section above will only install files
+# We need to register the package with ghc-pkg for ghc to find it
+/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+%post -n SFEghc-X11-doc
+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+
+%preun
+# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
+/usr/bin/ghc-pkg unregister --global --force %{name}-%{version}
+
+%postun -n SFEghc-X11-doc
+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+fi
+
+%files -f pkg.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-X11-prof -f pkg-prof.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-X11-doc -f pkg-doc.files
+%defattr(-,root,root,-)
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_docdir}
+%dir %attr (0755, root, bin) %{_docdir}/ghc
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
+
+%changelog
+* Wed July 21 2010 - [email protected]
+- Replace SFEghc-xmonad.spec with SFEghc-X11.spec. Some of the xmonad
+- pre-requisite packages are now in SFEghc-haskell-platform.spec.
+* Sun Sep 6 2009 - [email protected]
+- Initial spec
--- a/SFEghc-attempt.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-attempt.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-attoparsec-iteratee.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-attoparsec-iteratee.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-attoparsec.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-attoparsec.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-binary-strict.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-binary-strict.spec Wed Jul 21 13:38:11 2010 +0000
@@ -83,6 +83,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-binary.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-binary.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-bindings-DSL.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-bindings-DSL.spec Wed Jul 21 13:38:11 2010 +0000
@@ -90,6 +90,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-brainfuck.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-brainfuck.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-c2hs.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-c2hs.spec Wed Jul 21 13:38:11 2010 +0000
@@ -86,6 +86,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-cautious-file.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-cautious-file.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-cereal.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-cereal.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-control-monad-attempt.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-control-monad-attempt.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-control-monad-exception-monadsfd.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-control-monad-exception-monadsfd.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-control-monad-exception-monadstf.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-control-monad-exception-monadstf.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-control-monad-exception-mtl.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-control-monad-exception-mtl.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-control-monad-exception.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-control-monad-exception.spec Wed Jul 21 13:38:11 2010 +0000
@@ -127,6 +127,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-control-monad-failure-mtl.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-control-monad-failure-mtl.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-control-monad-failure.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-control-monad-failure.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-cpphs.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-cpphs.spec Wed Jul 21 13:38:11 2010 +0000
@@ -85,6 +85,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-curl.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-curl.spec Wed Jul 21 13:38:11 2010 +0000
@@ -84,6 +84,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-darcs.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-darcs.spec Wed Jul 21 13:38:11 2010 +0000
@@ -98,6 +98,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-data-accessor-monads-fd.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-data-accessor-monads-fd.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-data-accessor-template.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-data-accessor-template.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-data-accessor.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-data-accessor.spec Wed Jul 21 13:38:11 2010 +0000
@@ -125,6 +125,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-dataenc.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-dataenc.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-derive.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-derive.spec Wed Jul 21 13:38:11 2010 +0000
@@ -86,6 +86,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-dlist.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-dlist.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-dyre.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-dyre.spec Wed Jul 21 13:38:11 2010 +0000
@@ -86,6 +86,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-encoding.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-encoding.spec Wed Jul 21 13:38:11 2010 +0000
@@ -83,6 +83,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-executable-path.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-executable-path.spec Wed Jul 21 13:38:11 2010 +0000
@@ -83,6 +83,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-failure.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-failure.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-fclabels.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-fclabels.spec Wed Jul 21 13:38:11 2010 +0000
@@ -86,6 +86,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-fingertree.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-fingertree.spec Wed Jul 21 13:38:11 2010 +0000
@@ -87,6 +87,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-ghc-paths.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-ghc-paths.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-hashed-storage.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-hashed-storage.spec Wed Jul 21 13:38:11 2010 +0000
@@ -86,6 +86,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-haskeline.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-haskeline.spec Wed Jul 21 13:38:11 2010 +0000
@@ -85,6 +85,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-haskell-src-exts.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-haskell-src-exts.spec Wed Jul 21 13:38:11 2010 +0000
@@ -97,6 +97,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-hexpat-iteratee.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-hexpat-iteratee.spec Wed Jul 21 13:38:11 2010 +0000
@@ -96,6 +96,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-hexpat.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-hexpat.spec Wed Jul 21 13:38:11 2010 +0000
@@ -123,6 +123,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-hlint.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-hlint.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-hoogle.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-hoogle.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-hscolour.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-hscolour.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-hxt.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-hxt.spec Wed Jul 21 13:38:11 2010 +0000
@@ -86,6 +86,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-io-storage.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-io-storage.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-iteratee.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-iteratee.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-language-c.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-language-c.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-mmap.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-mmap.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-monadloc.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-monadloc.spec Wed Jul 21 13:38:11 2010 +0000
@@ -95,6 +95,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-monads-fd.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-monads-fd.spec Wed Jul 21 13:38:11 2010 +0000
@@ -87,6 +87,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-monads-tf.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-monads-tf.spec Wed Jul 21 13:38:11 2010 +0000
@@ -85,6 +85,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-oeis.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-oeis.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-parsec.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-parsec.spec Wed Jul 21 13:38:11 2010 +0000
@@ -13,14 +13,17 @@
# I'm unconvinced hundreds of SFEghc-mypkg.spec files would be nifty
# However, for the time being, this is needed to build xmobar
+# Update July 21 2010: It is no longer required for xmobar, the
+# older parsec in SFEghc-haskell-platform is sufficient for xmobar.
+# This package is currently has no reverse dependencies, and is untested.
-%define ver_par 3.0.1
+%define ver_par 3.1.0
-%define ghc_version 6.10.4
+%define ghc_version 6.12.3
-Name: SFEghc-parsec
+Name: parsec
Summary: ghc library bindings for parsec
-Version: 1.0
+Version: %{ver_par}
Release: 1
License: BSD
Group: Development/Libraries/Haskell
@@ -28,81 +31,99 @@
Vendor: Sun Microsystems, Inc.
URL: http://hackage.haskell.org/ghc
Source1: http://hackage.haskell.org/packages/archive/parsec/%{ver_par}/parsec-%{ver_par}.tar.gz
+SUNW_Pkg: SFEghc-parsec
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
+Requires: SFEgcc
Requires: SFEghc
-Requires: SFEghc-xmonad
BuildRequires: SUNWgzip
-Requires: SUNWxorg-clientlibs
-Requires: SUNWxorg-headers
+Requires: SUNWhaskell-platform
-%package prof
+%package -n SFEghc-parsec-prof
Summary: %{summary} - profiling libraries
-sunw_BaseDir: %{_basedir}
+SUNW_BaseDir: %{_basedir}
%include default-depend.inc
-Requires: %name
+Requires: SFEghc-parsec
+
+%package -n SFEghc-parsec-doc
+Summary: %{summary} - doc files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-parsec
%prep
-rm -rf %name-%version
-mkdir %name-%version
+%setup -q -n %{name}-%{version}
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
-# Check which packages need to be installed
-%define install_par %(ghc-pkg list --simple-output parsec | grep -c parsec | grep -c 0)
-
-export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
# Need to use same gcc as we used to build ghc (gcc 4.x)
export CC=/usr/gnu/bin/gcc
export CXX=/usr/gnu/bin/g++
export CXXFLAGS="%{gcc_cxx_optflags}"
export CFLAGS="%optflags"
export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%else
export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
+%endif
+export PERL="/usr/perl5/bin/perl"
+
+GHC=/usr/bin/ghc
+GHC_PKG=/usr/bin/ghc-pkg
+HSC2HS=/usr/bin/hsc2hs
+VERBOSE=--verbose=3
-# parsec
-cd %{_builddir}/%name-%version
-/usr/bin/gunzip < %SOURCE1 | tar xvf -
-cd %{_builddir}/%name-%version/parsec-%ver_par
-runhaskell Setup.hs configure --ghc --enable-library-profiling \
- --prefix='/usr' \
- --libdir=%{_cxx_libdir}/ghc-%{ghc_version}/
+sed -i -e 's,#! /bin/sh,#! /bin/bash,' configure
+
+chmod a+x ./Setup.hs
+runghc ./Setup.hs configure --prefix=%{_prefix} \
+ --libdir=%{_cxx_libdir} \
+ --docdir=%{_docdir}/%{name}-%{version} \
+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
+ --libsubdir='$compiler/$pkgid' \
+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
+ --haddock-option="--html" \
+ --enable-library-profiling \
+ ${VERBOSE}
%build
-export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH='/usr/gnu/lib'
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+runghc ./Setup.hs build ${VERBOSE}
+runghc ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
-# parsec
-cd %{_builddir}/%name-%version/parsec-%ver_par
-runhaskell Setup.hs build
-
-
-%install
export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
rm -rf $RPM_BUILD_ROOT
-# parsec
-cd %{_builddir}/%name-%version/parsec-%ver_par
-# Install files
-runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
-rm -r $RPM_BUILD_ROOT%{_datadir}
-# Generate the script to register the package with ghc-pkg
-runhaskell Setup.hs register --gen-script
-#runhaskell Setup.hs unregister --gen-script
-cp register.sh $RPM_BUILD_ROOT%{_cxx_libdir}/ghc-%ghc_version/parsec-%{ver_par}/ghc-%{ghc_version}
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}
+runghc ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf
+runghc ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/
+install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
# Prepare lists of files for packaging
-cd %{_builddir}/%name-%version
-find $RPM_BUILD_ROOT -type f -name "*.p_hi" > ghc-extra-prof.files
-find $RPM_BUILD_ROOT -type f -name "*_p.a" >> ghc-extra-prof.files
-find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > ghc-extra-all.files
-sort ghc-extra-prof.files > ghc-extra-prof-sort.files
-sort ghc-extra-all.files > ghc-extra-all-sort.files
-comm -23 ghc-extra-all-sort.files ghc-extra-prof-sort.files > ghc-extra.files
+cd %{_builddir}/%{name}-%{version}
+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
+find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files
+sort pkg-prof.files > pkg-prof-sort.files
+sort pkg-all.files > pkg-all-sort.files
+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
+sort pkg-doc.files > pkg-doc-sort.files
# Clean up syntax for %files section
-cat ghc-extra.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP ghc-extra.files
-cat ghc-extra-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP ghc-extra-prof.files
-
+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
%clean
rm -rf $RPM_BUILD_ROOT
@@ -110,21 +131,35 @@
%post
# The %install section above will only install files
# We need to register the package with ghc-pkg for ghc to find it
-cd %{_cxx_libdir}/ghc-%{ghc_version}/parsec-%{ver_par}/ghc-%{ghc_version}
-./register.sh
+/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+%post -n SFEghc-parsec-doc
+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
%preun
-# Need to use --force or unregister will fail on any dependent ghc pkgs
-# We presume SFE will maintain the dependencies from now
-ghc-pkg unregister --force parsec
+# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
+/usr/bin/ghc-pkg unregister --global --force %{name}-%{version}
-%files -f ghc-extra.files
+%postun -n SFEghc-parsec-doc
+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+fi
+
+%files -n SFEghc-parsec-prof -f pkg-prof.files
%defattr (-, root, bin)
-%files prof -f ghc-extra-prof.files
-%defattr (-, root, bin)
+%files -n SFEghc-parsec-doc -f pkg-doc.files
+%defattr(-,root,root,-)
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_docdir}
+%dir %attr (0755, root, bin) %{_docdir}/ghc
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
%changelog
+* Wed July 21 2010 - [email protected]
+- Bump from 3.0.1 to 3.1.0
* Tue July 20 2010 - [email protected]
- Fix postun to work if SFEghc has been uninstalled. Compile with ghc 6.12.3.
* Thu Oct 08 2009 - [email protected]
--- a/SFEghc-pointedlist.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-pointedlist.spec Wed Jul 21 13:38:11 2010 +0000
@@ -84,6 +84,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-polyparse.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-polyparse.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-pureMD5.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-pureMD5.spec Wed Jul 21 13:38:11 2010 +0000
@@ -80,6 +80,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-readline.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-readline.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-regex-tdfa.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-regex-tdfa.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-rosezipper.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-rosezipper.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-safe-failure.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-safe-failure.spec Wed Jul 21 13:38:11 2010 +0000
@@ -83,6 +83,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-safe.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-safe.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-smallcheck.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-smallcheck.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-split.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-split.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-tagsoup.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-tagsoup.spec Wed Jul 21 13:38:11 2010 +0000
@@ -84,6 +84,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-terminfo.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-terminfo.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-text.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-text.spec Wed Jul 21 13:38:11 2010 +0000
@@ -78,6 +78,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-transformers.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-transformers.spec Wed Jul 21 13:38:11 2010 +0000
@@ -88,6 +88,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-uniplate.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-uniplate.spec Wed Jul 21 13:38:11 2010 +0000
@@ -103,6 +103,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-unix-compat.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-unix-compat.spec Wed Jul 21 13:38:11 2010 +0000
@@ -83,6 +83,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-unlambda.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-unlambda.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-utf8-string.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-utf8-string.spec Wed Jul 21 13:38:11 2010 +0000
@@ -82,6 +82,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-utility-ht.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-utility-ht.spec Wed Jul 21 13:38:11 2010 +0000
@@ -84,6 +84,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-uu-parsinglib.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-uu-parsinglib.spec Wed Jul 21 13:38:11 2010 +0000
@@ -106,6 +106,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-uulib.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-uulib.spec Wed Jul 21 13:38:11 2010 +0000
@@ -79,6 +79,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-vector-space.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-vector-space.spec Wed Jul 21 13:38:11 2010 +0000
@@ -90,6 +90,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-vty.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-vty.spec Wed Jul 21 13:38:11 2010 +0000
@@ -100,6 +100,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFEghc-xdg-basedir.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-xdg-basedir.spec Wed Jul 21 13:38:11 2010 +0000
@@ -81,6 +81,7 @@
--libsubdir='$compiler/$pkgid' \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
+ --enable-library-profiling \
${VERBOSE}
%build
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEghc-xmobar.spec Wed Jul 21 13:38:11 2010 +0000
@@ -0,0 +1,156 @@
+#
+# spec file for package SFEghc-xmobar
+#
+# Copyright 2010 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include Solaris.inc
+
+%define cc_is_gcc 1
+%include base.inc
+
+%define ghc_version 6.12.3
+
+Name: xmobar
+Summary: xmobar - A Minimalistic Text Based Status Bar
+Version: 0.11.1
+Release: 1
+License: BSD
+Group: Development/Languages/Haskell
+Distribution: Java Desktop System
+Vendor: Sun Microsystems, Inc.
+URL: http://hackage.haskell.org/platform/
+Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+SUNW_Pkg: SFEghc-xmobar
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+Patch1: ghc-xmobar-01-StatFS.hsc.diff
+
+%include default-depend.inc
+Requires: SFEgcc
+Requires: SFEghc
+Requires: SFEghc-haskell-platform
+BuildRequires: SUNWgzip
+Requires: SUNWxorg-clientlibs
+Requires: SUNWxorg-headers
+Requires: SFExmonad
+Requires: SFEghc-X11
+
+%description
+Xmobar is a minimalistic text based status bar.
+
+Inspired by the Ion3 status bar, it supports similar features, like
+dynamic color management, output templates, and extensibility through
+plugins.
+
+%package -n SFEghc-xmobar-prof
+Summary: %{summary} - profiling libraries
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmobar
+
+%package -n SFEghc-xmobar-doc
+Summary: %{summary} - doc files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmobar
+
+%prep
+%setup -q -n %{name}-%{version}
+%patch1 -p1
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+
+# Need to use same gcc as we used to build ghc (gcc 4.x)
+export CC=/usr/gnu/bin/gcc
+export CXX=/usr/gnu/bin/g++
+export CXXFLAGS="%{gcc_cxx_optflags}"
+export CFLAGS="%optflags"
+export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%else
+export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
+%endif
+export PERL="/usr/perl5/bin/perl"
+
+GHC=/usr/bin/ghc
+GHC_PKG=/usr/bin/ghc-pkg
+HSC2HS=/usr/bin/hsc2hs
+VERBOSE=--verbose=3
+
+chmod a+x ./Setup.lhs
+runghc ./Setup.lhs configure --prefix=%{_prefix} \
+ --libdir=%{_cxx_libdir} \
+ --docdir=%{_docdir}/%{name}-%{version} \
+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
+ --libsubdir='$compiler/$pkgid' \
+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
+ --haddock-option="--html" \
+ --enable-library-profiling \
+ ${VERBOSE}
+
+%build
+export LD_LIBRARY_PATH='/usr/gnu/lib'
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+runghc ./Setup.lhs build ${VERBOSE}
+runghc ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
+
+%install
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+rm -rf $RPM_BUILD_ROOT
+
+runghc ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
+
+# Prepare lists of files for packaging
+cd %{_builddir}/%{name}-%{version}
+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
+find $RPM_BUILD_ROOT%{_bindir} -type f -name "*" > pkg-all.files
+sort pkg-prof.files > pkg-prof-sort.files
+sort pkg-all.files > pkg-all-sort.files
+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
+sort pkg-doc.files > pkg-doc-sort.files
+# Clean up syntax for %files section
+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n SFEghc-xmobar-doc
+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+
+%postun -n SFEghc-xmobar-doc
+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+fi
+
+%files -f pkg.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmobar-prof -f pkg-prof.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmobar-doc -f pkg-doc.files
+%defattr(-,root,root,-)
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_docdir}
+%dir %attr (0755, root, bin) %{_docdir}/ghc
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
+
+%changelog
+* Wed July 21 2010 - [email protected]
+- Initial spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEghc-xmonad-contrib.spec Wed Jul 21 13:38:11 2010 +0000
@@ -0,0 +1,175 @@
+#
+# spec file for package SFEghc-xmonad-contrib
+#
+# Copyright 2010 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include Solaris.inc
+
+%define cc_is_gcc 1
+%include base.inc
+
+%define ghc_version 6.12.3
+
+Name: xmonad-contrib
+Summary: xmonad-contrib - Third party extensions for xmonad
+Version: 0.9.1
+Release: 1
+License: BSD
+Group: Development/Languages/Haskell
+Distribution: Java Desktop System
+Vendor: Sun Microsystems, Inc.
+URL: http://hackage.haskell.org/platform/
+Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+SUNW_Pkg: SFEghc-xmonad-contrib
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%include default-depend.inc
+Requires: SFEgcc
+Requires: SFEghc
+Requires: SFEghc-haskell-platform
+BuildRequires: SUNWgzip
+Requires: SUNWxorg-clientlibs
+Requires: SUNWxorg-headers
+Requires: SFEghc-utf8-string
+Requires: SFEghc-X11
+Requires: SFExmonad
+
+%description
+Third party tiling algorithms, configurations and scripts to xmonad, a
+tiling window manager for X.
+
+For an introduction to building, configuring and using xmonad
+extensions, see XMonad.Doc. In particular:
+
+XMonad.Doc.Configuring, a guide to configuring xmonad
+
+XMonad.Doc.Extending, using the contributed extensions library
+
+XMonad.Doc.Developing, introduction to xmonad internals and writing
+your own extensions.
+
+%package -n SFEghc-xmonad-contrib-prof
+Summary: %{summary} - profiling libraries
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmonad-contrib
+
+%package -n SFEghc-xmonad-contrib-doc
+Summary: %{summary} - doc files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmonad-contrib
+
+%prep
+%setup -q -n %{name}-%{version}
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+
+# Need to use same gcc as we used to build ghc (gcc 4.x)
+export CC=/usr/gnu/bin/gcc
+export CXX=/usr/gnu/bin/g++
+export CXXFLAGS="%{gcc_cxx_optflags}"
+export CFLAGS="%optflags"
+export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%else
+export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
+%endif
+export PERL="/usr/perl5/bin/perl"
+
+GHC=/usr/bin/ghc
+GHC_PKG=/usr/bin/ghc-pkg
+HSC2HS=/usr/bin/hsc2hs
+VERBOSE=--verbose=3
+
+chmod a+x ./Setup.lhs
+runghc ./Setup.lhs configure --prefix=%{_prefix} \
+ --libdir=%{_cxx_libdir} \
+ --docdir=%{_docdir}/%{name}-%{version} \
+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
+ --libsubdir='$compiler/$pkgid' \
+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
+ --haddock-option="--html" \
+ --enable-library-profiling \
+ ${VERBOSE}
+
+%build
+export LD_LIBRARY_PATH='/usr/gnu/lib'
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+runghc ./Setup.lhs build ${VERBOSE}
+runghc ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
+
+%install
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+rm -rf $RPM_BUILD_ROOT
+
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}
+runghc ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf
+runghc ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
+
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/
+install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+# Prepare lists of files for packaging
+cd %{_builddir}/%{name}-%{version}
+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
+find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files
+sort pkg-prof.files > pkg-prof-sort.files
+sort pkg-all.files > pkg-all-sort.files
+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
+sort pkg-doc.files > pkg-doc-sort.files
+# Clean up syntax for %files section
+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+# The %install section above will only install files
+# We need to register the package with ghc-pkg for ghc to find it
+/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+%post -n SFEghc-xmonad-contrib-doc
+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+
+%preun
+# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
+/usr/bin/ghc-pkg unregister --global --force %{name}-%{version}
+
+%postun -n SFEghc-xmonad-contrib-doc
+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+fi
+
+%files -f pkg.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmonad-contrib-prof -f pkg-prof.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmonad-contrib-doc -f pkg-doc.files
+%defattr(-,root,root,-)
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_docdir}
+%dir %attr (0755, root, bin) %{_docdir}/ghc
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
+
+%changelog
+* Wed July 21 2010 - [email protected]
+- Initial spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEghc-xmonad-extras.spec Wed Jul 21 13:38:11 2010 +0000
@@ -0,0 +1,164 @@
+#
+# spec file for package SFEghc-xmonad-extras
+#
+# Copyright 2010 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include Solaris.inc
+
+%define cc_is_gcc 1
+%include base.inc
+
+%define ghc_version 6.12.3
+
+Name: xmonad-extras
+Summary: xmonad-extras - Third party extensions for xmonad with wacky dependencies
+Version: 0.9
+Release: 1
+License: BSD
+Group: Development/Languages/Haskell
+Distribution: Java Desktop System
+Vendor: Sun Microsystems, Inc.
+URL: http://hackage.haskell.org/platform/
+Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+SUNW_Pkg: SFEghc-xmonad-extras
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%include default-depend.inc
+Requires: SFEgcc
+Requires: SFEghc
+Requires: SFEghc-haskell-platform
+BuildRequires: SUNWgzip
+Requires: SUNWxorg-clientlibs
+Requires: SUNWxorg-headers
+Requires: SFEghc-X11
+Requires: SFExmonad
+Requires: SFEghc-xmonad-contrib
+
+%description
+Third party extensions for xmonad with wacky dependencies
+
+%package -n SFEghc-xmonad-extras-prof
+Summary: %{summary} - profiling libraries
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmonad-extras
+
+%package -n SFEghc-xmonad-extras-doc
+Summary: %{summary} - doc files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmonad-extras
+
+%prep
+%setup -q -n %{name}-%{version}
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+
+# Need to use same gcc as we used to build ghc (gcc 4.x)
+export CC=/usr/gnu/bin/gcc
+export CXX=/usr/gnu/bin/g++
+export CXXFLAGS="%{gcc_cxx_optflags}"
+export CFLAGS="%optflags"
+export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%else
+export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
+%endif
+export PERL="/usr/perl5/bin/perl"
+
+GHC=/usr/bin/ghc
+GHC_PKG=/usr/bin/ghc-pkg
+HSC2HS=/usr/bin/hsc2hs
+VERBOSE=--verbose=3
+
+chmod a+x ./Setup.lhs
+runghc ./Setup.lhs configure --prefix=%{_prefix} \
+ --libdir=%{_cxx_libdir} \
+ --docdir=%{_docdir}/%{name}-%{version} \
+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
+ --libsubdir='$compiler/$pkgid' \
+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
+ --haddock-option="--html" \
+ --enable-library-profiling \
+ ${VERBOSE}
+
+%build
+export LD_LIBRARY_PATH='/usr/gnu/lib'
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+runghc ./Setup.lhs build ${VERBOSE}
+runghc ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
+
+%install
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+rm -rf $RPM_BUILD_ROOT
+
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}
+runghc ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf
+runghc ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
+
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/
+install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+# Prepare lists of files for packaging
+cd %{_builddir}/%{name}-%{version}
+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
+find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files
+sort pkg-prof.files > pkg-prof-sort.files
+sort pkg-all.files > pkg-all-sort.files
+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
+sort pkg-doc.files > pkg-doc-sort.files
+# Clean up syntax for %files section
+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+# The %install section above will only install files
+# We need to register the package with ghc-pkg for ghc to find it
+/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+%post -n SFEghc-xmonad-extras-doc
+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+
+%preun
+# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
+/usr/bin/ghc-pkg unregister --global --force %{name}-%{version}
+
+%postun -n SFEghc-xmonad-extras-doc
+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+fi
+
+%files -f pkg.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmonad-extras-prof -f pkg-prof.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmonad-extras-doc -f pkg-doc.files
+%defattr(-,root,root,-)
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_docdir}
+%dir %attr (0755, root, bin) %{_docdir}/ghc
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
+
+%changelog
+* Wed July 21 2010 - [email protected]
+- Initial spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEghc-xmonad-utils.spec Wed Jul 21 13:38:11 2010 +0000
@@ -0,0 +1,148 @@
+#
+# spec file for package SFEghc-xmonad-utils
+#
+# Copyright 2010 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include Solaris.inc
+
+%define cc_is_gcc 1
+%include base.inc
+
+%define ghc_version 6.12.3
+
+Name: xmonad-utils
+Summary: xmonad-utils - Third party extensions for xmonad with wacky dependencies
+Version: 0.1.2
+Release: 1
+License: BSD
+Group: Development/Languages/Haskell
+Distribution: Java Desktop System
+Vendor: Sun Microsystems, Inc.
+URL: http://hackage.haskell.org/platform/
+Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+SUNW_Pkg: SFEghc-xmonad-utils
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%include default-depend.inc
+Requires: SFEgcc
+Requires: SFEghc
+Requires: SFEghc-haskell-platform
+BuildRequires: SUNWgzip
+Requires: SUNWxorg-clientlibs
+Requires: SUNWxorg-headers
+Requires: SFEghc-X11
+
+%description
+Third party extensions for xmonad with wacky dependencies
+
+%package -n SFEghc-xmonad-utils-prof
+Summary: %{summary} - profiling libraries
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmonad-utils
+
+%package -n SFEghc-xmonad-utils-doc
+Summary: %{summary} - doc files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SFEghc-xmonad-utils
+
+%prep
+%setup -q -n %{name}-%{version}
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+
+# Need to use same gcc as we used to build ghc (gcc 4.x)
+export CC=/usr/gnu/bin/gcc
+export CXX=/usr/gnu/bin/g++
+export CXXFLAGS="%{gcc_cxx_optflags}"
+export CFLAGS="%optflags"
+export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%else
+export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
+%endif
+export PERL="/usr/perl5/bin/perl"
+
+GHC=/usr/bin/ghc
+GHC_PKG=/usr/bin/ghc-pkg
+HSC2HS=/usr/bin/hsc2hs
+VERBOSE=--verbose=3
+
+%if %{is_s10}
+sed -i -e 's,crypt,crypt_d,' xmonad-utils.cabal
+%endif
+
+chmod a+x ./Setup.lhs
+runghc ./Setup.lhs configure --prefix=%{_prefix} \
+ --libdir=%{_cxx_libdir} \
+ --docdir=%{_docdir}/%{name}-%{version} \
+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
+ --libsubdir='$compiler/$pkgid' \
+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
+ --haddock-option="--html" \
+ --enable-library-profiling \
+ ${VERBOSE}
+
+%build
+export LD_LIBRARY_PATH='/usr/gnu/lib'
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+runghc ./Setup.lhs build ${VERBOSE}
+runghc ./Setup.lhs haddock ${VERBOSE} --hoogle --hyperlink-source
+
+%install
+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+rm -rf $RPM_BUILD_ROOT
+
+runghc ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
+
+# Prepare lists of files for packaging
+cd %{_builddir}/%{name}-%{version}
+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
+find $RPM_BUILD_ROOT%{_bindir} -type f -name "*" > pkg-all.files
+sort pkg-prof.files > pkg-prof-sort.files
+sort pkg-all.files > pkg-all-sort.files
+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
+sort pkg-doc.files > pkg-doc-sort.files
+# Clean up syntax for %files section
+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n SFEghc-xmonad-utils-doc
+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+
+%postun -n SFEghc-xmonad-utils-doc
+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+fi
+
+%files -f pkg.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmonad-utils-prof -f pkg-prof.files
+%defattr (-, root, bin)
+
+%files -n SFEghc-xmonad-utils-doc -f pkg-doc.files
+%defattr(-,root,root,-)
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_docdir}
+
+%changelog
+* Wed July 21 2010 - [email protected]
+- Initial spec
--- a/SFEghc-xmonad.spec Tue Jul 20 19:45:08 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-#
-# spec file for package SFEghc-xmonad
-#
-# Copyright 2008 Sun Microsystems, Inc.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
-#
-
-%include Solaris.inc
-
-%define cc_is_gcc 1
-%include base.inc
-
-# This is by no means a comprehensive list of all ghc lib bindings
-# I'm unconvinced hundreds of SFEghc-mypkg.spec files would be nifty
-# So, for the time being, these are libraries needed to build xmonad+xmobar
-
-%define ver_x11 1.4.5
-%define ver_mtl 1.1.0.2
-# needed for xmobar
-#%define ver_par 3.0.1
-%define ver_stm 2.1.1.2
-%define ver_utf 0.3.5
-
-%define ghc_version 6.10.4
-
-Name: SFEghc-xmonad
-Summary: extra ghc library bindings
-Version: 1.0
-Release: 1
-License: BSD
-Group: Development/Libraries/Haskell
-Distribution: Java Desktop System
-Vendor: Sun Microsystems, Inc.
-URL: http://hackage.haskell.org/ghc
-Source0: http://hackage.haskell.org/packages/archive/X11/%{ver_x11}/X11-%{ver_x11}.tar.gz
-Source1: http://hackage.haskell.org/packages/archive/mtl/%{ver_mtl}/mtl-%{ver_mtl}.tar.gz
-#Source2: http://hackage.haskell.org/packages/archive/parsec/%{ver_par}/parsec-%{ver_par}.tar.gz
-Source3: http://hackage.haskell.org/packages/archive/stm/%{ver_stm}/stm-%{ver_stm}.tar.gz
-Source4: http://hackage.haskell.org/packages/archive/utf8-string/%{ver_utf}/utf8-string-%{ver_utf}.tar.gz
-SUNW_BaseDir: %{_basedir}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-
-%include default-depend.inc
-Requires: SFEghc
-BuildRequires: SUNWgzip
-Requires: SUNWxorg-clientlibs
-Requires: SUNWxorg-headers
-
-%package prof
-Summary: %{summary} - profiling libraries
-sunw_BaseDir: %{_basedir}
-%include default-depend.inc
-Requires: %name
-
-%prep
-rm -rf %name-%version
-mkdir %name-%version
-
-# Check which packages need to be installed
-%define install_x11 %(ghc-pkg list --simple-output X11 | grep -c X11 | grep -c 0)
-%define install_mtl %(ghc-pkg list --simple-output mtl | grep -c mtl | grep -c 0)
-
-export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
-# Need to use same gcc as we used to build ghc (gcc 4.x)
-export CC=/usr/gnu/bin/gcc
-export CXX=/usr/gnu/bin/g++
-export CXXFLAGS="%{gcc_cxx_optflags}"
-export CFLAGS="%optflags"
-export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
-export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
-
-# X11
-cd %{_builddir}/%name-%version
-/usr/bin/gunzip < %SOURCE0 | tar xvf -
-cd %{_builddir}/%name-%version/X11-%ver_x11
-runhaskell Setup.hs configure --ghc --enable-library-profiling \
- --prefix='/usr' \
- --libdir=%{_cxx_libdir}/ghc-%{ghc_version}/
-
-# mtl
-cd %{_builddir}/%name-%version
-/usr/bin/gunzip < %SOURCE1 | tar xvf -
-cd %{_builddir}/%name-%version/mtl-%ver_mtl
-runhaskell Setup.hs configure --ghc --enable-library-profiling \
- --prefix='/usr' \
- --libdir=%{_cxx_libdir}/ghc-%{ghc_version}/
-
-# stm
-cd %{_builddir}/%name-%version
-/usr/bin/gunzip < %SOURCE3 | tar xvf -
-cd %{_builddir}/%name-%version/stm-%ver_stm
-runhaskell Setup.hs configure --ghc --enable-library-profiling \
- --prefix='/usr' \
- --libdir=%{_cxx_libdir}/ghc-%{ghc_version}/
-
-# utf8-string
-cd %{_builddir}/%name-%version
-/usr/bin/gunzip < %SOURCE4 | tar xvf -
-cd %{_builddir}/%name-%version/utf8-string-%ver_utf
-runhaskell Setup.lhs configure --ghc --enable-library-profiling \
- --prefix='/usr' \
- --libdir=%{_cxx_libdir}/ghc-%{ghc_version}/
-
-
-%build
-export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
-
-# X11
-cd %{_builddir}/%name-%version/X11-%ver_x11
-runhaskell Setup.hs build
-
-# mtl
-cd %{_builddir}/%name-%version/mtl-%ver_mtl
-runhaskell Setup.hs build
-
-# stm
-cd %{_builddir}/%name-%version/stm-%ver_stm
-runhaskell Setup.hs build
-
-# utf8-string
-cd %{_builddir}/%name-%version/utf8-string-%ver_utf
-runhaskell Setup.lhs build
-
-
-%install
-export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
-rm -rf $RPM_BUILD_ROOT
-
-# X11
-cd %{_builddir}/%name-%version/X11-%ver_x11
-# Install files
-runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
-rm -r $RPM_BUILD_ROOT%{_datadir}
-# Generate the script to register the package with ghc-pkg
-runhaskell Setup.hs register --gen-script
-#runhaskell Setup.hs unregister --gen-script
-cp register.sh $RPM_BUILD_ROOT%{_cxx_libdir}/ghc-%ghc_version/X11-%{ver_x11}/ghc-%{ghc_version}
-
-# mtl
-cd %{_builddir}/%name-%version/mtl-%ver_mtl
-# Install files
-runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
-rm -r $RPM_BUILD_ROOT%{_datadir}
-# Generate the script to register the package with ghc-pkg
-runhaskell Setup.hs register --gen-script
-#runhaskell Setup.hs unregister --gen-script
-cp register.sh $RPM_BUILD_ROOT%{_cxx_libdir}/ghc-%ghc_version/mtl-%{ver_mtl}/ghc-%{ghc_version}
-
-# PARSEC DEPN ON MTL
-# parsec
-
-# stm
-cd %{_builddir}/%name-%version/stm-%ver_stm
-# Install files
-runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
-rm -r $RPM_BUILD_ROOT%{_datadir}
-# Generate the script to register the package with ghc-pkg
-runhaskell Setup.hs register --gen-script
-#runhaskell Setup.hs unregister --gen-script
-cp register.sh $RPM_BUILD_ROOT%{_cxx_libdir}/ghc-%ghc_version/stm-%{ver_stm}/ghc-%{ghc_version}
-
-# utf8-string
-cd %{_builddir}/%name-%version/utf8-string-%ver_utf
-# Install files
-runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
-rm -r $RPM_BUILD_ROOT%{_datadir}
-# Generate the script to register the package with ghc-pkg
-runhaskell Setup.lhs register --gen-script
-#runhaskell Setup.lhs unregister --gen-script
-cp register.sh $RPM_BUILD_ROOT%{_cxx_libdir}/ghc-%ghc_version/utf8-string-%{ver_utf}/ghc-%{ghc_version}
-
-
-# Prepare lists of files for packaging
-cd %{_builddir}/%name-%version
-#touch ghc-extra.files ghc-extra-prof.files ghc-extra-all.files
-find $RPM_BUILD_ROOT -type f -name "*.p_hi" > ghc-extra-prof.files
-find $RPM_BUILD_ROOT -type f -name "*_p.a" >> ghc-extra-prof.files
-find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > ghc-extra-all.files
-sort ghc-extra-prof.files > ghc-extra-prof-sort.files
-sort ghc-extra-all.files > ghc-extra-all-sort.files
-comm -23 ghc-extra-all-sort.files ghc-extra-prof-sort.files > ghc-extra.files
-# Clean up syntax for %files section
-cat ghc-extra.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP ghc-extra.files
-cat ghc-extra-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP ghc-extra-prof.files
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-# The %install section above will only install files
-# We need to register the package with ghc-pkg for ghc to find it
-cd %{_cxx_libdir}/ghc-%{ghc_version}/X11-%{ver_x11}/ghc-%{ghc_version}
-./register.sh
-cd %{_cxx_libdir}/ghc-%{ghc_version}/mtl-%{ver_mtl}/ghc-%{ghc_version}
-./register.sh
-cd %{_cxx_libdir}/ghc-%{ghc_version}/stm-%{ver_stm}/ghc-%{ghc_version}
-./register.sh
-cd %{_cxx_libdir}/ghc-%{ghc_version}/utf8-string-%{ver_utf}/ghc-%{ghc_version}
-./register.sh
-
-%preun
-# Need to use --force or unregister will fail on any dependent ghc pkgs
-# We presume SFE will maintain the dependencies from now
-ghc-pkg unregister --force X11
-ghc-pkg unregister --force mtl
-ghc-pkg unregister --force stm
-ghc-pkg unregister --force utf8-string
-
-%files -f ghc-extra.files
-%defattr (-, root, bin)
-
-%files prof -f ghc-extra-prof.files
-%defattr (-, root, bin)
-
-%changelog
-* Tue July 20 2010 - [email protected]
-- Fix postun to work if SFEghc has been uninstalled. Compile with ghc 6.12.3.
-* Sun Sep 6 2009 - [email protected]
-- Initial spec
--- a/SFEghc-yi.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFEghc-yi.spec Wed Jul 21 13:38:11 2010 +0000
@@ -106,6 +106,7 @@
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
--haddock-option="--html" \
-fvty \
+ --enable-library-profiling \
${VERBOSE}
%build
--- a/SFExmonad.spec Tue Jul 20 19:45:08 2010 +0000
+++ b/SFExmonad.spec Wed Jul 21 13:38:11 2010 +0000
@@ -13,11 +13,11 @@
%define cc_is_gcc 1
%include base.inc
-%define ghc_version 6.10.4
+%define ghc_version 6.12.3
-Name: SFExmonad
+Name: xmonad
Summary: XMonad - a tiling window manager
-Version: 0.8.1
+Version: 0.9.1
Release: 1
License: BSD
Group: Window Manager
@@ -27,26 +27,29 @@
Source: http://hackage.haskell.org/packages/archive/xmonad/%{version}/xmonad-%{version}.tar.gz
Source10: xmonad.desktop
SUNW_BaseDir: %{_basedir}
+SUNW_Pkg: SFExmonad
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Requires: SFEgcc
Requires: SFEghc
-Requires: SFEghc-xmonad
+Requires: SFEghc-haskell-platform
+Requires: SFEghc-X11
Requires: SUNWxorg-clientlibs
Requires: SUNWxorg-headers
+Requires: SFEghc-utf8-string
-%package prof
+%package -n SFExmonad-prof
Summary: %{summary} - profiling libraries
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
-Requires: %name
+Requires: SFExmonad
-%package devel
-Summary: %{summary} - developer files
+%package -n SFExmonad-doc
+Summary: %{summary} - doc files
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
-Requires: %name
+Requires: SFExmonad
%prep
%setup -q -n xmonad-%version
@@ -58,39 +61,66 @@
export CXXFLAGS="%{gcc_cxx_optflags}"
export CFLAGS="%optflags"
export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%else
export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
+%endif
+export PERL="/usr/perl5/bin/perl"
-runhaskell Setup.lhs configure --ghc --enable-library-profiling \
- --prefix='/usr' \
- --libdir=%{_cxx_libdir}/ghc-%{ghc_version}/
+GHC=/usr/bin/ghc
+GHC_PKG=/usr/bin/ghc-pkg
+HSC2HS=/usr/bin/hsc2hs
+VERBOSE=--verbose=3
+
+chmod a+x ./Setup.lhs
+runghc ./Setup.lhs configure --prefix=%{_prefix} \
+ --libdir=%{_cxx_libdir} \
+ --docdir=%{_docdir}/%{name}-%{version} \
+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
+ --libsubdir='$compiler/$pkgid' \
+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
+ --haddock-option="--html" \
+ --enable-library-profiling \
+ ${VERBOSE}
%build
-export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
-
-runhaskell Setup.lhs build
+export LD_LIBRARY_PATH='/usr/gnu/lib'
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
+runghc ./Setup.lhs build ${VERBOSE}
+runghc ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
%install
export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
+%if %{is_s10}
+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
+%endif
rm -rf $RPM_BUILD_ROOT
-runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}
+runghc ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf
+runghc ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
-# Generate the script to register the package with ghc-pkg
-runhaskell Setup.lhs register --gen-script
-#runhaskell Setup.lhs unregister --gen-script
-cp register.sh $RPM_BUILD_ROOT%{_cxx_libdir}/ghc-%ghc_version/xmonad-%version/ghc-%{ghc_version}
+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/
+install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
# Prepare lists of files for packaging
#cd %{_builddir}/%name-%version
find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
-find $RPM_BUILD_ROOT/usr/lib -type f -name "*" > pkg-all.files
+find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files
sort pkg-prof.files > pkg-prof-sort.files
sort pkg-all.files > pkg-all-sort.files
comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
+sort pkg-doc.files > pkg-doc-sort.files
# Clean up syntax for %files section
-cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP xmonad.files
-cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP xmonad-prof.files
+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.filess
+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
# Add XMonad to gdm chooser list
mkdir -p $RPM_BUILD_ROOT%{_datadir}/xsessions
@@ -103,33 +133,43 @@
%post
# The %install section above will only install files
# We need to register the package with ghc-pkg for ghc to find it
-cd %{_cxx_libdir}/ghc-%{ghc_version}/xmonad-%version/ghc-%{ghc_version}
-./register.sh
+/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
+
+%post -n SFExmonad-doc
+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
%preun
-# Need to use --force or unregister will fail on any dependent ghc pkgs
-# We presume SFE will maintain the dependencies from now
-ghc-pkg unregister --force xmonad
+# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
+/usr/bin/ghc-pkg unregister --global --force %{name}-%{version}
+%postun -n SFExmonad-doc
+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
+fi
-%files -f xmonad.files
+%files -f pkg.filess
%defattr (-, root, bin)
%dir %attr(0755, root, bin) %{_bindir}
%{_bindir}/*
#%{_mandir}/*
%dir %attr (0755, root, sys) %{_datadir}
-%dir %attr (0755, root, bin) %{_datadir}/xsessions
+%dir %attr (0755, root, other) %{_datadir}/xsessions
%{_datadir}/xsessions/*
-%files prof -f xmonad-prof.files
+%files -n SFExmonad-prof -f pkg-prof.files
%defattr (-, root, bin)
-%files devel
-%defattr (-, root, bin)
+%files -n SFExmonad-doc -f pkg-doc.files
+%defattr(-,root,root,-)
%dir %attr (0755, root, sys) %{_datadir}
-%dir %attr (0755, root, other) %{_datadir}/doc
-%{_datadir}/doc/*
+%dir %attr (0755, root, other) %{_docdir}
+%dir %attr (0755, root, bin) %{_docdir}/ghc
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
%changelog
+* Wed July 21 2010 - [email protected]
+- Bump from 0.8.1 to 0.9.1
* Sun Sep 6 2009 - [email protected]
- Initial Solaris version
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/ghc-xmobar-01-StatFS.hsc.diff Wed Jul 21 13:38:11 2010 +0000
@@ -0,0 +1,30 @@
+--- xmobar-0.11.1-orig/StatFS.hsc 2010-05-17 20:17:50.000000000 +1000
++++ xmobar-0.11.1/StatFS.hsc 2010-07-21 22:38:52.755410000 +1000
+@@ -27,8 +27,14 @@
+ # include <sys/param.h>
+ # include <sys/mount.h>
+ #else
++#if defined(__sun) && defined(__SVR4)
++#include <sys/types.h>
++#include <sys/statvfs.h>
++#define statfs statvfs
++#else
+ #include <sys/vfs.h>
+ #endif
++#endif
+
+ data FileSystemStats = FileSystemStats {
+ fsStatBlockSize :: Integer
+@@ -50,8 +56,12 @@
+ #if defined(__FreeBSD__)
+ foreign import ccall unsafe "sys/mount.h statfs"
+ #else
++#if defined(__sun) && defined(__SVR4)
++foreign import ccall unsafe "sys/statvfs.h statfs"
++#else
+ foreign import ccall unsafe "sys/vfs.h statfs64"
+ #endif
++#endif
+ c_statfs :: CString -> Ptr CStatfs -> IO CInt
+
+ toI :: CLong -> Integer