2024-01-05 22:42:53 +01:00
|
|
|
%ifarch x86_64 i586 aarch64
|
2024-01-05 22:42:51 +01:00
|
|
|
%define bootstrap 1
|
|
|
|
%endif
|
|
|
|
Name: ghc
|
2024-01-05 22:42:53 +01:00
|
|
|
Version: 9.4.8
|
|
|
|
Release: 4mamba
|
2024-01-05 22:42:51 +01:00
|
|
|
Summary: A compiler and interactive environment for the functional language Haskell.
|
|
|
|
Group: Applications/Development
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
2024-01-05 22:42:53 +01:00
|
|
|
URL: https://www.haskell.org/ghc/
|
|
|
|
Source: https://downloads.haskell.org/ghc/%{version}/ghc-%{version}-src.tar.xz
|
2024-01-05 22:42:51 +01:00
|
|
|
Patch0: ghc-7.6.3-pkgdir.patch
|
2024-01-05 22:42:53 +01:00
|
|
|
Patch1: ghc-9.4.8-sphinx-7.0.1.patch
|
2024-01-05 22:42:51 +01:00
|
|
|
License: BSD
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
2024-01-05 22:42:53 +01:00
|
|
|
BuildRequires: ghc-rpm-macros
|
2024-01-05 22:42:51 +01:00
|
|
|
BuildRequires: glibc-devel
|
2024-01-05 22:42:53 +01:00
|
|
|
BuildRequires: libffi-devel
|
2024-01-05 22:42:51 +01:00
|
|
|
BuildRequires: libgmp-devel
|
|
|
|
BuildRequires: libncurses-devel
|
2024-01-05 22:42:53 +01:00
|
|
|
BuildRequires: libnuma-devel
|
2024-01-05 22:42:51 +01:00
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
%if "%{bootstrap}" == "1"
|
2024-01-05 22:42:53 +01:00
|
|
|
BuildRequires: ghc-bin
|
2024-01-05 22:42:51 +01:00
|
|
|
%else
|
|
|
|
BuildRequires: ghc
|
|
|
|
%endif
|
2024-01-05 22:42:53 +01:00
|
|
|
BuildRequires: alex
|
|
|
|
BuildRequires: happy
|
|
|
|
Provides: ghc-compiler
|
|
|
|
Requires: ghc-rpm-macros
|
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
2024-01-05 22:42:51 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
GHC is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell.
|
|
|
|
|
2024-01-05 22:42:53 +01:00
|
|
|
%package libs
|
|
|
|
Summary: Shared directories for Haskell documentation
|
|
|
|
Group: Documentation
|
|
|
|
|
|
|
|
%description libs
|
|
|
|
This package provides some common directories used for Haskell libraries documentation.
|
|
|
|
|
|
|
|
%package filesystem
|
|
|
|
Summary: Shared directories for Haskell documentation
|
|
|
|
Group: Documentation
|
|
|
|
|
|
|
|
%description filesystem
|
|
|
|
This package provides some common directories used for Haskell libraries documentation.
|
|
|
|
|
|
|
|
#% debug_package
|
|
|
|
|
|
|
|
# Don't clean build at the end
|
|
|
|
%global __spec_rmbuild_cmd /bin/true
|
2024-01-05 22:42:51 +01:00
|
|
|
|
|
|
|
%prep
|
2024-01-05 22:42:53 +01:00
|
|
|
%setup -q -D -T
|
|
|
|
:<< _EOF
|
|
|
|
%global __provides_exclude ^libffi.so.*$
|
|
|
|
%global __requires_exclude ^.*libHS.*|libtinfo.so.6*$
|
|
|
|
|
|
|
|
#%patch0 -p1
|
|
|
|
%patch 1 -p1 -b .sphinx-7.0.1
|
2024-01-05 22:42:51 +01:00
|
|
|
|
|
|
|
%build
|
2024-01-05 22:42:53 +01:00
|
|
|
#:<< _EOF
|
|
|
|
%if "%{bootstrap}" == "1"
|
|
|
|
export PATH="/opt/ghc/bin:$PATH"
|
|
|
|
%ifarch aarch64
|
|
|
|
# ghc-bin 9.0.2 for aarch64 requires llvm 13
|
|
|
|
export PATH="/var/autodist/clang+llvm-13.0.1-aarch64-linux-gnu/bin:$PATH"
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2024-01-05 22:42:51 +01:00
|
|
|
./configure \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir}
|
|
|
|
|
2024-01-05 22:42:53 +01:00
|
|
|
# avoid "ghc: hGetContents: invalid argument (invalid byte sequence)"
|
|
|
|
export LANG=C.utf8
|
|
|
|
|
|
|
|
%make -j1
|
2024-01-05 22:42:51 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-05 22:42:53 +01:00
|
|
|
%if "%{bootstrap}" == "1"
|
|
|
|
export PATH="/opt/ghc/bin:$PATH"
|
|
|
|
%endif
|
|
|
|
|
2024-01-05 22:42:51 +01:00
|
|
|
%makeinstall
|
|
|
|
|
2024-01-05 22:42:53 +01:00
|
|
|
install -d -m0755 %{buildroot}%{ghc_html_libraries_dir}
|
|
|
|
|
|
|
|
# Triggers calling ghc-pkg recache
|
|
|
|
%transfiletriggerin -- %{ghcliblib}/package.conf.d
|
|
|
|
%ghc_pkg_recache
|
|
|
|
%end
|
|
|
|
|
|
|
|
%transfiletriggerpostun -- %{ghcliblib}/package.conf.d
|
|
|
|
%ghc_pkg_recache
|
|
|
|
%end
|
|
|
|
|
2024-01-05 22:42:51 +01:00
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/ghc
|
|
|
|
%{_bindir}/ghc-%{version}
|
|
|
|
%{_bindir}/ghc-pkg
|
|
|
|
%{_bindir}/ghc-pkg-%{version}
|
|
|
|
%{_bindir}/ghci
|
|
|
|
%{_bindir}/ghci-%{version}
|
|
|
|
%{_bindir}/haddock
|
|
|
|
%{_bindir}/haddock-ghc-%{version}
|
|
|
|
%{_bindir}/hp2ps
|
|
|
|
%{_bindir}/hpc
|
|
|
|
%{_bindir}/hsc2hs
|
|
|
|
%{_bindir}/runghc
|
|
|
|
%{_bindir}/runghc-%{version}
|
|
|
|
%{_bindir}/runhaskell
|
2024-01-05 22:42:53 +01:00
|
|
|
%dir %{_datadir}/doc/ghc-%{version}
|
|
|
|
%dir %{_datadir}/doc/ghc-%{version}/html
|
|
|
|
%{_datadir}/doc/ghc-%{version}/html/*
|
|
|
|
#%{_datadir}/doc/ghc/haddock.pdf
|
|
|
|
#%{_datadir}/doc/ghc/haddock.ps
|
|
|
|
%{_datadir}/doc/ghc-%{version}/users_guide.pdf
|
|
|
|
#%{_datadir}/doc/ghc/users_guide.ps
|
2024-01-05 22:42:51 +01:00
|
|
|
%{_mandir}/man1/ghc.1*
|
|
|
|
%doc LICENSE
|
|
|
|
|
2024-01-05 22:42:53 +01:00
|
|
|
%files libs
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/ghc-%{version}
|
|
|
|
%{_libdir}/ghc-%{version}/*
|
|
|
|
%ghost %{ghcliblib}/package.conf.d/package.cache
|
|
|
|
|
|
|
|
%files filesystem
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_ghc_doc_dir}
|
|
|
|
%dir %{ghc_html_dir}
|
|
|
|
%dir %{ghc_html_libraries_dir}
|
|
|
|
|
2024-01-05 22:42:51 +01:00
|
|
|
%changelog
|
2024-01-05 22:42:53 +01:00
|
|
|
* Sat Dec 02 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-4mamba
|
|
|
|
- added triggers calling ghc_pkg_recache macro on package.conf.d dir change
|
|
|
|
|
|
|
|
* Tue Nov 14 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-3mamba
|
|
|
|
- added libs and filesystem subpackages; require ghc-rpm-macros and provide ghc-compiler
|
|
|
|
|
|
|
|
* Mon Nov 13 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-2mamba
|
|
|
|
- rebuilt with gch-rpm-marcos
|
|
|
|
|
|
|
|
* Sat Nov 11 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-1mamba
|
|
|
|
- update to 9.4.8
|
|
|
|
|
|
|
|
* Mon Jan 25 2016 Automatic Build System <autodist@mambasoft.it> 7.10.3-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Wed Jun 11 2014 Automatic Build System <autodist@mambasoft.it> 7.8.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 22:42:51 +01:00
|
|
|
* Sat Sep 07 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6.3-1mamba
|
|
|
|
- package created by silvan using the webbuild interface
|