From 2539b56c6da65a5095bbc9dc3100102ff70f7ed7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 22:42:51 +0100 Subject: [PATCH] package created by silvan using the webbuild interface [release 7.6.3-1mamba;Sat Sep 07 2013] --- README.md | 2 + ghc-7.6.3-pkgdir.patch | 20 ++++++++ ghc.spec | 104 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 ghc-7.6.3-pkgdir.patch create mode 100644 ghc.spec diff --git a/README.md b/README.md index db4a647..5bdba20 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # ghc +GHC is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. + diff --git a/ghc-7.6.3-pkgdir.patch b/ghc-7.6.3-pkgdir.patch new file mode 100644 index 0000000..ed415e7 --- /dev/null +++ b/ghc-7.6.3-pkgdir.patch @@ -0,0 +1,20 @@ +--- ghc-6.12.3/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs~ 2010-06-09 20:10:19.000000000 +0200 ++++ ghc-6.12.3/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs 2010-08-26 21:28:52.969002660 +0200 +@@ -205,7 +205,7 @@ + -- users to be able to configure @--libdir=\/usr\/lib64@ for example but + -- because by default we want to support installing multiple versions of + -- packages and building the same package for multiple compilers we append the +--- libsubdir to get: @\/usr\/lib64\/$pkgid\/$compiler@. ++-- libsubdir to get: @\/usr\/lib64\/$compiler\/$pkgid@. + -- + -- An additional complication is the need to support relocatable packages on + -- systems which support such things, like Windows. +@@ -236,7 +236,7 @@ + JHC -> "$compiler" + LHC -> "$compiler" + UHC -> "$pkgid" +- _other -> "$pkgid" "$compiler", ++ _other -> "$compiler" "$pkgid", + dynlibdir = "$libdir", + libexecdir = case buildOS of + Windows -> "$prefix" "$pkgid" diff --git a/ghc.spec b/ghc.spec new file mode 100644 index 0000000..a5e25fb --- /dev/null +++ b/ghc.spec @@ -0,0 +1,104 @@ +%ifnarch %{ix86} +%define bootstrap 1 +%endif +Name: ghc +Version: 7.6.3 +Release: 1mamba +Summary: A compiler and interactive environment for the functional language Haskell. +Group: Applications/Development +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.haskell.org/ghc/ +Source: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2 +Patch0: ghc-7.6.3-pkgdir.patch +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libgmp-devel +BuildRequires: libncurses-devel +## AUTOBUILDREQ-END +%if "%{bootstrap}" == "1" +BuildRequires: ghc-bootstrap-compiler +%else +BuildRequires: ghc +%endif +Conflicts: ghc-bootstrap-compiler +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +GHC is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. + +%debug_package + +%prep +%setup -q +#-D -T +%patch0 -p1 + +%define _use_internal_dependency_generator 0 +%define __find_provides %{_builddir}/%{name}-%{version}/find_provides.sh +cat > %{_builddir}/%{name}-%{version}/find_provides.sh <<_EOF +#! /bin/sh +%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu} | \ +grep -v "libffi.so" +exit 0 +_EOF +chmod +x %{_builddir}/%{name}-%{version}/find_provides.sh + +%define __find_requires %{_builddir}/%{name}-%{version}/find_requires.sh +cat > %{_builddir}/%{name}-%{version}/find_requires.sh <<_EOF +#! /bin/sh +%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} 2>/dev/null +exit 0 +_EOF +chmod +x %{_builddir}/%{name}-%{version}/find_requires.sh + +%build +#:<< __EOF +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} + +%make +#__EOF + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%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 +%dir %{_libdir}/ghc-%{version} +%{_libdir}/ghc-%{version}/* +%dir %{_datadir}/doc/ghc +%dir %{_datadir}/doc/ghc/html +%{_datadir}/doc/ghc/html/* +%{_datadir}/doc/ghc/haddock.pdf +%{_datadir}/doc/ghc/haddock.ps +%{_datadir}/doc/ghc/users_guide.pdf +%{_datadir}/doc/ghc/users_guide.ps +%{_mandir}/man1/ghc.1* +%doc LICENSE + +%changelog +* Sat Sep 07 2013 Silvan Calarco 7.6.3-1mamba +- package created by silvan using the webbuild interface