diff options
author | Matheus Gabriel Werny de Lima | 2021-02-25 19:03:59 +0100 |
---|---|---|
committer | Matheus Gabriel Werny de Lima | 2021-02-25 19:03:59 +0100 |
commit | 0097634ec6a130d8101f3e72eaddf5a19ccf9cda (patch) | |
tree | ac0ad16b6dbc0588f794786a7b857d6176d21076 /PKGBUILD | |
download | aur-0097634ec6a130d8101f3e72eaddf5a19ccf9cda.tar.gz |
Update.
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..3e68f67ec381 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,82 @@ +# Maintainer: Matheus Gabriel Werny de Lima <matheusgwdl@protomail.com> + +_pkgname=NBXplorer + +pkgname=nbxplorer-git +pkgver=2.1.49.r1.g45819a7 +pkgrel=1 +epoch= +pkgdesc="A minimalist UTXO tracker for HD wallets." +arch=("any") +url="https://github.com/dgarage/${_pkgname}" +license=("MIT") +groups=() +depends=("aspnet-runtime" "bitcoin-daemon" "dotnet-host" "dotnet-runtime" "dotnet-sdk") +makedepends=("git") +checkdepends=() +optdepends=() +provides=() +conflicts=("nbxplorer") +replaces=() +backup=() +options=() +install= +changelog= +source=("git+${url}.git") +noextract=() +md5sums=("SKIP") +validpgpkeys=() + +pkgver() +{ + cd ${srcdir}/${_pkgname}/ + printf "%s" "$(git describe --long | sed "s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g")" +} + +build() +{ + cd ${srcdir}/${_pkgname}/ + git checkout tags/$(git describe --tags --abbrev=0) + ./build.sh +} + +package() +{ + # Assure that the folders exist. + mkdir -p ${pkgdir}/usr/bin/ + mkdir -p ${pkgdir}/usr/lib/ + mkdir -p ${pkgdir}/usr/lib/systemd/system/ + mkdir -p ${pkgdir}/usr/share/doc/${_pkgname}/ + mkdir -p ${pkgdir}/usr/share/licenses/${_pkgname}/ + + # Create the systemd service. + echo -e "[Unit] + Description=${pkgdesc} + After=bitcoind.service + After=network.target + + [Service] + Type=oneshot + ExecStart=/usr/bin/nbxplorer + RemainAfterExit=yes + Restart=on-failure + + [Install] + WantedBy=multi-user.target" > ${srcdir}/${_pkgname}/nbxplorer.service + + # Put the installation at the right place. + cp -r ${srcdir}/${_pkgname}/ ${pkgdir}/usr/lib/ + + # Symlinking run.sh to /usr/bin/nbxplorer. + ln -rTsf ${pkgdir}/usr/lib/${_pkgname}/run.sh ${pkgdir}/usr/bin/$(echo ${_pkgname} | tr "[A-Z]" "[a-z]") + chmod 755 ${pkgdir}/usr/bin/$(echo ${_pkgname} | tr "[A-Z]" "[a-z]") + + # Install the systemd service. + install -Dm644 ${pkgdir}/usr/lib/${_pkgname}/nbxplorer.service ${pkgdir}/usr/lib/systemd/system/ + + # Install the documentation. + install -Dm644 ${pkgdir}/usr/lib/${_pkgname}/README.md ${pkgdir}/usr/share/doc/${_pkgname}/ + + # Install the license. + install -Dm644 ${pkgdir}/usr/lib/${_pkgname}/LICENSE ${pkgdir}/usr/share/licenses/${_pkgname}/ +} |