- and bootstrap 7.0.4 in factory
OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=89
This commit is contained in:
parent
1649d71a94
commit
6d5de77c49
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6cbdbe415011f2c7d15e4d850758d8d393f70617b88cb3237d2c602bb60e5e68
|
|
||||||
size 26592939
|
|
3
_service:download_files:ghc-7.0.4-src.tar.bz2
Normal file
3
_service:download_files:ghc-7.0.4-src.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed
|
||||||
|
size 24205070
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 27 10:46:52 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||||
|
|
||||||
|
- and bootstrap 7.0.4 in factory
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 26 17:14:40 UTC 2012 - peter.trommler@ohm-hochschule.de
|
Thu Jan 26 17:14:40 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||||
|
|
||||||
|
515
ghc.spec
515
ghc.spec
@ -1,257 +1,198 @@
|
|||||||
# 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.
|
|
||||||
#
|
#
|
||||||
# Please submit bugfixes or comments to herbert@links2linux.de
|
# 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.
|
||||||
|
|
||||||
# norootforbuild
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
%bcond_without prof
|
# To bootstrap a new version of ghc, uncomment the following:
|
||||||
%bcond_without shared
|
%global ghc_bootstrapping 1
|
||||||
%bcond_without doc
|
%{?ghc_bootstrap}
|
||||||
|
%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc
|
%global debug_package %{nil}
|
||||||
Version: 6.12.3
|
|
||||||
Release: 0
|
|
||||||
Summary: The Glasgow Haskell Compilation system
|
Name: ghc
|
||||||
Summary(de): Das Glasgow-Haskell-Compilation-System
|
Version: 7.0.4
|
||||||
License: BSD3
|
Release: 1
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
Source0: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
|
License: BSD
|
||||||
Patch1: ghc-6.12.1-gen_contents_index-haddock-path.patch
|
Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
|
||||||
URL: http://haskell.org/ghc/
|
Summary: The Glorious Glasgow Haskell Compiler
|
||||||
Provides: haddock = 2.5.0, haddock-doc = 2.5.0
|
|
||||||
Obsoletes: haddock < 2.5.0, haddock-doc < 2.5.0
|
BuildRequires: ghc
|
||||||
Requires(pre): update-alternatives
|
BuildRequires: ghc-directory-devel ghc-process-devel ghc-pretty-devel
|
||||||
Requires(posttrans): glibc-locale
|
BuildRequires: ghc-containers-devel ghc-haskell98-devel ghc-bytestring-devel
|
||||||
ExclusiveArch: %{ix86} x86_64
|
BuildRequires: ghc-rpm-macros >= 0.14
|
||||||
%if %{with shared}
|
# up to ghc-time-devel should be Required by ghc, remove after fix!
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
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
|
%endif
|
||||||
Requires: gmp-devel
|
# FIXME: containers, array and base not pulled in by OBS
|
||||||
Requires: update-alternatives
|
%if %{undefined without_haddock} && %{undefined without_hscolour}
|
||||||
Requires: glibc-locale
|
BuildRequires: hscolour ghc-containers ghc-base ghc-array
|
||||||
BuildRequires: ghc >= 5.0
|
BuildRequires: ghc-haskell98 ghc-random ghc-time ghc-process
|
||||||
%if %{suse_version} <= 1110
|
BuildRequires: ghc-directory ghc-unix ghc-old-time ghc-old-locale
|
||||||
BuildRequires: happy >= 1.15
|
BuildRequires: ghc-filepath
|
||||||
BuildRequires: alex >= 2.0
|
|
||||||
%else
|
|
||||||
BuildRecommends: happy >= 1.15
|
|
||||||
BuildRecommends: alex >= 2.0
|
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: fdupes
|
||||||
BuildRequires: gmp-devel
|
PreReq: update-alternatives
|
||||||
BuildRequires: libxslt
|
Requires: gcc gmp-devel ghc-base-devel
|
||||||
BuildRequires: sgml-skel
|
# Fedora put compiler into ghc-compiler and left ghc empty?!
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
Provides: ghc-compiler
|
||||||
BuildRequires: docbook-utils
|
Source: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
|
||||||
BuildRequires: update-alternatives
|
#Patch5 on Fedora
|
||||||
BuildRequires: fdupes
|
Patch: Cabal-option-executable-dynamic.patch
|
||||||
BuildRequires: ghc-rpm-macros
|
#Patch4 on Fedora
|
||||||
Provides: haskell_compiler
|
Patch1: ghc-use-system-libffi.patch
|
||||||
Provides: ghc-array-devel = 0.3.0.1
|
#Patch1 on Fedora
|
||||||
Provides: ghc-base-devel = 3.0.3.2
|
Patch2: ghc-6.12.1-gen_contents_index-haddock-path.patch
|
||||||
Provides: ghc-base-devel = 4.2.0.2
|
|
||||||
Provides: ghc-bin-package-db-devel
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
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
|
%description
|
||||||
Haskell is the standard purely functional programming language; the
|
|
||||||
current language version is Haskell 98, agreed in December 1998.
|
|
||||||
|
|
||||||
GHC is a state-of-the-art programming suite for Haskell. Included is
|
The Glorious Glasgow Haskell Compiler as published on haskell.org.
|
||||||
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).
|
|
||||||
|
|
||||||
A wide variety of Haskell related resources (tutorials, libraries,
|
%global ghc_version_override %{version}
|
||||||
specifications, documentation, compilers, interprbeters, references,
|
|
||||||
contact information, links to research groups) are available from the
|
|
||||||
Haskell home page at <http://www.haskell.org/>.
|
|
||||||
|
|
||||||
%if %{with prof}
|
%global _use_internal_dependency_generator 0
|
||||||
%package prof
|
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
|
||||||
Summary: Profiling libraries for GHC
|
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}
|
||||||
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
|
|
||||||
|
|
||||||
%description prof
|
%global ghc_pkg_c_deps ghc = %{ghc_version_override}-%{release}
|
||||||
Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
|
||||||
They should be installed when GHC's profiling subsystem is needed.
|
%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
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with shared}
|
%global version %{ghc_version_override}
|
||||||
%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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
rm -r ghc-tarballs/{mingw,perl}
|
||||||
|
%patch -p1 -b .orig
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
|
%patch1 -p1 -b .libffi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
#%%patch2 -p1 -b .orig
|
||||||
|
|
||||||
%build
|
%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}"
|
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} \
|
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} \
|
||||||
--sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} \
|
--sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} \
|
||||||
--includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} \
|
--includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} \
|
||||||
--localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} \
|
--localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} \
|
||||||
--mandir=%{_mandir} %{?with_shared:--enable-shared}
|
--mandir=%{_mandir} --docdir=%{_docdir}/ghc-docs \
|
||||||
|
%{?with_shared:--enable-shared}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall
|
%make_install
|
||||||
|
|
||||||
SRC_TOP=$PWD
|
for i in %{ghc_packages_list}; do
|
||||||
pushd ${RPM_BUILD_ROOT}
|
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
|
||||||
find .%{_libdir}/%{name}-%{version} -maxdepth 1 -type d ! -name 'include' \
|
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
|
||||||
! -name 'package.conf.d' -fprintf $SRC_TOP/rpm-lib-dir.files "%%%%dir %%p\n"
|
%ghc_gen_filelists $name $ver
|
||||||
find .%{_libdir}/%{name}-%{version} -type d -fprintf $SRC_TOP/rpm-dev-dir.files "%%%%dir %%p\n"
|
echo "%doc libraries/$name/LICENSE" >> ghc-$name%{?ghc_without_shared:-devel}.files
|
||||||
find .%{_libdir}/%{name}-%{version} \
|
done
|
||||||
\( -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 \
|
%ghc_gen_filelists bin-package-db 0.0.0.0
|
||||||
\( \( -name '*.hi' -o -name '*.dyn_hi' -o -name 'libHS*.a' -o -name 'HS*.o' -o \
|
%ghc_gen_filelists ghc %{ghc_version_override}
|
||||||
-name '*.h' -o -name '*.conf' -o -type f -not -name 'package.cache' \) -fprint $SRC_TOP/rpm-base.files \)
|
%ghc_gen_filelists ghc-binary 0.5.0.2
|
||||||
%if %{with doc}
|
%ghc_gen_filelists ghc-prim 0.2.0.0
|
||||||
mv .%{_datadir}/doc/%{name}/html .%{_datadir}/doc/%{name}/html-tmp
|
%ghc_gen_filelists integer-gmp 0.2.0.3
|
||||||
mv .%{_datadir}/doc/%{name}/html-tmp/* .%{_datadir}/doc/%{name}
|
|
||||||
rmdir .%{_datadir}/doc/%{name}/html-tmp
|
%define merge_filelist()\
|
||||||
find .%{_datadir}/doc/%{name}/* -type d ! -name libraries ! -name src > $SRC_TOP/rpm-doc.files
|
%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
|
||||||
%endif
|
%endif
|
||||||
popd
|
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
|
||||||
sed -i -e "s|\.%{_prefix}|%{_prefix}|" rpm-*.files
|
echo $RPM_BUILD_ROOT%{ghclibdir}/HSffi.o >> ghc-base-devel.files
|
||||||
|
%endif
|
||||||
cat rpm-lib-dir.files rpm-lib.files > rpm-libs.files
|
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base-devel.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
|
||||||
@ -260,73 +201,97 @@ for i in hsc2hs runhaskell; do
|
|||||||
else
|
else
|
||||||
mv ${RPM_BUILD_ROOT}%{_bindir}/$i{,-ghc}
|
mv ${RPM_BUILD_ROOT}%{_bindir}/$i{,-ghc}
|
||||||
fi
|
fi
|
||||||
|
touch ${RPM_BUILD_ROOT}%{_bindir}/$i
|
||||||
done
|
done
|
||||||
|
|
||||||
%if %{with doc}
|
%ghc_strip_dynlinked
|
||||||
%fdupes ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{name}
|
|
||||||
|
%if 0%{?suse_version} > 1020
|
||||||
|
%fdupes -s %{buildroot}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
update-alternatives --install %{_bindir}/runhaskell runhaskell \
|
%ghc_pkg_recache
|
||||||
%{_bindir}/runghc 500
|
# Alas, GHC, Hugs and nhc all come with different set of tools in addition to
|
||||||
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
# a runFOO:
|
||||||
%{_bindir}/hsc2hs-ghc 500
|
#
|
||||||
|
# * 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
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if test "$1" = 0; then
|
if test "$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
|
||||||
|
|
||||||
%posttrans
|
|
||||||
%{_bindir}/ghc-pkg recache
|
|
||||||
|
|
||||||
%posttrans doc
|
%files
|
||||||
%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,-)
|
%defattr(-,root,root,-)
|
||||||
%doc ANNOUNCE HACKING LICENSE README
|
%doc ANNOUNCE HACKING LICENSE README
|
||||||
%{_bindir}/*
|
%{_bindir}/ghc
|
||||||
%config %verify(not md5 mtime size) %{_libdir}/%{name}-%{version}/package.conf.d/package.cache
|
%{_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
|
||||||
%{_mandir}/man1/ghc.*
|
%{_mandir}/man1/ghc.*
|
||||||
|
%dir %{_docdir}/ghc-docs
|
||||||
%if %{with doc}
|
%dir %{ghcdocbasedir}
|
||||||
%files doc -f rpm-doc.files
|
%dir %{ghcdocbasedir}/libraries
|
||||||
%defattr(-,root,root,-)
|
%if %{undefined without_haddock}
|
||||||
%dir %{_datadir}/doc/%{name}
|
%{_bindir}/haddock
|
||||||
%dir %{_datadir}/doc/%{name}/libraries
|
%{_bindir}/haddock-ghc-%{version}
|
||||||
%{_datadir}/doc/%{name}/index.html
|
%{ghclibdir}/html
|
||||||
%{_datadir}/doc/%{name}/libraries/frames.html
|
%{ghclibdir}/latex
|
||||||
%{_datadir}/doc/%{name}/libraries/gen_contents_index
|
%{ghclibdir}/haddock
|
||||||
%{_datadir}/doc/%{name}/libraries/hscolour.css
|
%{ghcdocbasedir}/html
|
||||||
%{_datadir}/doc/%{name}/libraries/prologue.txt
|
%if %{undefined without_manual}
|
||||||
%ghost %{_datadir}/doc/%{name}/libraries/doc-index*.html
|
%{ghcdocbasedir}/Cabal
|
||||||
%ghost %{_datadir}/doc/%{name}/libraries/haddock.css
|
%{ghcdocbasedir}/haddock
|
||||||
%ghost %{_datadir}/doc/%{name}/libraries/haddock-util.js
|
%{ghcdocbasedir}/users_guide
|
||||||
%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
|
%endif
|
||||||
|
%{ghcdocbasedir}/libraries/frames.html
|
||||||
%if %{with shared}
|
%{ghcdocbasedir}/libraries/gen_contents_index
|
||||||
%files libs -f rpm-libs.files
|
%{ghcdocbasedir}/libraries/hscolour.css
|
||||||
%defattr(-,root,root,-)
|
%{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
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with prof}
|
|
||||||
%files prof -f rpm-prof.files
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user