summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4aba005d39826136d040c419dbc3c21ce1f72e7 (plain)
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
# Maintainer: setBoolean <setboolean@icloud.com>
pkgname="hornet-git"
_pkgname="hornet"
_branch="main"
_pkgver="1.0.1"
pkgver="1.0.1.r0.gb185dbcf"
pkgrel="1"
pkgdesc="HORNET is a powerful IOTA fullnode software"
arch=('x86_64')
url="https://github.com/gohornet/hornet"
license=("Apache")
depends=()
makedepends=('go' 'git')
source=("git://github.com/gohornet/$_pkgname.git#branch=$_branch"
	"$_pkgname.service")
sha256sums=('SKIP'
            '06f5b5c6d3a7384610438f73ff82f6ba669c4d6274b70ffd0784b0011cc9b560')
backup=('etc/hornet/config.json' 'etc/hornet/config_as.json' 'etc/hornet/config_chrysalis_testnet.json' 'etc/hornet/peering.json' 'etc/hornet/profiles.json')
install=$_pkgname.install

pkgver() {
        cd ${_pkgname}
        git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd ${srcdir}/hornet

        # Build with rocksdb
	go build -tags=builtin_static,rocksdb

}
package() {

	# Install files
	install -Dm600 ${srcdir}/hornet/config.json ${pkgdir}/etc/hornet/config.json
	install -Dm600 ${srcdir}/hornet/config_as.json ${pkgdir}/etc/hornet/config_as.json
	install -Dm600 ${srcdir}/hornet/config_chrysalis_testnet.json ${pkgdir}/etc/hornet/config_chrysalis_testnet.json
	install -Dm600 ${srcdir}/hornet/peering.json ${pkgdir}/etc/hornet/peering.json
	install -Dm600 ${srcdir}/hornet/profiles.json ${pkgdir}/etc/hornet/profiles.json	
	install -D ${srcdir}/hornet/hornet ${pkgdir}/usr/bin/hornet	

	# Install systemd service
	install -D ${srcdir}/hornet.service ${pkgdir}/usr/lib/systemd/system/hornet.service
}