Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pkgname=cardano-node
- pkgver=10.2.1
- pkgrel=99
- pkgdesc='The core component that is used to participate in a Cardano decentralised blockchain.'
- license=('Apache')
- arch=('any')
- url='https://github.com/input-output-hk/cardano-node'
- _ghc_version='9.10.1'
- _cabal_version='3.12.1.0'
- makedepends=('git' 'ghcup-hs-bin')
- depends=('libsodium')
- backup=("etc/conf.d/cardano-node"
- "var/lib/cardano-node/config/mainnet-config.json"
- "var/lib/cardano-node/config/mainnet-topology.json"
- "var/lib/cardano-node/config/mainnet-topology-p2p.json"
- "var/lib/cardano-node/config/testnet-config.json"
- "var/lib/cardano-node/config/testnet-topology.json"
- "var/lib/cardano-node/config/testnet-topology-p2p.json")
- source=("https://github.com/input-output-hk/${pkgname}/archive/${pkgver}.zip"
- 'mainnet-config.json::https://book.world.dev.cardano.org/environments/mainnet/config.json'
- 'mainnet-byron-genesis.json::https://book.world.dev.cardano.org/environments/mainnet/byron-genesis.json'
- 'mainnet-shelley-genesis.json::https://book.world.dev.cardano.org/environments/mainnet/shelley-genesis.json'
- 'mainnet-alonzo-genesis.json::https://book.world.dev.cardano.org/environments/mainnet/alonzo-genesis.json'
- 'mainnet-conway-genesis.json::https://book.world.dev.cardano.org/environments/mainnet/conway-genesis.json'
- 'mainnet-topology.json::https://book.world.dev.cardano.org/environments/mainnet/topology.json'
- 'mainnet-topology-p2p.json::https://book.world.dev.cardano.org/environments/mainnet/topology-p2p.json'
- 'testnet-config.json::https://book.world.dev.cardano.org/environments/preprod/config.json'
- 'testnet-byron-genesis.json::https://book.world.dev.cardano.org/environments/preprod/byron-genesis.json'
- 'testnet-shelley-genesis.json::https://book.world.dev.cardano.org/environments/preprod/shelley-genesis.json'
- 'testnet-alonzo-genesis.json::https://book.world.dev.cardano.org/environments/preprod/alonzo-genesis.json'
- 'testnet-conway-genesis.json::https://book.world.dev.cardano.org/environments/preprod/conway-genesis.json'
- 'testnet-topology.json::https://book.world.dev.cardano.org/environments/preprod/topology.json'
- ### 'testnet-topology-p2p.json::https://book.world.dev.cardano.org/environments/preprod/topology-p2p.json'
- "cardano-node.sysusers"
- "cardano-node.tmpfiles"
- "cardano-node.service"
- "cardano-node.confd"
- "cardano-node-testnet.service"
- "cardano-node-testnet.confd")
- sha256sums=('3c290dbc61c96412a951c307405e2428e93c06f332766bbbac94d59d2dfd43c5'
- '997bdea73d599d0ea5b72205de6fad391adeadb3beef34145cddc990a16e61b7'
- '4f28b3b437b2c4f6ee26cc70964b3a5f1a274b0b3909c31535091c00316c13aa'
- '59cd3932c6dd792bc5020ca3336064a8faabde4e4a8dc7d143ff4df6eec36961'
- '7333bfafe311589fa09e8bf59a47ec0d85a1959f00748cc0800591d2c7646408'
- '0e70fc5317732e178aa2a3c6579e5123573d25525ee11af1261f3c4151fffddb'
- '6fb9ee83834603b0c2d0b679e0322ebe04208490dfcf402e3aa6df51bab30a9b'
- '6fb9ee83834603b0c2d0b679e0322ebe04208490dfcf402e3aa6df51bab30a9b'
- 'c25b85b8b86101c6ca8364e8d8aa6206cf51b2517b6152b9eac6fef247e2bf51'
- 'd88fbffdf78daaccfaddf504e95840c73ce527c06fa4140aefb55d3f91c00cef'
- '4b9d32c09159c2948e4386ba1f59db5a249a89b43b84dfd8368f465e650095de'
- '7333bfafe311589fa09e8bf59a47ec0d85a1959f00748cc0800591d2c7646408'
- 'c196814fe2e8f36ad1910e5c287184970339657729e7ad4fc354c34e149be3f8'
- '45488c0879b1e8ac0fc10ec3ee93db103be7e3476f943495067df6970a03c02c'
- '703f9b033c299b652b2d3228ee6ef4a9c09b7e846ff4b366a2aca68960370234'
- '3212902b0d2bb0e6bacba0feeafd261516b9f6ab5f37f876a8c37239a1947542'
- 'a712b09a9e9594dad7c8cb2cbb4a4eaa691fb0c3ba8491edfb5d0a56dfaf2c29'
- '809f5b67dd8ec0216655347361935d7d6a23299a31ff795f6c5ec806501bc5fd'
- 'd5badb9167fddcb4abdad451f7f2a8ee2eb00d7e1631b85778ba2ae783c263c2'
- '07a3dde7fb51f3f84bb51e7c15993dfefa337571ed509cc3588e73c54f606282')
- prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- # NOTE: this is used to avoid running out of space when
- # /tmp is not large enough
- mkdir -p ${srcdir}/ghcup_tmp
- TMPDIR=${srcdir}/ghcup_tmp ghcup install ghc ${_ghc_version}
- TMPDIR=${srcdir}/ghcup_tmp ghcup install cabal ${_cabal_version}
- ghcup set ghc ${_ghc_version}
- ghcup set cabal ${_cabal_version}
- export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
- export PKG_CONFIG_PATH='/usr/lib/pkgconfig'
- cabal configure --with-compiler=ghc-${_ghc_version}
- echo 'package cardano-crypto-praos' >> ${srcdir}/${pkgname}-${pkgver}/cabal.project.local
- echo ' flags: -external-libsodium-vrf' >> ${srcdir}/${pkgname}-${pkgver}/cabal.project.local
- cabal update
- }
- build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- cabal build all
- cabal build cardano-cli
- }
- package() {
- install -D -m0644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
- install -D -m0644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
- install -D -m0644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
- install -D -m0644 "${srcdir}/${pkgname}.confd" "${pkgdir}/etc/conf.d/${pkgname}"
- install -D -m0644 "mainnet-config.json" "${pkgdir}/var/lib/${pkgname}/config/mainnet-config.json"
- install -D -m0644 "mainnet-byron-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/mainnet-byron-genesis.json"
- install -D -m0644 "mainnet-shelley-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/mainnet-shelley-genesis.json"
- install -D -m0644 "mainnet-alonzo-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/mainnet-alonzo-genesis.json"
- install -D -m0644 "mainnet-conway-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/mainnet-conway-genesis.json"
- install -D -m0644 "mainnet-topology.json" "${pkgdir}/var/lib/${pkgname}/config/mainnet-topology.json"
- install -D -m0644 "mainnet-topology-p2p.json" "${pkgdir}/var/lib/${pkgname}/config/mainnet-topology-p2p.json"
- install -D -m0644 "testnet-config.json" "${pkgdir}/var/lib/${pkgname}/config/testnet-config.json"
- install -D -m0644 "testnet-byron-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/testnet-byron-genesis.json"
- install -D -m0644 "testnet-shelley-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/testnet-shelley-genesis.json"
- install -D -m0644 "testnet-alonzo-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/testnet-alonzo-genesis.json"
- install -D -m0644 "testnet-conway-genesis.json" "${pkgdir}/var/lib/${pkgname}/config/testnet-conway-genesis.json"
- install -D -m0644 "testnet-topology.json" "${pkgdir}/var/lib/${pkgname}/config/testnet-topology.json"
- ### install -D -m0644 "testnet-topology-p2p.json" "${pkgdir}/var/lib/${pkgname}/config/testnet-topology-p2p.json"
- install -D -m0644 "${srcdir}/${pkgname}-testnet.service" "${pkgdir}/usr/share/${pkgname}/${pkgname}-testnet-example.service"
- install -D -m0644 "${srcdir}/${pkgname}-testnet.confd" "${pkgdir}/usr/share/${pkgname}/${pkgname}-testnet-example.confd"
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -D -m0755 "$(./scripts/bin-path.sh cardano-cli)" "${pkgdir}/usr/bin/cardano-cli"
- install -D -m0755 "$(./scripts/bin-path.sh cardano-node)" "${pkgdir}/usr/bin/cardano-node"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement