summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorimlonghao2018-06-23 15:39:00 +0800
committerimlonghao2018-06-23 15:39:00 +0800
commit8f601634054eb8f0c2f682e503bd934ce9cf24a0 (patch)
tree9c8a3f56dff7b1f72b0939a13d031a1b6b47e766
downloadaur-8f601634054eb8f0c2f682e503bd934ce9cf24a0.tar.gz
Add package
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD69
-rw-r--r--config.conf35
-rw-r--r--genesis.conf117
-rw-r--r--go-nebulas-git.conf1
-rw-r--r--go-nebulas-git.install6
-rw-r--r--go-nebulas.service10
7 files changed, 272 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9f11a88bcf5e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = go-nebulas-git
+ pkgdesc = Official Go implementation of the Nebulas protocol
+ pkgver = r2209.78433128
+ pkgrel = 1
+ url = https://github.com/nebulasio/go-nebulas
+ install = go-nebulas-git.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
+ source = go-nebulas-git::git+https://github.com/nebulasio/go-nebulas.git
+ source = config.conf
+ source = genesis.conf
+ source = go-nebulas.service
+ source = go-nebulas-git.install
+ source = go-nebulas-git.conf
+ sha256sums = SKIP
+ sha256sums = 47fb517be710ac459c446f34d69728f3416ae51aeccb9045ecdf8443450433ff
+ sha256sums = f02573abd8979f50f4541b8e2c4b732f8ced823dc105b368d59b09e2591b3071
+ sha256sums = 3e11da7d6ef33e69de2f65c8d77f41d0e937f6900fe064572170648e92350892
+ sha256sums = 3b79cfec7c854ad35279c308068a56f499dee83db492b4ce7de3c1fb68890571
+ sha256sums = eba28579d2c1d1213ed5dc09f84d8244de20bca1828d9adfaac841b603b54f06
+
+pkgname = go-nebulas-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b628fe95ba1b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,69 @@
+# Maintainer: Hao Long <aur@esd.cc>
+# Contributor: Ariel AxionL <axionl@aosc.io>
+
+pkgname=go-nebulas-git
+pkgver=r2209.78433128
+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")
+install="go-nebulas-git.install"
+source=("$pkgname::git+https://github.com/nebulasio/go-nebulas.git"
+ "config.conf"
+ "genesis.conf"
+ "go-nebulas.service"
+ "go-nebulas-git.install"
+ "go-nebulas-git.conf")
+sha256sums=('SKIP'
+ '47fb517be710ac459c446f34d69728f3416ae51aeccb9045ecdf8443450433ff'
+ 'f02573abd8979f50f4541b8e2c4b732f8ced823dc105b368d59b09e2591b3071'
+ '3e11da7d6ef33e69de2f65c8d77f41d0e937f6900fe064572170648e92350892'
+ '3b79cfec7c854ad35279c308068a56f499dee83db492b4ce7de3c1fb68890571'
+ 'eba28579d2c1d1213ed5dc09f84d8244de20bca1828d9adfaac841b603b54f06')
+
+pkgver() {
+ cd ${srcdir}/${pkgname}
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ export GOPATH=${srcdir}
+ export _dir=${srcdir}/src/github.com/nebulasio/go-nebulas
+ git clone ${srcdir}/${pkgname} ${_dir}
+}
+
+build() {
+ cd ${_dir}
+ dep ensure -v
+ # neb
+ cd ${_dir}/cmd/neb
+ LD_LIBRARY_PATH=${_dir}/nf/nvm/native-lib/ go build -o ../../neb
+ # neb-crashreporter
+ cd ${_dir}/cmd/crashreporter
+ LD_LIBRARY_PATH=${_dir}/nf/nvm/native-lib/ go build -o ../../neb-crashreporter
+}
+
+package() {
+ # Install Library
+ install -Dm644 ${pkgname}.conf ${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf
+ install -dm755 ${pkgdir}/usr/lib/${pkgname}
+ install -Dm755 ${_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 configuration file
+ install -d ${pkgdir}/etc/go-nebulas
+ install -Dm644 config.conf ${pkgdir}/etc/go-nebulas/config.conf.example
+ install -Dm644 genesis.conf ${pkgdir}/etc/go-nebulas/genesis.conf.example
+ cp -r ${_dir}/keydir ${pkgdir}/etc/go-nebulas/keydir.example
+ install -Dm644 go-nebulas.service ${pkgdir}/usr/lib/systemd/system/caddy.service
+}
+
+# vim: 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-git.conf b/go-nebulas-git.conf
new file mode 100644
index 000000000000..cfb384463a46
--- /dev/null
+++ b/go-nebulas-git.conf
@@ -0,0 +1 @@
+/usr/lib/go-nebulas-git
diff --git a/go-nebulas-git.install b/go-nebulas-git.install
new file mode 100644
index 000000000000..f1cdfd842072
--- /dev/null
+++ b/go-nebulas-git.install
@@ -0,0 +1,6 @@
+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 visit: https://github.com/nebulasio/wiki/wiki"
+}
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