aboutsummaryrefslogtreecommitdiffstats
path: root/community/cabal/APKBUILD
blob: 93378224338f2989233842a02e15e7c5b2c27257 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Contributor: Mitch Tishmack <mitch.tishmack@gmail.com>
# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
pkgname=cabal
pkgver=2.2.0.0
pkgrel=0
pkgdesc="The Haskell Cabal"
url="http://haskell.org"
arch="x86_64"
license="BSD-3-Clause"
depends="gmp zlib"
makedepends="ghc gmp-dev libffi-dev zlib-dev binutils-gold chrpath"

# Cabal haskell package versions, obtained via getting them from hackage directly
# instead of letting the bootstrap.sh script for cabal download them.
#
# They are mostly just relaxations for module constraints for newer versions of ghc.
#
# Note, for most there are no revisions to speak of, only those that have updates
# get a PACKAGErev variable.
_asyncver=2.2.1
_networkver=2.6.3.4
_networkrev=0
_networkuriver=2.6.1.0
_networkurirev=1
_httpver=4000.3.11
_zlibver=0.6.2
_randomver=1.1
_randomrev=1
_base16bytestringver=0.1.1.6
_base64bytestringver=1.0.0.1
_cryptohashver=0.11.101.0
_cryptohashrev=1
_ed25519ver=0.0.5.0
_ed25519rev=2
_tarver=0.5.1.0
_tarrev=0
_hashablever=1.2.7.0
_hashablerev=0
_hackagesecurityver=0.5.3.0
_hackagesecurityrev=0
_editdistancever=0.2.2.1
_editdistancerev=1
_minttyver=0.1.1
_echover=0.1.3
_echorev=1
_transformersver=0.5.4.0
_transformersrev=1
_deepseqver=1.4.3.0
_deepseqrev=1
_resolvver=0.1.1.1
_resolvrev=1

# Most of the time we don't need updated revisions of the cabal file
#
# But if/when a new ghc release comes out, sometimes the base requirements
# need to have updates.
#
# Ref:
# https://github.com/haskell-infra/hackage-trustees/blob/master/revisions-information.md
# for more information on why a cabal file might need to be updated outside of the
# source for the package.
_defaultrev=0

source="
	cabal-0001-force-ld.gold.patch
	https://hackage.haskell.org/package/cabal-install-$pkgver/cabal-install-$pkgver.tar.gz
	https://hackage.haskell.org/package/network-uri-$_networkuriver/network-uri-$_networkuriver.tar.gz
	network-uri.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/network-uri-$_networkuriver/revision/$_networkurirev.cabal
	https://hackage.haskell.org/package/network-$_networkver/network-$_networkver.tar.gz
	network.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/network-$_networkver/revision/$_networkrev.cabal
	https://hackage.haskell.org/package/HTTP-$_httpver/HTTP-$_httpver.tar.gz
	HTTP.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/HTTP-$_httpver/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/zlib-$_zlibver/zlib-$_zlibver.tar.gz
	zlib.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/zlib-$_zlibver/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/random-$_randomver/random-$_randomver.tar.gz
	random.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/random-$_randomver/revision/$_randomrev.cabal
	https://hackage.haskell.org/package/async-$_asyncver/async-$_asyncver.tar.gz
	async.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/async-$_asyncver/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/base16-bytestring-$_base16bytestringver/base16-bytestring-$_base16bytestringver.tar.gz
	base16-bytestring.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/base16-bytestring-$_base16bytestringver/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/base64-bytestring-$_base64bytestringver/base64-bytestring-$_base64bytestringver.tar.gz
	base64-bytestring.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/base64-bytestring-$_base64bytestringver/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/cryptohash-sha256-$_cryptohashver/cryptohash-sha256-$_cryptohashver.tar.gz
	cryptohash-sha256.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/cryptohash-sha256-$_cryptohashver/revision/$_cryptohashrev.cabal
	https://hackage.haskell.org/package/resolv-$_resolvver/resolv-$_resolvver.tar.gz
	resolv.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/resolv-$_resolvver/revision/$_resolvrev.cabal
	https://hackage.haskell.org/package/mintty-$_minttyver/mintty-$_minttyver.tar.gz
	mintty.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/mintty-$_minttyver/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/echo-$_echover/echo-$_echover.tar.gz
	echo.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/echo-$_echover/revision/$_echorev.cabal
	https://hackage.haskell.org/package/edit-distance-$_editdistancever/edit-distance-$_editdistancever.tar.gz
	edit-distance.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/edit-distance-$_editdistancever/revision/$_editdistancerev.cabal
	https://hackage.haskell.org/package/ed25519-$_ed25519ver/ed25519-$_ed25519ver.tar.gz
	ed25519.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/ed25519-$_ed25519ver/revision/$_ed25519rev.cabal
	https://hackage.haskell.org/package/tar-$_tarver/tar-$_tarver.tar.gz
	tar.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/tar-$_tarver/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/hashable-$_hashablever/hashable-$_hashablever.tar.gz
	hashable.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/hashable-$_hashablever/revision/$_defaultrev.cabal
	https://hackage.haskell.org/package/hackage-security-$_hackagesecurityver/hackage-security-$_hackagesecurityver.tar.gz
	hackage-security.cabal-$pkgver-$pkgrel::https://hackage.haskell.org/package/hackage-security-$_hackagesecurityver/revision/$_defaultrev.cabal
	"
builddir="$srcdir/$pkgname-install-$pkgver"

prepare() {
	cd "$srcdir"
	default_prepare

	# Copy .cabal files to their proper package.cabal names
	# also copy the tar.gz files in so bootstrap.sh sees them
	for c in $(cd $srcdir && echo *.cabal-$pkgver-$pkgrel); do
		p=$(echo $c | sed -e 's/[.]cabal.*//g')
		cd=$builddir/$(echo $c | sed -e 's/[.]cabal[-].*/\.cabal/g')".hackage"
		cs=$srcdir/$c
		msg "cp $cs $cd"
		cp $cs $cd
		g=$(echo $srcdir/$p*.tar.gz)
		msg "cp $g $builddir"
		cp $g $builddir
	done
}

build() {
	cd "$builddir"
	# Note: we don't want to build profiling or shared libraries, that is why
	# EXTRA_CONFIGURE_OPTS is set
	env HOME="$builddir" EXTRA_CONFIGURE_OPTS="" ./bootstrap.sh --jobs --no-doc
}

package() {
	cd "$builddir"

	install -m 755 -D dist/build/cabal/cabal "$pkgdir/usr/bin/cabal"
	chrpath -d "$pkgdir/usr/bin/cabal"

	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha512sums="735a1aa9084d7eb7297076587cf2896af2951d4a2ecc20c5a6758a91c3751f5c212b65668befc25cfbc273633041543bda3da0fe9cee59795eeb3f40b3fb4922  cabal-0001-force-ld.gold.patch
1b8c31dee09332808bc727322e1e0ca6aaa8c818c5172f412a9d56e8474c93cc814cab6d0cb776a5d0bb94155c023a098872fb91329ff6377278f891f06686f2  cabal-install-2.2.0.0.tar.gz
c1b6e516cd19875aab0da325dcb8f5c6b98d43c3952bda4f96bd9c798882357c724b2facbef09e2e98d29b696a9e5518a2de9463fb0af4c5df0734fe2654cc24  network-uri-2.6.1.0.tar.gz
01ac9bc467ae73ad7df4b2ac4d54d1cdc99832e872cc2aadd561f0413dcf073ed6d23b5a6a8ea88a4d6412e941cc708d5d0e81aac4124aba354125a87bc5ace3  network-uri.cabal-2.2.0.0-0
af06a0a031e9c7b3a659ccaf51d4249705a6cb9a46bf1b0b75f37f2b8099bceb14ad4bab619345f7e777a80722925c075647d8f8ac6f101736108f8c8ec6d1ba  network-2.6.3.4.tar.gz
8d9202f7d5833ffcf5deb9f43c6af963b6e7a67596b3c4b0d253fa4d0e92f6d3179cca400b4cc8ff81c6b1c58cbf9334897eecaf5af062cedaba42ce06b4c6fd  network.cabal-2.2.0.0-0
3c8624fd92f6fa16f128c7d7e4614fba0f95b31714c0dd6ca3e564bb9c3295ec34a952eca91d642b5c46470923ba506ec8234bbb6a67593a00f4c8b50e97aac9  HTTP-4000.3.11.tar.gz
e5fad89ac9a8f2eb7d1639769faf5359e5fb7b04b3aaabd948e47bdbe1a87aee163e0f184b9bb8996523fb836742f14461ea6f551423d93ac9340fa3ba04d949  HTTP.cabal-2.2.0.0-0
b899bcc2b015f83d0327915a1d48a76faeea086ed3fefd2b7a10db417d9929afbca2bc5b127bec22e360181abef55a91374d83262b10bbac43ccb99e3b4759e3  zlib-0.6.2.tar.gz
edcb15bc44b51fc557118e4d5c3c93214dc1677b1843e5b6bb6e831cafc56ae1b6ed52b4f3140e087d559d9c9b4f06fe0d3fc3cce2a9aa16833c19f18897a293  zlib.cabal-2.2.0.0-0
7f128b1c88adfe7ee6405578d3c999bb77e9e3c21e16f82a5197c0ad1d6731851e99e08d8169c6a8b1068ad8a1614c1c0ef8c04c1958337a6e325f1de0c718a3  random-1.1.tar.gz
cccc9fe05ec22db1e9e1399c9807e49f1312211fb9739a2ae3a455cc2fd00c1d9a74e64380541d83bb9b34fb02f00d80c67f2c1368ff7d1d631b7152b981d175  random.cabal-2.2.0.0-0
65daa880d2c10fb235ddd431f7b1d80b2c3cc78c8dfba7deb7f1f60a6b6495f159daffa560ad84908687b083309c300765b4ba45a6f787b24d364f3c0e070749  async-2.2.1.tar.gz
30761ddff2a90d816cbdeb4cb9d3933337aa2cb12225cbcd52068306d7ff8d46d268bd4c008efcc1543d04bfc765b6d7b9f8af6016f4be49f07846baef8c1035  async.cabal-2.2.0.0-0
699bc1f7819a1c0cea0154626f8799301bc9360bc997a5e9313a605ec33ea04d77219b100693021fd43e01d8d979374db07e6e3fabef5301c411f335e30a8cba  base16-bytestring-0.1.1.6.tar.gz
7245e3101ef496313bab5e27f72a8fd8fde3942e838092b8a54b3a7cf918b3c818a88f73c96271c059fd97255fd513074b6c121132d9c3e6157da490be9150fa  base16-bytestring.cabal-2.2.0.0-0
6936b34955b89a275f5bd71c74bbad2be6ff9e2023ac652bdbc9c5b10dd624e3862fc348849858fdb5c7b8aacc36ab4cda8bc6ea797c129b6b28d7e2e2e610e7  base64-bytestring-1.0.0.1.tar.gz
f535e3bb7142c57b6f2e22e1f53f9e70f231568a7e3f2e574d49454604fa81be5c108cbff876d6027302b8b46a6524548f4cb290dc93d3e9fe324b1ab1746c9d  base64-bytestring.cabal-2.2.0.0-0
c755f1354fb5f1d6cfb54f73e39692392517954118d98b39ac4be7460e75a9ddc91ad641fed0f17e5fa33b62b7b0734af66526ea757e00716832572bb383c612  cryptohash-sha256-0.11.101.0.tar.gz
9a5bdedfcbbac48a54ce1dc98c77a5c60e57bb69e0c4d878dc13fa787dc98a241eb774f706592542ee841d9c441256bd59e84f38b303bb17ac0dffb5d8f393cd  cryptohash-sha256.cabal-2.2.0.0-0
0bc87f922072077d08d49e583d7fe60127380044ff2433e2e794029b77b4334f854c8cec451c4ad5a938bb52144b6f0fd9cad9d550ba208cd96fb0acdb631536  resolv-0.1.1.1.tar.gz
7bd167643d3154e3400320ba5e2eba6b58f76c64d8a46102d85c50bc5f6c9e1a57416becd0cea5f5b7106066798a93099d0533ee31a8a154d3e90b2a15e09a2d  resolv.cabal-2.2.0.0-0
a8b8f4fc7b99d572abcdb14e3a0369dc7fc756264a79ad9a29497a4035a37c3bfb1c52deeaf43d236f4700f5c746814217178e8e7580324766f4799d68d2f3f4  mintty-0.1.1.tar.gz
da31841eeb0559375ea80a26a525bcc16a0a79b70fa32840077fc7a127b5d219e8e3dacdc706292b2bcd7b58d0778d1f24699a818ff329059462c1991d74c8bd  mintty.cabal-2.2.0.0-0
26a2398af231a8805b6b0a866348f848b8b8f21fe95a2fa3c781aaeae150df978335df573d46d5b07d7e4df19d6377d997f85c77049abaf0c5cb3e9998439c6f  echo-0.1.3.tar.gz
c32cbb261916d00c64c3106b69887f6e410ead309d34aaf0c2af9e5fba0ae8256cba7b65ea481e71e0cba1a55f94ad2689d1777c1fd5a8958e2250e114377676  echo.cabal-2.2.0.0-0
67d19c9f5712191f88641d32ff0b84aaf05c2acd71cfa81a17675690ac9076b34aff687afa8501f8b22ddcece12a439e053265d14b70dc155b0e08406050fdd7  edit-distance-0.2.2.1.tar.gz
cc1df59b94135ec245bb4d7e2040de824c74ed4b19758dd4fef4b5713009fb7c3fb56fa56cc24d3c2643ebc783b09ab2fb31d11efcce8846857a1f055650e209  edit-distance.cabal-2.2.0.0-0
cd2bb28de905c6d659f80f15e82970a9634c959432c73b6fd3b10ebca42a1ce734429e7ac861d0ab328904d99651a6d2fcaaf4d74ab75a3c0be68607e8f54ce9  ed25519-0.0.5.0.tar.gz
9e10bb302e48899dd80256a6ec76debc70a6c0789d2cd8694f413a2880fd3f14e3a3d40d5506ae0fa75c663f5dfa3a8eff612dae2249b4641a29fbfa62219035  ed25519.cabal-2.2.0.0-0
60992ef69be64430d7d322816940182ce91669cb31b6612789abf0fca42e8fa292b2f96f284b1857d82e58e159bc5bebdefef97f7c8e3edb85be4836f0b5eb1c  tar-0.5.1.0.tar.gz
31184fc99540dcc024abcf9b5396166649a1d8dea9c1eb599bd5aa5e14aa8644751bde5bc53ba274d692e2c5ff331b22dd60f8451e227b6a30d63ea95d5cf91e  tar.cabal-2.2.0.0-0
41accac8fa38ab5c243caa058deaf31644d4df670520010d0d593e84fd42970f3fe2d4e945a31ac5491050467e843c7bdb299283a4c6d1446dfcbc2dbc58eec7  hashable-1.2.7.0.tar.gz
f2ff74de6434bc9898623a2d6d79ac42e3257ef84e6f1723349909d57c5aa059577e396ac105c196b86220f2294416d7abde8311f98a09885232e1ff7911ce9f  hashable.cabal-2.2.0.0-0
57af812fb3911aed6ebdbc5de733e86a2bdc7845a07246c69346c59f654e7c4ae5bf20ad753cfe71dc1d7f47ce66a37fba49b178e8e6ff74002fc8ffb72d920d  hackage-security-0.5.3.0.tar.gz
ddb96c28b137befda12f379e2a228527514d2ad14e8866d8acff20c4c494d56a98909d53ad8e6d11eae8f98a648dbf887bf2a19df2f9d223bfdfc0418e598d9e  hackage-security.cabal-2.2.0.0-0"