3 # This script, when passed the cabal release number as the first and only argument
4 # generates the metadata in the correct format to be useable as is by GHCup
6 # $ create-release-metadata-for-ghcup.sh 3.10.2.0 or "3.10.2.0"
8 # Note:- Please run ./download-cabal-install-release-binaries.sh before running this script.
13 ## FixMe:// What dir to use here?
15 if [ -d "binary-downloads/cabal-install-${RELEASE}-binaries" ]; then
16 echo "binary downloads folder for release ${RELEASE} found, starting generating GHCup metadata..."
18 echo "The binary downloads for release ${RELEASE} not found."
19 echo "Please run the script to download them first."
22 cd "binary-downloads/cabal-install-${RELEASE}-binaries"
24 cat <<EOF > /dev/stdout
28 viChangeLog: https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-$RELEASE.md
29 viPostInstall: *cabal-${RELEASE//./}-post-install
33 unknown_versioning: &cabal-${RELEASE//./}-64
34 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-alpine3_12.tar.xz
35 dlSubdir: cabal-install-$RELEASE
36 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-alpine3_12.tar.xz" | awk '{ print $1 }')
38 unknown_versioning: &cabal-${RELEASE//./}-64
40 unknown_versioning: &cabal-${RELEASE//./}-64-centos7
41 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-centos7.tar.xz
42 dlSubdir: cabal-install-$RELEASE
43 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-centos7.tar.xz" | awk '{ print $1 }')
45 ' ( >= 9 && < 10)': &cabal-${RELEASE//./}-64-debian
46 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb9.tar.xz
47 dlSubdir: cabal-install-$RELEASE
48 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb9.tar.xz" | awk '{ print $1 }')
50 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb10.tar.xz
51 dlSubdir: cabal-install-$RELEASE
52 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb10.tar.xz" | awk '{ print $1 }')
54 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb11.tar.xz
55 dlSubdir: cabal-install-$RELEASE
56 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb11.tar.xz" | awk '{ print $1 }')
57 unknown_versioning: &cabal-${RELEASE//./}-64-debian
60 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-fedora33.tar.xz
61 dlSubdir: cabal-install-$RELEASE
62 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-fedora33.tar.xz" | awk '{ print $1 }')
63 unknown_versioning: &cabal-${RELEASE//./}-64-centos7
65 '< 20': &cabal-${RELEASE//./}-64-ubuntu18
66 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-ubuntu18_04.tar.xz
67 dlSubdir: cabal-install-$RELEASE
68 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-ubuntu18_04.tar.xz" | awk '{ print $1 }')
69 '>= 20': &cabal-${RELEASE//./}-64-ubuntu20
70 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-ubuntu20_04.tar.xz
71 dlSubdir: cabal-install-$RELEASE
72 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-ubuntu20_04.tar.xz" | awk '{ print $1 }')
73 unknown_versioning: *cabal-${RELEASE//./}-64-ubuntu18
75 '< 20': *cabal-${RELEASE//./}-64-ubuntu18
76 '>= 20': *cabal-${RELEASE//./}-64-ubuntu20
77 unknown_versioning: *cabal-${RELEASE//./}-64-ubuntu18
80 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-darwin.tar.xz
81 dlSubdir: cabal-install-$RELEASE
82 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-darwin.tar.xz" | awk '{ print $1 }')
85 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-windows.zip
86 dlSubdir: cabal-install-$RELEASE
87 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-windows.zip" | awk '{ print $1 }')
90 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-freebsd.tar.xz
91 dlSubdir: cabal-install-$RELEASE
92 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-freebsd.tar.xz" | awk '{ print $1 }')
95 unknown_versioning: &cabal-${RELEASE//./}-32
96 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-i386-linux-alpine3_12.tar.xz
97 dlSubdir: cabal-install-$RELEASE
98 dlHash: $(sha256sum "cabal-install-$RELEASE-i386-linux-alpine3_12.tar.xz" | awk '{ print $1 }')
100 unknown_versioning: *cabal-${RELEASE//./}-32
103 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-i386-linux-deb9.tar.xz
104 dlSubdir: cabal-install-$RELEASE
105 dlHash: $(sha256sum "cabal-install-$RELEASE-i386-linux-deb9.tar.xz" | awk '{ print $1 }')
106 unknown_versioning: *cabal-${RELEASE//./}-32
110 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-darwin.tar.xz
111 dlSubdir: cabal-install-$RELEASE
112 dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-darwin.tar.xz" | awk '{ print $1 }')
114 '( >= 10 && < 11)': &cabal-31020-arm64
115 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-linux-deb10.tar.xz
116 dlSubdir: cabal-install-$RELEASE
117 dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-linux-deb10.tar.xz" | awk '{ print $1 }')
119 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-linux-deb11.tar.xz
120 dlSubdir: cabal-install-$RELEASE
121 dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-linux-deb11.tar.xz" | awk '{ print $1 }')
122 unknown_versioning: *cabal-${RELEASE//./}-arm64
124 unknown_versioning: *cabal-${RELEASE//./}-arm64