Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-support/ghc92-bin/PKGBUILD
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2021-12-11 12:49:44 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2021-12-11 12:49:44 +0100
commit249ad5b4907d0d80704b579545c09910803d7d6f (patch)
tree392ab858dd317bf8cda0015050a2eb565a811d6d /build-support/ghc92-bin/PKGBUILD
parent3d9e17453d22b259cba2c784fd9a1ce71dff752a (diff)
renamed ghc9.2-bin to ghc92-bin
Diffstat (limited to 'build-support/ghc92-bin/PKGBUILD')
-rw-r--r--build-support/ghc92-bin/PKGBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/build-support/ghc92-bin/PKGBUILD b/build-support/ghc92-bin/PKGBUILD
new file mode 100644
index 00000000..691e3431
--- /dev/null
+++ b/build-support/ghc92-bin/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Rudy Matela <rudy@matela.com.br>
+#
+# Contributor: Rudy Matela <rudy@matela.com.br>
+#
+# This package can coexist with the latest version of GHC.
+# If you would like to compile GHC yourself (AUR: ghc9.2),
+# you can use this to bootstrap compilation.
+pkgname=ghc92-bin
+pkgver=9.2.1
+pkgrel=1
+pkgdesc='Legacy binary GHC 9.2 installed on /usr/bin/ghc-9.2 (Oct/2021 - Oct/2021).'
+arch=('i486' 'i686' 'pentium4')
+url='http://www.haskell.org/ghc/'
+license=('custom')
+depends=('gcc' 'gmp' 'libffi' 'perl')
+makedepends=( 'perl' 'libxslt' 'docbook-xsl' 'ncurses5-compat-libs')
+checkdepends=('python2')
+install='ghc.install'
+options=('staticlibs')
+provides=('ghc9.2')
+conflicts=('ghc9.2')
+source=("https://www.haskell.org/ghc/dist/${pkgver}/ghc-${pkgver}-i386-deb9-linux.tar.xz")
+noextract=("ghc-${pkgver}-${CARCH}-deb10-linux.tar.xz")
+sha256sums=('6daa9e983fbe5af5a3c449c92e5b331d2ecb8e76ea07fc4e237ba5ff27af2c45')
+
+prepare() {
+ # for some reason, bsdtar cannot unpack this file:
+ tar -xf "ghc-${pkgver}-i386-deb9-linux.tar.xz"
+ # see https://wiki.archlinux.org/index.php/PKGBUILD#noextract
+}
+
+build() {
+ cd ghc-${pkgver}
+
+ sed -i 's,"$bindir/ghc","$bindir/ghc-9.2",' utils/runghc/runghc.wrapper
+
+ ./configure \
+ --prefix=/usr \
+ --docdir=/usr/share/doc/ghc-9.2
+}
+
+package() {
+ cd ghc-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ mv ${pkgdir}/usr/bin/ghc ${pkgdir}/usr/bin/ghc-9.2
+ mv ${pkgdir}/usr/bin/ghci ${pkgdir}/usr/bin/ghci-9.2
+ mv ${pkgdir}/usr/bin/ghc-pkg ${pkgdir}/usr/bin/ghc-pkg-9.2
+ mv ${pkgdir}/usr/bin/haddock ${pkgdir}/usr/bin/haddock-ghc-9.2
+ mv ${pkgdir}/usr/bin/hp2ps ${pkgdir}/usr/bin/hp2ps-ghc-9.2
+ mv ${pkgdir}/usr/bin/hpc ${pkgdir}/usr/bin/hpc-ghc-9.2
+ mv ${pkgdir}/usr/bin/hsc2hs ${pkgdir}/usr/bin/hsc2hs-ghc-9.2
+ mv ${pkgdir}/usr/bin/runghc ${pkgdir}/usr/bin/runghc-9.2
+ rm ${pkgdir}/usr/bin/runhaskell # use runghc-9.2 instead
+
+ mv ${pkgdir}/usr/share/man/man1/ghc.1 ${pkgdir}/usr/share/man/man1/ghc-9.2
+
+ install -d ${pkgdir}/usr/share/licenses/ghc-9.2
+ install -m644 LICENSE ${pkgdir}/usr/share/licenses/ghc-9.2
+}