summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM0Rf302017-07-28 19:39:34 +0200
committerM0Rf302017-07-28 19:39:34 +0200
commit9ac5b06a89fd6e18788569fc02bad4358a6e125e (patch)
tree486321b57d27d799ea7ebf84b703bcd673d7bead
parentafe8db922a1a572e88a3824a81e1908b9b2009d0 (diff)
downloadaur-9ac5b06a89fd6e18788569fc02bad4358a6e125e.tar.gz
hyperledger-fabric: FABRIC_CFG_PATH defined in global environment
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD12
-rwxr-xr-xfabric.sh3
-rw-r--r--hyperledger-fabric.install14
4 files changed, 23 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2b49da614c54..443908eec233 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
# Generated by mksrcinfo v8
-# Thu Jul 27 14:49:09 UTC 2017
+# Fri Jul 28 17:39:03 UTC 2017
pkgbase = hyperledger-fabric
pkgdesc = A platform for distributed ledger solutions, underpinned by a modular architecture delivering high degrees of confidentiality, resiliency, flexibility and scalability
pkgver = 1.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/hyperledger/fabric
+ install = hyperledger-fabric.install
arch = x86_64
groups = hyperledger-fabric
license = APACHE
@@ -12,9 +13,7 @@ pkgbase = hyperledger-fabric
depends = go
depends = docker
source = https://github.com/hyperledger/fabric/archive/v1.0.0.tar.gz
- source = fabric.sh
md5sums = a3b3b80224c88fe984207e6321ccdb04
- md5sums = 1da047c0fd9780e71a485013ade06060
pkgname = hyperledger-fabric
diff --git a/PKGBUILD b/PKGBUILD
index bef916e4333f..5bc6e29e8c54 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=fabric
pkgname=hyperledger-${_pkgname}
pkgver=1.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="A platform for distributed ledger solutions, underpinned by a modular architecture delivering high degrees of confidentiality, resiliency, flexibility and scalability"
arch=(x86_64)
url="https://github.com/hyperledger/fabric"
@@ -11,8 +11,8 @@ license=('APACHE')
groups=('hyperledger-fabric')
depends=('go' 'docker')
makedepends=('git')
-source=("https://github.com/hyperledger/fabric/archive/v$pkgver.tar.gz"
- fabric.sh)
+install=$pkgname.install
+source=("https://github.com/hyperledger/fabric/archive/v$pkgver.tar.gz")
prepare() {
export GOPATH="$PWD"/.gopath
@@ -30,13 +30,13 @@ package() {
cd $srcdir/${_pkgname}-$pkgver
install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
- install -Dm 644 -t "$pkgdir/etc/profile.d/" ../fabric.sh
cp -r release/linux-amd64/bin "$pkgdir/usr"
mkdir -p $pkgdir/etc/hyperledger/fabric
cp -r sampleconfig/* $pkgdir/etc/hyperledger/fabric
+ mkdir -p $pkgdir/var/hyperledger/{db,production}
+
}
-md5sums=('a3b3b80224c88fe984207e6321ccdb04'
- '1da047c0fd9780e71a485013ade06060')
+md5sums=('a3b3b80224c88fe984207e6321ccdb04')
diff --git a/fabric.sh b/fabric.sh
deleted file mode 100755
index 485591cfb661..000000000000
--- a/fabric.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-export FABRIC_CFG_PATH=/etc/hyperledger/fabric/
diff --git a/hyperledger-fabric.install b/hyperledger-fabric.install
new file mode 100644
index 000000000000..2b5320ccb02b
--- /dev/null
+++ b/hyperledger-fabric.install
@@ -0,0 +1,14 @@
+post_install() {
+ echo "Add this line to /etc/environment"
+ echo " export FABRIC_CFG_PATH=/etc/hyperledger/fabric/"
+}
+
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ echo "Remove this line to /etc/environment"
+ echo " export FABRIC_CFG_PATH=/etc/hyperledger/fabric/"
+}