- update to 6.12.1 rc2
- build shared libs, woohoo! and package in standalone libs subpackage - add bcond for manual and extralibs - reenable ppc secondary arch - don't provide ghc-haddock-* - no longer need BR ncurses-devel or post policycoreutils requires - add vanilla v to GhcLibWays when building without prof - handle without hscolour - can't smp make currently - lots of filelist fixes for handling shared libs - run ghc-pkg recache posttrans - no need to install gen_contents_index by hand
This commit is contained in:
parent
b3f5839a60
commit
4b82adefe4
@ -1 +1 @@
|
|||||||
ghc-6.12.0.20091010-src.tar.bz2
|
ghc-6.12.0.20091121-src.tar.bz2
|
||||||
|
126
ghc.spec
126
ghc.spec
@ -1,11 +1,14 @@
|
|||||||
# test builds can made faster and smaller by disabling profiled libraries
|
# test builds can made faster and smaller by disabling profiled libraries
|
||||||
# (currently libHSrts_thr_p.a breaks no prof build)
|
# (currently libHSrts_thr_p.a breaks no prof build)
|
||||||
%bcond_without prof
|
%bcond_without prof
|
||||||
|
# build users_guide, etc
|
||||||
|
%bcond_without manual
|
||||||
|
# include extralibs
|
||||||
|
%bcond_with extralibs
|
||||||
|
|
||||||
# experimental
|
# experimental shared libraries support available in ghc-6.12
|
||||||
## shared libraries support available in ghc >= 6.11
|
%bcond_without shared
|
||||||
%bcond_with shared
|
# include colored html src
|
||||||
## include colored html src
|
|
||||||
%bcond_with hscolour
|
%bcond_with hscolour
|
||||||
|
|
||||||
%global haddock_version 2.5.0
|
%global haddock_version 2.5.0
|
||||||
@ -23,28 +26,34 @@
|
|||||||
%global package_debugging 0
|
%global package_debugging 0
|
||||||
|
|
||||||
Name: ghc
|
Name: ghc
|
||||||
# part of haskell-platform-2009.2.0.2
|
# break of haskell-platform-2009.2.0.2
|
||||||
Version: 6.12.0.20091010
|
Version: 6.12.0.20091121
|
||||||
Release: 8%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Glasgow Haskell Compilation system
|
Summary: Glasgow Haskell Compilation system
|
||||||
# fedora ghc has only been bootstrapped on the following archs:
|
# fedora ghc has only been bootstrapped on the following archs:
|
||||||
ExclusiveArch: %{ix86} x86_64 alpha
|
ExclusiveArch: %{ix86} x86_64 ppc alpha
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
|
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
|
||||||
|
%if %{with extralibs}
|
||||||
|
Source1: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2
|
||||||
|
%endif
|
||||||
URL: http://haskell.org/ghc/
|
URL: http://haskell.org/ghc/
|
||||||
Requires: gcc, gmp-devel
|
|
||||||
Requires(post): policycoreutils
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Obsoletes: ghc682, ghc681, ghc661, ghc66, haddock09
|
Obsoletes: ghc682, ghc681, ghc661, ghc66, haddock09
|
||||||
# introduced for f11 and can be removed for f13:
|
# introduced for f11 and can be removed for f13:
|
||||||
Obsoletes: haddock < %{haddock_version}, ghc-haddock-devel < %{haddock_version}
|
Obsoletes: haddock < %{haddock_version}, ghc-haddock-devel < %{haddock_version}
|
||||||
Provides: haddock = %{haddock_version}, ghc-haddock-devel = %{haddock_version}
|
Provides: haddock = %{haddock_version}
|
||||||
BuildRequires: ghc, happy, sed, ncurses-devel, libxslt, docbook-style-xsl
|
Requires: gcc, gmp-devel
|
||||||
|
BuildRequires: ghc, happy, sed
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
%if %{with shared}
|
%if %{with shared}
|
||||||
# not sure if this is actually needed
|
# not sure if this is actually needed:
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
%if %{with manual}
|
||||||
|
BuildRequires: libxslt, docbook-style-xsl
|
||||||
%endif
|
%endif
|
||||||
%if %{with hscolour}
|
%if %{with hscolour}
|
||||||
BuildRequires: hscolour
|
BuildRequires: hscolour
|
||||||
@ -67,22 +76,19 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
# for haddock
|
# for haddock
|
||||||
Requires(posttrans): %{name} = %{version}-%{release}
|
Requires(posttrans): %{name} = %{version}-%{release}
|
||||||
Obsoletes: ghc-haddock-doc < %{haddock_version}
|
Obsoletes: ghc-haddock-doc < %{haddock_version}
|
||||||
Provides: ghc-haddock-doc = %{haddock_version}
|
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Preformatted documentation for the Glorious Glasgow Haskell
|
Preformatted documentation for the Glorious Glasgow Haskell Compilation System
|
||||||
Compilation System (GHC) and its libraries. It should be installed if
|
(GHC) and its libraries. It should be installed if you like to have local
|
||||||
you like to have local access to the documentation in HTML format.
|
access to the documentation in HTML format.
|
||||||
|
|
||||||
%if %{with shared}
|
%if %{with shared}
|
||||||
%package libs
|
%package libs
|
||||||
Summary: Shared libraries for GHC
|
Summary: Shared libraries for GHC
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description libs
|
%description libs
|
||||||
Shared libraries for Glorious Glasgow Haskell Compilation System
|
Shared libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
||||||
(GHC). They should be installed to build standalone programs.
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with prof}
|
%if %{with prof}
|
||||||
@ -92,19 +98,17 @@ Group: Development/Libraries
|
|||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Obsoletes: ghc682-prof, ghc681-prof, ghc661-prof, ghc66-prof
|
Obsoletes: ghc682-prof, ghc681-prof, ghc661-prof, ghc66-prof
|
||||||
Obsoletes: ghc-haddock-prof < %{haddock_version}
|
Obsoletes: ghc-haddock-prof < %{haddock_version}
|
||||||
Provides: ghc-haddock-prof = %{haddock_version}
|
|
||||||
|
|
||||||
%description prof
|
%description prof
|
||||||
Profiling libraries for Glorious Glasgow Haskell Compilation System
|
Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
||||||
(GHC). They should be installed when GHC's profiling subsystem is
|
They should be installed when GHC's profiling subsystem is needed.
|
||||||
needed.
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# the debuginfo subpackage is currently empty anyway, so don't generate it
|
# the debuginfo subpackage is currently empty anyway, so don't generate it
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version} %{?with_extralibs:-b1}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# hack for building a local test package quickly from a prebuilt tree
|
# hack for building a local test package quickly from a prebuilt tree
|
||||||
@ -117,10 +121,17 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{without prof}
|
%if %{without prof}
|
||||||
echo "GhcLibWays = %{?with_shared:dyn}" >> mk/build.mk
|
echo "GhcLibWays = v %{?with_shared:dyn}" >> mk/build.mk
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
echo "XMLDocWays = html" >> mk/build.mk
|
# so where is the switch?
|
||||||
|
%if %{with manual}
|
||||||
|
#echo "XMLDocWays = html" >> mk/build.mk
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without hscolour}
|
||||||
|
echo "HSCOLOUR_SRCS = NO" >> mk/build.mk
|
||||||
|
%endif
|
||||||
|
|
||||||
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
|
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
|
||||||
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
|
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
|
||||||
@ -136,19 +147,20 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||||
|
|
||||||
cp libraries/gen_contents_index ${RPM_BUILD_ROOT}%{_docdir}/%{name}/html/libraries
|
|
||||||
|
|
||||||
SRC_TOP=$PWD
|
SRC_TOP=$PWD
|
||||||
rm -f rpm-*.files
|
rm -f rpm-*.files
|
||||||
( cd $RPM_BUILD_ROOT
|
( 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.d' -fprint $SRC_TOP/rpm-lib.files \)
|
find .%{_libdir}/%{name}-%{version} -maxdepth 1 -type d ! -name 'include' ! -name 'package.conf.d' -fprintf $SRC_TOP/rpm-lib-dir.files "%%%%dir %%p\n"
|
||||||
find .%{_docdir}/%{name}/html/* -type d ! -name libraries ! -name src > $SRC_TOP/rpm-doc-dir.files
|
find .%{_libdir}/%{name}-%{version} -type d -fprintf $SRC_TOP/rpm-dev-dir.files "%%%%dir %%p\n"
|
||||||
|
find .%{_libdir}/%{name}-%{version} \( -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/rpm-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}/html/* -type d ! -name libraries ! -name src > $SRC_TOP/rpm-doc.files
|
||||||
)
|
)
|
||||||
|
|
||||||
# make paths absolute (filter "./usr" to "/usr")
|
# make paths absolute (filter "./usr" to "/usr")
|
||||||
sed -i -e "s|\.%{_prefix}|%{_prefix}|" rpm-*.files
|
sed -i -e "s|\.%{_prefix}|%{_prefix}|" rpm-*.files
|
||||||
|
|
||||||
cat rpm-dir.files rpm-lib.files > rpm-base.files
|
cat rpm-lib-dir.files rpm-lib.files > rpm-libs.files
|
||||||
|
cat rpm-dev-dir.files rpm-base.files > rpm-ghc.files
|
||||||
|
|
||||||
# these are handled as alternatives
|
# these are handled as alternatives
|
||||||
for i in hsc2hs runhaskell; do
|
for i in hsc2hs runhaskell; do
|
||||||
@ -194,53 +206,69 @@ update-alternatives --install %{_bindir}/runhaskell runhaskell \
|
|||||||
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
||||||
%{_bindir}/hsc2hs-ghc 500
|
%{_bindir}/hsc2hs-ghc 500
|
||||||
|
|
||||||
%if %{with shared}
|
|
||||||
%post libs -p /sbin/ldconfig
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" = 0 ]; then
|
if [ "$1" = 0 ]; then
|
||||||
update-alternatives --remove runhaskell %{_bindir}/runghc
|
update-alternatives --remove runhaskell %{_bindir}/runghc
|
||||||
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%if %{with shared}
|
%posttrans
|
||||||
%postun libs -p /sbin/ldconfig
|
ghc-pkg recache
|
||||||
%endif
|
|
||||||
|
|
||||||
%posttrans doc
|
%posttrans doc
|
||||||
# (posttrans to make sure any old documentation has been removed first)
|
# (posttrans to make sure any old documentation has been removed first)
|
||||||
( cd %{_docdir}/ghc/html/libraries && ./gen_contents_index ) || :
|
( cd %{_docdir}/ghc/html/libraries && ./gen_contents_index ) || :
|
||||||
|
|
||||||
%files -f rpm-base.files
|
%files -f rpm-ghc.files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc ANNOUNCE HACKING LICENSE README
|
%doc ANNOUNCE HACKING LICENSE README
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%dir %{_libdir}/ghc-%{version}/package.conf.d
|
%config(noreplace) %{_libdir}/%{name}-%{version}/package.conf.d/package.cache
|
||||||
%config(noreplace) %{_libdir}/ghc-%{version}/package.conf.d/*
|
%if %{with manual}
|
||||||
|
#%{_mandir}/man1/ghc.*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files doc -f rpm-doc-dir.files
|
%files doc -f rpm-doc.files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_docdir}/%{name}/html/index.html
|
|
||||||
%{_docdir}/%{name}/html/libraries/gen_contents_index
|
|
||||||
%dir %{_docdir}/%{name}/html/libraries
|
%dir %{_docdir}/%{name}/html/libraries
|
||||||
%doc %{_docdir}/%{name}/html/libraries/hscolour.css
|
%{_docdir}/%{name}/html/libraries/frames.html
|
||||||
|
%{_docdir}/%{name}/html/libraries/gen_contents_index
|
||||||
|
%{_docdir}/%{name}/html/libraries/hscolour.css
|
||||||
|
%{_docdir}/%{name}/html/libraries/prologue.txt
|
||||||
|
%{_docdir}/%{name}/html/index.html
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/doc-index*.html
|
%ghost %{_docdir}/%{name}/html/libraries/doc-index*.html
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/haddock.css
|
%ghost %{_docdir}/%{name}/html/libraries/haddock.css
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/haddock-util.js
|
%ghost %{_docdir}/%{name}/html/libraries/haddock-util.js
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/haskell_icon.gif
|
%ghost %{_docdir}/%{name}/html/libraries/haskell_icon.gif
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/frames.html
|
%ghost %{_docdir}/%{name}/html/libraries/index*.html
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/index.html
|
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/index-frames.html
|
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/minus.gif
|
%ghost %{_docdir}/%{name}/html/libraries/minus.gif
|
||||||
%ghost %{_docdir}/%{name}/html/libraries/plus.gif
|
%ghost %{_docdir}/%{name}/html/libraries/plus.gif
|
||||||
|
|
||||||
|
%if %{with shared}
|
||||||
|
%files libs -f rpm-libs.files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with prof}
|
%if %{with prof}
|
||||||
%files prof -f rpm-prof.files
|
%files prof -f rpm-prof.files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 18 2009 Jens Petersen <petersen@redhat.com> - 6.12.0.20091121-1
|
||||||
|
- update to 6.12.1 rc2
|
||||||
|
- build shared libs, yay! and package in standalone libs subpackage
|
||||||
|
- add bcond for manual and extralibs
|
||||||
|
- reenable ppc secondary arch
|
||||||
|
- don't provide ghc-haddock-*
|
||||||
|
- no longer need BR ncurses-devel or post policycoreutils requires
|
||||||
|
- add vanilla v to GhcLibWays when building without prof
|
||||||
|
- handle without hscolour
|
||||||
|
- can't smp make currently
|
||||||
|
- lots of filelist fixes for handling shared libs
|
||||||
|
- run ghc-pkg recache posttrans
|
||||||
|
- no need to install gen_contents_index by hand
|
||||||
|
|
||||||
* Thu Nov 12 2009 Bryan O'Sullivan <bos@serpentine.com> - 6.12.0.20091010-8
|
* Thu Nov 12 2009 Bryan O'Sullivan <bos@serpentine.com> - 6.12.0.20091010-8
|
||||||
- comprehensive attempts at packaging fixes
|
- comprehensive attempts at packaging fixes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user