diff options
author | Sefa Eyeoglu | 2019-06-04 14:54:34 +0200 |
---|---|---|
committer | Sefa Eyeoglu | 2019-06-04 14:54:34 +0200 |
commit | 016e23d95e1ef8f878c58ae57728cd1e6b3b144d (patch) | |
tree | f10169d9845cdcc5bbfb0f608b68c1a2243146a9 | |
download | aur-016e23d95e1ef8f878c58ae57728cd1e6b3b144d.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 67 | ||||
-rw-r--r-- | config.json | 34 | ||||
-rw-r--r-- | gaia-hub.service | 28 |
4 files changed, 151 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0e25fceddf98 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = gaia-hub + pkgdesc = A decentralized high-performance storage system + pkgver = 2.5.3 + pkgrel = 1 + url = https://github.com/blockstack/gaia + arch = any + license = MIT + license = custom + makedepends = npm + makedepends = node-gyp + makedepends = make + depends = nodejs + optdepends = nginx: utilize provided example configs + source = gaia-hub::git+https://github.com/blockstack/gaia.git#tag=v2.5.3 + source = gaia-hub.service + source = config.json + sha512sums = SKIP + sha512sums = 26297bc8e85b7577922442dc904597d7087e52e1204580a7c1ede516de9b9947e6e1640f28aa4bc03851c466bc9953dd256c39ac7f429db62ea9ba662eb14a0f + sha512sums = 19a037b067cd254cf7c06b517b6a696804f9a559fa6689ca65478f963d3dfc28a03598ecc9c3cede60699dd29b691cefeea2b98e283fcca443cc8eb4dc17aad7 + +pkgname = gaia-hub + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5a7514011255 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Sefa Eyeoglu <contact@scrumplex.net> + +pkgname=gaia-hub +pkgver=2.5.3 +pkgrel=1 +pkgdesc="A decentralized high-performance storage system" +url="https://github.com/blockstack/gaia" +license=("MIT" "custom") +arch=("any") + +depends=( + "nodejs" +) + +makedepends=( + "npm" + "node-gyp" + "make" +) +optdepends=( + "nginx: utilize provided example configs" +) + +source=( + "${pkgname}::git+https://github.com/blockstack/gaia.git#tag=v${pkgver}" + "gaia-hub.service" + "config.json" +) +sha512sums=('SKIP' + '26297bc8e85b7577922442dc904597d7087e52e1204580a7c1ede516de9b9947e6e1640f28aa4bc03851c466bc9953dd256c39ac7f429db62ea9ba662eb14a0f' + '19a037b067cd254cf7c06b517b6a696804f9a559fa6689ca65478f963d3dfc28a03598ecc9c3cede60699dd29b691cefeea2b98e283fcca443cc8eb4dc17aad7') + +prepare() { + cd "$srcdir/$pkgname/hub" + npm --cache "${srcdir}/npm-cache" install +} + +build() { + cd "$srcdir/$pkgname/hub" + npm run build +} + +package() { + cd "$srcdir/$pkgname/hub" + + export NODE_ENV="production" + + install -d "${pkgdir}/etc/gaia/hub" "${pkgdir}/usr/lib/node_modules/gaia-hub" "${pkgdir}/usr/bin" "${pkgdir}/srv/gaia/hub" + + cp -r "lib" "node_modules" "${pkgdir}/usr/lib/node_modules/gaia-hub/" + chmod 755 "${pkgdir}/usr/lib/node_modules/gaia-hub/lib/index.js" + ln -s "/usr/lib/node_modules/gaia-hub/lib/index.js" "${pkgdir}/usr/bin/gaia-hub" + + install -Dm 644 "${srcdir}/config.json" "${pkgdir}/usr/lib/node_modules/gaia-hub/config.json" + ln -s "/usr/lib/node_modules/gaia-hub/config.json" "${pkgdir}/etc/gaia/hub/config.json" + + install -Dm 644 "nginx.conf" "${pkgdir}/usr/share/doc/gaia/hub/nginx.conf.example" + for file in etc/*.json; do + install -m 644 "$file" "${pkgdir}/usr/share/doc/gaia/hub/" + done + + install -Dm 644 "README.md" "${pkgdir}/usr/share/doc/gaia/hub/README.md" + install -Dm 644 "CHANGELOG.md" "${pkgdir}/usr/share/doc/gaia/hub/CHANGELOG.md" + install -Dm 644 "../LICENSE" "${pkgdir}/usr/share/licenses/gaia/LICENSE" + + install -Dm 644 "${srcdir}/gaia-hub.service" "${pkgdir}/usr/lib/systemd/system/gaia-hub.service" +} diff --git a/config.json b/config.json new file mode 100644 index 000000000000..e47c4b8186ba --- /dev/null +++ b/config.json @@ -0,0 +1,34 @@ +{ + "servername": "archlinux", + "port": "3000", + "driver": "disk", + "bucket": "hub", + "readURL": "hub", + "cacheControl": "public, max-age=1", + "pageSize": 20, + "diskSettings": { + "storageRootDirectory": "/srv/gaia/hub" + }, + "awsCredentials": { + "accessKeyId": "", + "secretAccessKey": "" + }, + + "proofsConfig": { + "proofsRequired" : 0 + }, + + "azCredentials": { + "accountName": "", + "accountKey": "" + }, + + "argsTransport": { + "level": "debug", + "handleExceptions": true, + "stringify": true, + "timestamp": true, + "colorize": true, + "json": true + } +} diff --git a/gaia-hub.service b/gaia-hub.service new file mode 100644 index 000000000000..800fcbd8c2c0 --- /dev/null +++ b/gaia-hub.service @@ -0,0 +1,28 @@ +[Unit] +Description=Gaia Hub decentralized high-performance storage system +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +DynamicUser=true +User=gaia +Group=gaia +WorkingDirectory=/usr/lib/node_modules/gaia-hub +Environment=NODE_ENV="production" +ExecStart=/usr/bin/gaia-hub + +# Hardening options +CapabilityBoundingSet= +AmbientCapabilities= +NoNewPrivileges=true +ProtectHome=true +ProtectSystem=full +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectControlGroups=true +PrivateTmp=true +LockPersonality=true + +[Install] +WantedBy=multi-user.target |