diff options
author | axionl | 2018-06-23 14:01:42 +0800 |
---|---|---|
committer | axionl | 2018-06-23 14:01:42 +0800 |
commit | cc1fd18f2cc28fb89badce12908ffc9e8c6ecf8d (patch) | |
tree | 8fb5c56e5d74bf4cd79b0db86b584ac83a4f6f24 | |
download | aur-cc1fd18f2cc28fb89badce12908ffc9e8c6ecf8d.tar.gz |
Add package
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | config.conf | 35 | ||||
-rw-r--r-- | genesis.conf | 117 | ||||
-rw-r--r-- | go-nebulas.conf | 1 | ||||
-rw-r--r-- | go-nebulas.install | 8 | ||||
-rw-r--r-- | go-nebulas.service | 10 |
7 files changed, 289 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..de7c32ca0c20 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,38 @@ +pkgbase = go-nebulas + pkgdesc = Official Go implementation of the Nebulas protocol + pkgver = 1.0.5 + pkgrel = 1 + url = https://github.com/nebulasio/go-nebulas + install = go-nebulas.install + arch = x86_64 + license = LGPL3 + makedepends = dep + makedepends = go + makedepends = git + makedepends = gflags + makedepends = snappy + depends = icu + depends = rocksdb + provides = neb + provides = neb-crashreporter + conflicts = neb + conflicts = neb-crashreporter + noextract = go-nebulas.tar.gz + noextract = vendor.tar.gz + source = go-nebulas.tar.gz::https://github.com/nebulasio/go-nebulas/archive/v1.0.5.tar.gz + source = http://ory7cn4fx.bkt.clouddn.com/vendor.tar.gz + source = config.conf + source = genesis.conf + source = go-nebulas.conf + source = go-nebulas.service + source = go-nebulas.install + sha256sums = 9bd23e5b536e66af9c4e8612df04158126f11c8bf278d23b9e45cef3b55c219f + sha256sums = 831ff6b542fa73b39312c00d08a148201f37407fe3144618380983b9c48133bd + sha256sums = 47fb517be710ac459c446f34d69728f3416ae51aeccb9045ecdf8443450433ff + sha256sums = f02573abd8979f50f4541b8e2c4b732f8ced823dc105b368d59b09e2591b3071 + sha256sums = b6847abcf7e442ccbc82edc560f5702303c9efb43c9cd321fdd81800c206d2c8 + sha256sums = 3e11da7d6ef33e69de2f65c8d77f41d0e937f6900fe064572170648e92350892 + sha256sums = 572be734ba453e467efb698654fe443ea5fbcd1bc98df64f6d52a0b9b994fbcf + +pkgname = go-nebulas + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2074d8377a70 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: Ariel AxionL <axionl@aosc.io> +# Contributer: Hao Long <aur@esd.cc> + +pkgname=go-nebulas +pkgver=1.0.5 +pkgrel=1 +pkgdesc="Official Go implementation of the Nebulas protocol" +arch=("x86_64") +url="https://github.com/nebulasio/go-nebulas" +license=("LGPL3") +depends=("icu" "rocksdb") +makedepends=("dep" "go" "git" "gflags" "snappy") +provides=("neb" "neb-crashreporter") +conflicts=("neb" "neb-crashreporter") +source=("$pkgname.tar.gz::https://github.com/nebulasio/go-nebulas/archive/v$pkgver.tar.gz" + "http://ory7cn4fx.bkt.clouddn.com/vendor.tar.gz" + "config.conf" + "genesis.conf" + "go-nebulas.conf" + "go-nebulas.service" + "go-nebulas.install") + +sha256sums=('9bd23e5b536e66af9c4e8612df04158126f11c8bf278d23b9e45cef3b55c219f' + '831ff6b542fa73b39312c00d08a148201f37407fe3144618380983b9c48133bd' + '47fb517be710ac459c446f34d69728f3416ae51aeccb9045ecdf8443450433ff' + 'f02573abd8979f50f4541b8e2c4b732f8ced823dc105b368d59b09e2591b3071' + 'b6847abcf7e442ccbc82edc560f5702303c9efb43c9cd321fdd81800c206d2c8' + '3e11da7d6ef33e69de2f65c8d77f41d0e937f6900fe064572170648e92350892' + '572be734ba453e467efb698654fe443ea5fbcd1bc98df64f6d52a0b9b994fbcf') + +install="go-nebulas.install" +noextract=("$pkgname.tar.gz" "vendor.tar.gz") + +prepare() { + echo " -> Extracting files ..." + _extract_path="src/github.com/nebulasio" + + # extract + bsdtar -zxf vendor.tar.gz + mv vendor src + bsdtar -zxf $pkgname.tar.gz -C $_extract_path + mv "$_extract_path/$pkgname-$pkgver" "$_extract_path/$pkgname" +} + +build() { + echo " -> Building binary ..." + export GOPATH=${srcdir} + _dir="${srcdir}/src/github.com/nebulasio/$pkgname" + + # neb + cd ${_dir}/cmd/neb + LD_LIBRARY_PATH=${_dir}/nf/nvm/native-lib/ go build -o ${_dir}/neb + + # neb-crashreporter + cd ${_dir}/cmd/crashreporter + LD_LIBRARY_PATH=${_dir}/nf/nvm/native-lib/ go build -o ${_dir}/neb-crashreporter +} + +package() { + _dir="${srcdir}/src/github.com/nebulasio/$pkgname" + + # install library + install -Dm644 ${pkgname}.conf ${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf + install -dm755 ${pkgdir}/usr/lib/${pkgname}/lib + cp -r ${_dir}/nf/nvm/native-lib/*.so ${pkgdir}/usr/lib/${pkgname}/ + + # install binary + install -Dm755 ${_dir}/neb ${pkgdir}/usr/bin/neb + install -Dm755 ${_dir}/neb-crashreporter ${pkgdir}/usr/bin/neb-crashreporter + + # install license + install -Dm755 ${_dir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE + + # add example config + install -Dm644 config.conf ${pkgdir}/etc/${pkgname}/config.example.conf + install -Dm644 genesis.conf ${pkgdir}/etc/${pkgname}/gnesis.example.conf + cp -r ${_dir}/keydir ${pkgdir}/etc/${pkgname}/keydir + install -Dm644 ${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service +} +# vim set: ts=2 sw=2 et: diff --git a/config.conf b/config.conf new file mode 100644 index 000000000000..174ed2efd336 --- /dev/null +++ b/config.conf @@ -0,0 +1,35 @@ +# Default configuration for Nebulas mainnet +# For more information, please visit: https://github.com/nebulasio/wiki/blob/master/mainnet.md + +network { + seed: [ + "/ip4/52.2.205.12/tcp/8680/ipfs/QmQK7W8wrByJ6So7rf84sZzKBxMYmc1i4a7JZsne93ysz5", + "/ip4/52.56.55.238/tcp/8680/ipfs/QmVy9AHxBpd1iTvECDR7fvdZnqXeDhnxkZJrKsyuHNYKAh", + "/ip4/13.251.33.39/tcp/8680/ipfs/QmVm5CECJdPAHmzJWN2X7tP335L5LguGb9QLQ78riA9gw3" + ] + listen: ["0.0.0.0:8680"] +} + +chain { + chain_id: 1 + datadir: "/var/lib/go-nebulas/data.db" + keydir: "/etc/go-nebulas/keydir" + genesis: "/etc/go-nebulas/genesis.conf" + signature_ciphers: ["ECC_SECP256K1"] +} + +rpc { + rpc_listen: ["127.0.0.1:8684"] + http_listen: ["127.0.0.1:8685"] + http_module: ["api","admin"] +} + +app { + log_level: "info" + log_file: "/var/lib/go-nebulas/logs" + enable_crash_report: false +} + +stats { + enable_metrics: false +} diff --git a/genesis.conf b/genesis.conf new file mode 100644 index 000000000000..0d5b143767cf --- /dev/null +++ b/genesis.conf @@ -0,0 +1,117 @@ +# Default configuration for Nebulas mainnet +# For more information, please visit: https://github.com/nebulasio/wiki/blob/master/mainnet.md + +meta { + chain_id: 1 +} + +consensus { + dpos { + dynasty: [ + "n1dRDhQQG7AHqoQWCfwvDpaeS8nycU1zRw9", + "n1LTKgusVjpgNJusXYBtFpKy58Lx4mNXsED", + "n1bNg99bCLRanDGu5RD7fy9Htq4dskkDTdG", + "n1JEsMkcLW7mQfjGTrLCxw4GU8Bzzf5i1m4", + "n1Pv2z4fB8BfpvY2k9NYL6vJbqTp78pQNZj", + "n1N7zcs7K57nfd3tZL84NfMhc5QFF29oMss", + "n1XEK1JKWaUACyKxtwZCLsgPDLXeowjNA5V", + "n1XpiRbMYi7P53YoFbiseM9Ca36suaFq9Jz", + "n1TudnqMfbKKiuxnRFUx8oewkv2FnUyVm4B", + "n1WiqafBYemGrMkYSXtEu3xzBDf4N6owFsi", + "n1X95CXS9n4W8vkXDHPPAsLt6sFjBxVV71K", + "n1VxUFhftUfaZL6wRS1SiYTPjr9CsLejrWz", + "n1QEQhvjUdx9DgHVTPt5uGEefWagYqrLwYc", + "n1XrXF1GxgxTwxP2rHBvJehkrSK1PBWifAV", + "n1djyK7fkkakz5eUdkmQC1Bs1cUzEv3EpQV", + "n1MTaCQAnXazrnnawz3GVBC1KNcC7RUGRrg", + "n1MX76d8wSnPT7ZGahbTTiSgnStyXv2Vtjs", + "n1R7Q5kZtFUDM9E3VeN7yCvxtvcvaNmkZun", + "n1SuvRfpvBFbdyApZpRchSqabVBnohg4SV3", + "n1FPn932a7aJrybbSUJ5q9V9MzXTfojH8nb", + "n1SCj7jcgCHMVDBm6y9muo78uYg8L66svif" + ] + } +} + +token_distribution [ + { + address: "n1FLRAxzKTGhWg3SE4fq4sf1w1Lh4oVmnoB" + value: "5000000000000000000000000" + }, + { + address: "n1Fzz2fnrNEJkRiRXCHErZqbEj2ctUQVa4b" + value: "5000000000000000000000000" + }, + { + address: "n1HjnjfY7W9GxbRqT4tfr56rd8Kxh8rMA7L" + value: "5000000000000000000000000" + }, + { + address: "n1KxxAuJ1uNqQTDEkzta6SafwU2ggYpomTE" + value: "5000000000000000000000000" + }, + { + address: "n1NUDSMFs2ngRX4neQu3AcKGXEiXg4x8qHm" + value: "5000000000000000000000000" + }, + { + address: "n1S5Qav5gKReuY5GfiFsbg1nwRodHRvF9Mc" + value: "5000000000000000000000000" + }, + { + address: "n1TU357cMrMd2itTwGFNkHbs5r3JyJFKkS7" + value: "5000000000000000000000000" + }, + { + address: "n1TbUf4CqbG75f4bZRsDserZogq6XiprFFP" + value: "5000000000000000000000000" + }, + { + address: "n1Td2gUim3fr2hipdRBAfjZEkhfs4q3pubt" + value: "5000000000000000000000000" + }, + { + address: "n1USD2ikRmYDWqD5tJr4HEStqtLgNEjyRK5" + value: "5000000000000000000000000" + }, + { + address: "n1VbFmQQFreh9fMy2ucS5zPS2LK3iVUtYjb" + value: "5000000000000000000000000" + }, + { + address: "n1VrgxAAbVac6G4t9dj4yMk3J7VyQNEBnwD" + value: "5000000000000000000000000" + }, + { + address: "n1Xnx5T7SgidpbE5i8PtGa1qb5yDLgEgviK" + value: "5000000000000000000000000" + }, + { + address: "n1XqZHcedsJdUjzKfsxNEYZ6n8u5jWvNypJ" + value: "5000000000000000000000000" + }, + { + address: "n1YtqGiaXAMfLfeQNsuSgqrv98UVcxu81oN" + value: "5000000000000000000000000" + }, + { + address: "n1Z7pvUhh5UsuRC3uLZCSESzW33yZ1NXtFf" + value: "5000000000000000000000000" + }, + { + address: "n1abmmTqJPbPPFrba6JsK8w8T61DxkRqhnW" + value: "5000000000000000000000000" + }, + { + address: "n1bnJFHRv74T7rqnJCSSstiVz69LW3Z5byc" + value: "5000000000000000000000000" + }, + { + address: "n1cQ1dga5aiD841UewEDBXPh6qgQy4r1zaj" + value: "5000000000000000000000000" + }, + { + address: "n1d2ME92Qa3jZBL7onmWN7gFGegcnG933Wo" + value: "5000000000000000000000000" + } +] diff --git a/go-nebulas.conf b/go-nebulas.conf new file mode 100644 index 000000000000..6c4afc793e77 --- /dev/null +++ b/go-nebulas.conf @@ -0,0 +1 @@ +/usr/lib/go-nebulas
\ No newline at end of file diff --git a/go-nebulas.install b/go-nebulas.install new file mode 100644 index 000000000000..3c1ee292f4c5 --- /dev/null +++ b/go-nebulas.install @@ -0,0 +1,8 @@ +post_install() { + echo "Example mainnet configuration files are located in /etc/go-nebulas" + echo "You can delete the suffix *example to use them" + echo "Then, you can use \"systemctl start go-nebulas\" to start the node" + echo "For more information, please vists: https://github.com/nebulasio/wiki/wiki" +} + +# vim: set ts=2 sw=2 et: diff --git a/go-nebulas.service b/go-nebulas.service new file mode 100644 index 000000000000..6132d450b146 --- /dev/null +++ b/go-nebulas.service @@ -0,0 +1,10 @@ +[Unit] +Description=Official Go implementation of the Nebulas protocol +Documentation=https://github.com/nebulasio/wiki +After=network.target + +[Service] +ExecStart=/usr/bin/neb -c /etc/go-nebulas/config.conf + +[Install] +WantedBy=multi-user.target |