name: discoin-core # you probably want to 'snapcraft register ' version: '1.14.4' summary: Reference client of Discoin, a peer-to-peer digital currency like Bitcoin. description: | Discoin is a cryptocurrency like Bitcoin, although it does not use SHA256 as its proof of work (POW). Taking development cues from Tenebrix and Litecoin, Discoin currently employs a simplified variant of scrypt. MIT licenced. base: core18 grade: stable confinement: strict architectures: - build-on: [amd64, i386, arm64] apps: d: command: discoind plugs: [home, removable-media, network, network-bind] environment: # Override HOME so the datadir is located at ~/snap/discoin-core/common/.discoin/ instead of ~/snap/discoin-core/current/.discoin/, and each new version of the snap won't have a different data directory: https://docs.snapcraft.io/environment-variables/7983 HOME: $SNAP_USER_COMMON qt: command: qt4-launch discoin-qt plugs: [home, removable-media, network, network-bind, desktop, x11, unity7] environment: HOME: $SNAP_USER_COMMON DISABLE_WAYLAND: 1 cli: command: discoin-cli plugs: [home, removable-media, network] environment: HOME: $SNAP_USER_COMMON parts: discoin-core: plugin: nil override-build: | echo "Downloading files..." wget https://github.com/discoin/discoin/releases/download/v${SNAPCRAFT_PROJECT_VERSION}/discoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz wget https://github.com/discoin/gitian.sigs/archive/refs/heads/master.zip unzip master.zip echo "Verifying secure hash matches signed values..." checksum=$(sha256sum discoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz) if ! grep -r $checksum *; then echo "Secure hash not verified." return fi tar -xvf discoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz echo "Running tests..." discoin-${SNAPCRAFT_PROJECT_VERSION}/bin/test_discoin echo "Installing Discoin..." install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin discoin-${SNAPCRAFT_PROJECT_VERSION}/bin/discoind install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin discoin-${SNAPCRAFT_PROJECT_VERSION}/bin/discoin-qt install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin discoin-${SNAPCRAFT_PROJECT_VERSION}/bin/discoin-cli wget https://raw.githubusercontent.com/discoin/discoin/v${SNAPCRAFT_PROJECT_VERSION}/share/pixmaps/bitcoin128.png install -m 0644 -D -t $SNAPCRAFT_PART_INSTALL/share/pixmaps bitcoin128.png build-packages: - unzip - wget stage-packages: - libfreetype6 - libpng16-16 - libx11-xcb1 - libx11-6 - libfontconfig qt4conf: build-packages: - dpkg-dev plugin: make source: https://github.com/kyrofa/qt4conf.git