- bootstrapping factory with 6.12.3
OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=88
This commit is contained in:
parent
355cde0b22
commit
1649d71a94
4
_service
4
_service
@ -1,3 +1,3 @@
|
||||
<services>
|
||||
<service name="download_url"><param name="path">/ghc/dist/7.0.4/ghc-7.0.4-src.tar.bz2</param><param name="host">haskell.org</param></service>
|
||||
</services>
|
||||
<service name="download_files"/>
|
||||
</services>
|
3
_service:download_files:ghc-6.12.3-src.tar.bz2
Normal file
3
_service:download_files:ghc-6.12.3-src.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6cbdbe415011f2c7d15e4d850758d8d393f70617b88cb3237d2c602bb60e5e68
|
||||
size 26592939
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed
|
||||
size 24205070
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 26 17:14:40 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- bootstrapping factory with 6.12.3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 23 21:27:37 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
|
520
ghc.spec
520
ghc.spec
@ -1,201 +1,257 @@
|
||||
# Copyright (c) 2007-2009 Herbert Graeber
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# spec file for package ghc
|
||||
# based on fedora package
|
||||
#
|
||||
# Copyright (c) 2012 Peter Trommler peter.trommler@ohm-hochschule.de
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
# Please submit bugfixes or comments to herbert@links2linux.de
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
# norootforbuild
|
||||
|
||||
# To bootstrap a new version of ghc, uncomment the following:
|
||||
#%%global ghc_bootstrapping 1
|
||||
#%%{?ghc_bootstrap}
|
||||
%global without_hscolour 1
|
||||
%bcond_without prof
|
||||
%bcond_without shared
|
||||
%bcond_without doc
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
|
||||
Name: ghc
|
||||
Version: 7.0.4
|
||||
Release: 1
|
||||
Group: Development/Languages/Other
|
||||
License: BSD
|
||||
Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
|
||||
Summary: The Glorious Glasgow Haskell Compiler
|
||||
%if %{defined ghc_bootstrapping}
|
||||
BuildRequires: ghc >= 6.10
|
||||
Name: ghc
|
||||
Version: 6.12.3
|
||||
Release: 0
|
||||
Summary: The Glasgow Haskell Compilation system
|
||||
Summary(de): Das Glasgow-Haskell-Compilation-System
|
||||
License: BSD3
|
||||
Group: Development/Languages/Other
|
||||
Source0: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
|
||||
Patch1: ghc-6.12.1-gen_contents_index-haddock-path.patch
|
||||
URL: http://haskell.org/ghc/
|
||||
Provides: haddock = 2.5.0, haddock-doc = 2.5.0
|
||||
Obsoletes: haddock < 2.5.0, haddock-doc < 2.5.0
|
||||
Requires(pre): update-alternatives
|
||||
Requires(posttrans): glibc-locale
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
%if %{with shared}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
%endif
|
||||
Requires: gmp-devel
|
||||
Requires: update-alternatives
|
||||
Requires: glibc-locale
|
||||
BuildRequires: ghc >= 5.0
|
||||
%if %{suse_version} <= 1110
|
||||
BuildRequires: happy >= 1.15
|
||||
BuildRequires: alex >= 2.0
|
||||
%else
|
||||
BuildRequires: ghc = %version
|
||||
BuildRecommends: happy >= 1.15
|
||||
BuildRecommends: alex >= 2.0
|
||||
%endif
|
||||
BuildRequires: ghc-directory-devel ghc-process-devel ghc-pretty-devel
|
||||
BuildRequires: ghc-containers-devel ghc-haskell98-devel ghc-bytestring-devel
|
||||
BuildRequires: ghc-rpm-macros >= 0.14
|
||||
# up to ghc-time-devel should be Required by ghc, remove after fix!
|
||||
BuildRequires: ghc-base-devel ghc-filepath-devel ghc-unix-devel
|
||||
BuildRequires: ghc-array-devel ghc-old-locale-devel ghc-old-time-devel
|
||||
BuildRequires: ghc-random-devel
|
||||
BuildRequires: ghc-time-devel
|
||||
BuildRequires: gcc pkg-config autoconf
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gmp-devel libffi-devel
|
||||
%if %{undefined without_manual}
|
||||
BuildRequires: libxslt docbook-xsl-stylesheets docbook-utils
|
||||
%endif
|
||||
# FIXME: containers, array and base not pulled in by OBS
|
||||
%if %{undefined without_haddock} && %{undefined without_hscolour}
|
||||
BuildRequires: hscolour ghc-containers ghc-base ghc-array
|
||||
BuildRequires: ghc-haskell98 ghc-random ghc-time ghc-process
|
||||
BuildRequires: ghc-directory ghc-unix ghc-old-time ghc-old-locale
|
||||
BuildRequires: ghc-filepath
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
PreReq: update-alternatives
|
||||
Requires: gcc gmp-devel ghc-base-devel
|
||||
# Fedora put compiler into ghc-compiler and left ghc empty?!
|
||||
Provides: ghc-compiler
|
||||
Source: %{name}-%{version}-src.tar.bz2
|
||||
#Patch5 on Fedora
|
||||
Patch: Cabal-option-executable-dynamic.patch
|
||||
#Patch4 on Fedora
|
||||
Patch1: ghc-use-system-libffi.patch
|
||||
#Patch1 on Fedora
|
||||
Patch2: ghc-6.12.1-gen_contents_index-haddock-path.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: sgml-skel
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: docbook-utils
|
||||
BuildRequires: update-alternatives
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: ghc-rpm-macros
|
||||
Provides: haskell_compiler
|
||||
Provides: ghc-array-devel = 0.3.0.1
|
||||
Provides: ghc-base-devel = 3.0.3.2
|
||||
Provides: ghc-base-devel = 4.2.0.2
|
||||
Provides: ghc-bin-package-db-devel
|
||||
Provides: ghc-bytestring-devel = 0.9.1.7
|
||||
Provides: ghc-Cabal-devel = 1.8.0.6
|
||||
Provides: ghc-containers-devel = 0.3.0.0
|
||||
Provides: ghc-directory-devel = 1.0.1.1
|
||||
Provides: ghc-dph-base-devel = 0.4.0
|
||||
Provides: ghc-dph-bench-devel = 0.1
|
||||
Provides: ghc-dph-common-devel = 0.4.0
|
||||
Provides: ghc-dph-prim-interface-devel = 0.4.0
|
||||
Provides: ghc-dph-prim-par-devel = 0.4.0
|
||||
Provides: ghc-dph-prim-seq-devel = 0.4.0
|
||||
Provides: ghc-extensible-exceptions-devel = 0.1.1.1
|
||||
Provides: ghc-filepath-devel = 1.1.0.4
|
||||
Provides: ghc-prim-devel = 0.2.0.0
|
||||
Provides: ghc-haskell98-devel = 1.0.1.1
|
||||
Provides: ghc-hpc-devel = 0.5.0.5
|
||||
Provides: ghc-integer-gmp-devel = 0.2.0.1
|
||||
Provides: ghc-integer-simple-devel = 0.1.0.0
|
||||
Provides: ghc-old-locale-devel = 1.0.0.2
|
||||
Provides: ghc-old-time-devel = 1.0.0.5
|
||||
Provides: ghc-pretty-devel = 1.0.1.1
|
||||
Provides: ghc-process-devel = 1.0.1.3
|
||||
Provides: ghc-random-devel = 1.0.0.2
|
||||
Provides: ghc-syb-devel = 0.1.0.2
|
||||
Provides: ghc-template-haskell-devel = 2.4.0.1
|
||||
Provides: ghc-time-devel = 1.1.4
|
||||
Provides: ghc-unix-devel = 2.4.0.2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Prefix: /usr
|
||||
|
||||
%description
|
||||
Haskell is the standard purely functional programming language; the
|
||||
current language version is Haskell 98, agreed in December 1998.
|
||||
|
||||
The Glorious Glasgow Haskell Compiler as published on haskell.org.
|
||||
GHC is a state-of-the-art programming suite for Haskell. Included is
|
||||
an optimising compiler generating good code for a variety of
|
||||
platforms, together with an interactive system for convenient, quick
|
||||
development. The distribution includes space and time profiling
|
||||
facilities, a large collection of libraries, and support for various
|
||||
language extensions, including concurrency, exceptions, and foreign
|
||||
language interfaces (C, C++, etc).
|
||||
|
||||
%global ghc_version_override %{version}
|
||||
A wide variety of Haskell related resources (tutorials, libraries,
|
||||
specifications, documentation, compilers, interprbeters, references,
|
||||
contact information, links to research groups) are available from the
|
||||
Haskell home page at <http://www.haskell.org/>.
|
||||
|
||||
%global _use_internal_dependency_generator 0
|
||||
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
|
||||
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}
|
||||
%if %{with prof}
|
||||
%package prof
|
||||
Summary: Profiling libraries for GHC
|
||||
Group: Development/Libraries/Other
|
||||
Requires: ghc = %{version}-%{release}
|
||||
Provides: ghc-prof = %{version}
|
||||
Provides: ghc-array-prof = 0.3.0.1
|
||||
Provides: ghc-base-prof = 3.0.3.2
|
||||
Provides: ghc-base-prof = 4.2.0.2
|
||||
Provides: ghc-bin-package-db-prof
|
||||
Provides: ghc-bytestring-prof = 0.9.1.7
|
||||
Provides: ghc-Cabal-prof = 1.8.0.6
|
||||
Provides: ghc-containers-prof = 0.3.0.0
|
||||
Provides: ghc-directory-prof = 1.0.1.1
|
||||
Provides: ghc-dph-base-prof = 0.4.0
|
||||
Provides: ghc-dph-bench-prof = 0.1
|
||||
Provides: ghc-dph-common-prof = 0.4.0
|
||||
Provides: ghc-dph-prim-interface-prof = 0.4.0
|
||||
Provides: ghc-dph-prim-par-prof = 0.4.0
|
||||
Provides: ghc-dph-prim-seq-prof = 0.4.0
|
||||
Provides: ghc-extensible-exceptions-prof = 0.1.1.1
|
||||
Provides: ghc-filepath-prof = 1.1.0.4
|
||||
Provides: ghc-prim-prof = 0.2.0.0
|
||||
Provides: ghc-haskell98-prof = 1.0.1.1
|
||||
Provides: ghc-hpc-prof = 0.5.0.4
|
||||
Provides: ghc-integer-gmp-prof = 0.2.0.1
|
||||
Provides: ghc-integer-simple-prof = 0.1.0.0
|
||||
Provides: ghc-old-locale-prof = 1.0.0.2
|
||||
Provides: ghc-old-time-prof = 1.0.0.5
|
||||
Provides: ghc-pretty-prof = 1.0.1.1
|
||||
Provides: ghc-process-prof = 1.0.1.3
|
||||
Provides: ghc-random-prof = 1.0.0.2
|
||||
Provides: ghc-syb-prof = 0.1.0.2
|
||||
Provides: ghc-template-haskell-prof = 2.4.0.1
|
||||
Provides: ghc-time-prof = 1.1.4
|
||||
Provides: ghc-unix-prof = 2.4.0.2
|
||||
|
||||
%global ghc_pkg_c_deps ghc = %{ghc_version_override}-%{release}
|
||||
|
||||
%if %{defined ghclibdir}
|
||||
%ghc_binlib_package Cabal 1.10.2.0
|
||||
%ghc_binlib_package array 0.3.0.2
|
||||
%ghc_binlib_package -c gmp-devel,libffi-devel base 4.3.1.0
|
||||
%ghc_binlib_package bytestring 0.9.1.10
|
||||
%ghc_binlib_package containers 0.4.0.0
|
||||
%ghc_binlib_package directory 1.1.0.0
|
||||
%ghc_binlib_package extensible-exceptions 0.1.1.2
|
||||
%ghc_binlib_package filepath 1.2.0.0
|
||||
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-%{release}
|
||||
%ghc_binlib_package ghc %{ghc_version_override}
|
||||
%undefine ghc_pkg_obsoletes
|
||||
%ghc_binlib_package haskell2010 1.0.0.0
|
||||
%ghc_binlib_package haskell98 1.1.0.1
|
||||
%ghc_binlib_package hpc 0.5.0.6
|
||||
%ghc_binlib_package old-locale 1.0.0.2
|
||||
%ghc_binlib_package old-time 1.0.0.6
|
||||
%ghc_binlib_package pretty 1.0.1.2
|
||||
%ghc_binlib_package process 1.0.1.5
|
||||
%ghc_binlib_package random 1.0.0.3
|
||||
%ghc_binlib_package template-haskell 2.5.0.0
|
||||
%ghc_binlib_package time 1.2.0.3
|
||||
%ghc_binlib_package unix 2.4.2.0
|
||||
%description prof
|
||||
Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
||||
They should be installed when GHC's profiling subsystem is needed.
|
||||
%endif
|
||||
|
||||
%global version %{ghc_version_override}
|
||||
%if %{with shared}
|
||||
%package libs
|
||||
Summary: Shared libraries for GHC
|
||||
Group: Development/Libraries
|
||||
|
||||
%description libs
|
||||
Shared libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
||||
%endif
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for GHC
|
||||
Group: Development/Languages/Other
|
||||
%if 0%{suse_version} > 1110
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
Requires: ghc = %{version}-%{release}
|
||||
Requires(posttrans): %{name} = %{version}-%{release}
|
||||
Provides: ghc-array-doc = 0.3.0.1
|
||||
Provides: ghc-base-doc = 3.0.3.2
|
||||
Provides: ghc-base-doc = 4.2.0.2
|
||||
Provides: ghc-bin-package-db-doc
|
||||
Provides: ghc-bytestring-doc = 0.9.1.6
|
||||
Provides: ghc-Cabal-doc = 1.8.0.4
|
||||
Provides: ghc-containers-doc = 0.3.0.0
|
||||
Provides: ghc-directory-doc = 1.0.1.1
|
||||
Provides: ghc-dph-base-doc = 0.4.0
|
||||
Provides: ghc-dph-bench-doc = 0.1
|
||||
Provides: ghc-dph-common-doc = 0.4.0
|
||||
Provides: ghc-dph-prim-interface-doc = 0.4.0
|
||||
Provides: ghc-dph-prim-par-doc = 0.4.0
|
||||
Provides: ghc-dph-prim-seq-doc = 0.4.0
|
||||
Provides: ghc-extensible-exceptions-doc = 0.1.1.1
|
||||
Provides: ghc-filepath-doc = 1.1.0.4
|
||||
Provides: ghc-prim-doc = 0.2.0.0
|
||||
Provides: ghc-haskell98-doc = 1.0.1.1
|
||||
Provides: ghc-hpc-doc = 0.5.0.5
|
||||
Provides: ghc-integer-gmp-doc = 0.2.0.1
|
||||
Provides: ghc-integer-simple-doc = 0.1.0.0
|
||||
Provides: ghc-old-locale-doc = 1.0.0.2
|
||||
Provides: ghc-old-time-doc = 1.0.0.5
|
||||
Provides: ghc-pretty-doc = 1.0.1.1
|
||||
Provides: ghc-process-doc = 1.0.1.3
|
||||
Provides: ghc-random-doc = 1.0.0.2
|
||||
Provides: ghc-syb-doc = 0.1.0.2
|
||||
Provides: ghc-template-haskell-doc = 2.4.0.1
|
||||
Provides: ghc-time-doc = 1.1.4
|
||||
Provides: ghc-unix-doc = 2.4.0.1
|
||||
|
||||
%description doc
|
||||
Preformatted documentation for the Glorious Glasgow Haskell Compilation System
|
||||
(GHC) and its libraries. It should be installed if you like to have local
|
||||
access to the documentation in PostScript and HTML format. Alternatively,
|
||||
the documentation is available online at
|
||||
|
||||
http://haskell.org/ghc/documentation.html
|
||||
|
||||
|
||||
# the debuginfo subpackage is currently empty anyway, so don't generate it
|
||||
%define debug_package %{nil}
|
||||
%define __spec_install_post /usr/lib/rpm/brp-compress
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
rm -r ghc-tarballs/{mingw,perl}
|
||||
%patch -p1 -b .orig
|
||||
%if 0%{?suse_version} > 1140
|
||||
%patch1 -p1 -b .libffi
|
||||
%endif
|
||||
|
||||
#%%patch2 -p1 -b .orig
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
autoreconf --force --install
|
||||
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
|
||||
# cf https://github.com/gentoo-haskell/gentoo-haskell/tree/master/dev-lang/ghc
|
||||
cat > mk/build.mk << EOF
|
||||
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
|
||||
%if %{defined without_haddock}
|
||||
HADDOCK_DOCS = NO
|
||||
%endif
|
||||
%if %{defined without_manual}
|
||||
BUILD_DOCBOOK_HTML = NO
|
||||
%endif
|
||||
%if %{defined without_hscolour}
|
||||
HSCOLOUR_SRCS = NO
|
||||
%endif
|
||||
%ifarch %{unregisterised_archs}
|
||||
GhcUnregisterised=YES
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
GhcNotThreaded=YES
|
||||
SRC_HC_OPTS+=-optc-mminimal-toc -optl-pthread
|
||||
SRC_CC_OPTS+=-mminimal-toc -pthread -Wa,--noexecstack
|
||||
%endif
|
||||
EOF
|
||||
|
||||
export SUSE_ASNEEDED=0
|
||||
export CFLAGS="${CFLAGS:-%optflags}"
|
||||
|
||||
echo "GhcLibWays = v %{?with_prof:p} %{?with_shared:dyn}" >> mk/build.mk
|
||||
echo "SRC_CC_OPTS+=-pthread" >> mk/build.mk
|
||||
echo "SRC_HC_OPTS+=-optl-pthread" >> mk/build.mk
|
||||
%if %{without doc}
|
||||
echo "HADDOCK_DOCS = NO" >> mk/build.mk
|
||||
%endif
|
||||
%if %{without manual}
|
||||
echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
|
||||
%endif
|
||||
|
||||
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} \
|
||||
--sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} \
|
||||
--includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} \
|
||||
--localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} \
|
||||
--mandir=%{_mandir} --docdir=%{_docdir}/ghc-docs \
|
||||
%{?with_shared:--enable-shared}
|
||||
--mandir=%{_mandir} %{?with_shared:--enable-shared}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%makeinstall
|
||||
|
||||
for i in %{ghc_packages_list}; do
|
||||
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
|
||||
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
|
||||
%ghc_gen_filelists $name $ver
|
||||
echo "%doc libraries/$name/LICENSE" >> ghc-$name%{?ghc_without_shared:-devel}.files
|
||||
done
|
||||
|
||||
%ghc_gen_filelists bin-package-db 0.0.0.0
|
||||
%ghc_gen_filelists ghc %{ghc_version_override}
|
||||
%ghc_gen_filelists ghc-binary 0.5.0.2
|
||||
%ghc_gen_filelists ghc-prim 0.2.0.0
|
||||
%ghc_gen_filelists integer-gmp 0.2.0.3
|
||||
|
||||
%define merge_filelist()\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
cat ghc-%1.files >> ghc-%2.files\
|
||||
%endif\
|
||||
cat ghc-%1-devel.files >> ghc-%2-devel.files\
|
||||
cp -p libraries/%1/LICENSE libraries/LICENSE.%1\
|
||||
echo "%doc libraries/LICENSE.%1" >> ghc-%2.files
|
||||
|
||||
%merge_filelist integer-gmp base
|
||||
%merge_filelist ghc-prim base
|
||||
%merge_filelist ghc-binary ghc
|
||||
%merge_filelist bin-package-db ghc
|
||||
|
||||
%if %{undefined ghc_without_shared}
|
||||
ls $RPM_BUILD_ROOT%{ghclibdir}/libHS*.so >> ghc-base.files
|
||||
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base.files
|
||||
SRC_TOP=$PWD
|
||||
pushd ${RPM_BUILD_ROOT}
|
||||
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 .%{_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 \)
|
||||
%if %{with doc}
|
||||
mv .%{_datadir}/doc/%{name}/html .%{_datadir}/doc/%{name}/html-tmp
|
||||
mv .%{_datadir}/doc/%{name}/html-tmp/* .%{_datadir}/doc/%{name}
|
||||
rmdir .%{_datadir}/doc/%{name}/html-tmp
|
||||
find .%{_datadir}/doc/%{name}/* -type d ! -name libraries ! -name src > $SRC_TOP/rpm-doc.files
|
||||
%endif
|
||||
ls -d $RPM_BUILD_ROOT%{ghclibdir}/libHS*.a $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d/builtin_*.conf $RPM_BUILD_ROOT%{ghclibdir}/include >> ghc-base-devel.files
|
||||
%if 0%{?suse_version} <= 1140
|
||||
echo $RPM_BUILD_ROOT%{ghclibdir}/HSffi.o >> ghc-base-devel.files
|
||||
%endif
|
||||
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base-devel.files
|
||||
popd
|
||||
|
||||
sed -i -e "s|\.%{_prefix}|%{_prefix}|" rpm-*.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
|
||||
for i in hsc2hs runhaskell; do
|
||||
@ -204,97 +260,73 @@ for i in hsc2hs runhaskell; do
|
||||
else
|
||||
mv ${RPM_BUILD_ROOT}%{_bindir}/$i{,-ghc}
|
||||
fi
|
||||
touch ${RPM_BUILD_ROOT}%{_bindir}/$i
|
||||
done
|
||||
|
||||
%ghc_strip_dynlinked
|
||||
|
||||
%if 0%{?suse_version} > 1020
|
||||
%fdupes -s %{buildroot}
|
||||
%if %{with doc}
|
||||
%fdupes ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{name}
|
||||
%endif
|
||||
|
||||
%post
|
||||
%ghc_pkg_recache
|
||||
# Alas, GHC, Hugs and nhc all come with different set of tools in addition to
|
||||
# a runFOO:
|
||||
#
|
||||
# * GHC: hsc2hs
|
||||
# * Hugs: hsc2hs, cpphs
|
||||
# * nhc: cpphs
|
||||
#
|
||||
# Therefore it is currently not possible to use --slave below to form link
|
||||
# groups under a single name 'runhaskell'. Either these tools should be
|
||||
# disentangled from the Haskell implementations or all implementations should
|
||||
# have the same set of tools. *sigh*
|
||||
update-alternatives --install %{_bindir}/runhaskell runhaskell %{_bindir}/runghc 500
|
||||
update-alternatives --install %{_bindir}/hsc2hs hsc2hs %{_bindir}/hsc2hs-ghc 500
|
||||
update-alternatives --install %{_bindir}/runhaskell runhaskell \
|
||||
%{_bindir}/runghc 500
|
||||
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
||||
%{_bindir}/hsc2hs-ghc 500
|
||||
|
||||
%preun
|
||||
if test "$1" = 0; then
|
||||
update-alternatives --remove runhaskell %{_bindir}/runghc
|
||||
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
||||
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
||||
fi
|
||||
|
||||
%posttrans
|
||||
%{_bindir}/ghc-pkg recache
|
||||
|
||||
%files
|
||||
%posttrans doc
|
||||
%ghc_reindex_haddock
|
||||
|
||||
%post doc
|
||||
%ghc_reindex_haddock
|
||||
|
||||
%postun doc
|
||||
if [ "$1" -eq 0 ] ; then
|
||||
%ghc_reindex_haddock
|
||||
fi
|
||||
|
||||
%files -f rpm-ghc.files
|
||||
%defattr(-,root,root,-)
|
||||
%doc ANNOUNCE HACKING LICENSE README
|
||||
%{_bindir}/ghc
|
||||
%{_bindir}/ghc-%{version}
|
||||
%{_bindir}/ghc-pkg
|
||||
%{_bindir}/ghc-pkg-%{version}
|
||||
%{_bindir}/ghci
|
||||
%{_bindir}/ghci-%{version}
|
||||
%{_bindir}/hp2ps
|
||||
%{_bindir}/hpc
|
||||
%ghost %attr(755,root,root) %{_bindir}/hsc2hs
|
||||
%{_bindir}/hsc2hs-ghc
|
||||
%{_bindir}/runghc
|
||||
%ghost %attr(755,root,root) %{_bindir}/runhaskell
|
||||
%{_bindir}/runhaskell-ghc
|
||||
%dir %{ghclibdir}
|
||||
%{ghclibdir}/extra-gcc-opts
|
||||
%{ghclibdir}/ghc
|
||||
%{ghclibdir}/ghc-pkg
|
||||
%ifnarch %{unregisterised_archs}
|
||||
%{ghclibdir}/ghc-asm
|
||||
%{ghclibdir}/ghc-split
|
||||
%endif
|
||||
%{ghclibdir}/ghc-usage.txt
|
||||
%{ghclibdir}/ghci-usage.txt
|
||||
%{ghclibdir}/hsc2hs
|
||||
%dir %{ghclibdir}/package.conf.d
|
||||
%ghost %{ghclibdir}/package.conf.d/package.cache
|
||||
%{ghclibdir}/runghc
|
||||
%{ghclibdir}/template-hsc.h
|
||||
%{ghclibdir}/unlit
|
||||
%{_bindir}/*
|
||||
%config %verify(not md5 mtime size) %{_libdir}/%{name}-%{version}/package.conf.d/package.cache
|
||||
%{_mandir}/man1/ghc.*
|
||||
%dir %{_docdir}/ghc-docs
|
||||
%dir %{ghcdocbasedir}
|
||||
%dir %{ghcdocbasedir}/libraries
|
||||
%if %{undefined without_haddock}
|
||||
%{_bindir}/haddock
|
||||
%{_bindir}/haddock-ghc-%{version}
|
||||
%{ghclibdir}/html
|
||||
%{ghclibdir}/latex
|
||||
%{ghclibdir}/haddock
|
||||
%{ghcdocbasedir}/html
|
||||
%if %{undefined without_manual}
|
||||
%{ghcdocbasedir}/Cabal
|
||||
%{ghcdocbasedir}/haddock
|
||||
%{ghcdocbasedir}/users_guide
|
||||
%endif
|
||||
%{ghcdocbasedir}/libraries/frames.html
|
||||
%{ghcdocbasedir}/libraries/gen_contents_index
|
||||
%{ghcdocbasedir}/libraries/hscolour.css
|
||||
%{ghcdocbasedir}/libraries/ocean.css
|
||||
%{ghcdocbasedir}/libraries/prologue.txt
|
||||
%{ghcdocbasedir}/index.html
|
||||
%ghost %{ghcdocbasedir}/libraries/doc-index*.html
|
||||
%ghost %{ghcdocbasedir}/libraries/haddock-util.js
|
||||
%ghost %{ghcdocbasedir}/libraries/index*.html
|
||||
%ghost %{ghcdocbasedir}/libraries/minus.gif
|
||||
%ghost %{ghcdocbasedir}/libraries/plus.gif
|
||||
|
||||
%if %{with doc}
|
||||
%files doc -f rpm-doc.files
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_datadir}/doc/%{name}
|
||||
%dir %{_datadir}/doc/%{name}/libraries
|
||||
%{_datadir}/doc/%{name}/index.html
|
||||
%{_datadir}/doc/%{name}/libraries/frames.html
|
||||
%{_datadir}/doc/%{name}/libraries/gen_contents_index
|
||||
%{_datadir}/doc/%{name}/libraries/hscolour.css
|
||||
%{_datadir}/doc/%{name}/libraries/prologue.txt
|
||||
%ghost %{_datadir}/doc/%{name}/libraries/doc-index*.html
|
||||
%ghost %{_datadir}/doc/%{name}/libraries/haddock.css
|
||||
%ghost %{_datadir}/doc/%{name}/libraries/haddock-util.js
|
||||
%ghost %{_datadir}/doc/%{name}/libraries/haskell_icon.gif
|
||||
%ghost %{_datadir}/doc/%{name}/libraries/index*.html
|
||||
%ghost %{_datadir}/doc/%{name}/libraries/minus.gif
|
||||
%ghost %{_datadir}/doc/%{name}/libraries/plus.gif
|
||||
%endif
|
||||
|
||||
%if %{with shared}
|
||||
%files libs -f rpm-libs.files
|
||||
%defattr(-,root,root,-)
|
||||
%endif
|
||||
|
||||
%if %{with prof}
|
||||
%files prof -f rpm-prof.files
|
||||
%defattr(-,root,root,-)
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user