summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 25 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f55f617e015..a6428e71172 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,25 +4,20 @@ pkgname=cx
pkgname1=cx
projectname=skycoin
pkgdesc="CX Skycoin Blockchain Programming Language"
-pkgver='autogenerated'
+pkgver=20190726.1341_031a2f36
pkggopath="github.com/$projectname/$pkgname1"
-pkgrel=3
+pkgrel=1
arch=('any')
url="https://${pkggopath}"
license=()
makedepends=('git' 'go' 'gcc' 'glade' 'xorg-server-xvfb' 'libxinerama' 'libxcursor' 'libxrandr' 'libglvnd' 'libglade' 'mesa' 'libxi' 'cairo' 'perl' 'pango')
-source=("git+${url}.git#branch=${BRANCH:-develop}"
-"Makefile")
-sha256sums=('SKIP'
-'40183bcce33ecc8f9dda374532efe9a303ed1490a0cc03b9fc2db8982166db74')
+source=("git+${url}.git#branch=${BRANCH:-develop}")
+sha256sums=('SKIP')
validpgpkeys=('DE08F924EEE93832DABC642CA8DC761B1C0C0CFC')
export GOOS=linux
export GOPATH="$srcdir"
-export GOROOT="$builddir"
-export GOBIN="$GOROOT"/bin
-export GOROOT_FINAL=/usr/lib/go
export CGO_ENABLED=1
@@ -58,6 +53,12 @@ prepare() {
git checkout develop
git submodule --quiet update --init --recursive
+#Lines 58 & 59 of the Makefile will try to install debian dependancies if they are not omitted
+ sed '58s/.*/#&/' Makefile > Makefile1
+ mv Makefile1 Makefile
+ sed '59s/.*/#&/' Makefile > Makefile1
+ mv Makefile1 Makefile
+
export GOPATH="$srcdir"/go
export GOBIN=${GOPATH}/bin
export PATH=${GOPATH}/bin:${PATH}
@@ -67,16 +68,20 @@ build() {
export GOPATH=$srcdir/go
export GOBIN=${GOPATH}/bin
export PATH=${GOPATH}/bin:${PATH}
- cp -b Makefile $srcdir/go/src/$pkggopath/Makefile
+# cp -b Makefile $srcdir/go/src/$pkggopath/Makefile
cd $srcdir/go/src/$pkggopath
- make install
-
+ make install-gfx-deps
+ make build-full
+ go install \
+ -gcflags "all=-trimpath=${GOPATH}" \
+ -asmflags "all=-trimpath=${GOPATH}" \
+ -ldflags "-extldflags $LDFLAGS" \
+ -v ./cmd/...
# msg2 'creating cx chains setup script'
-mkdir -p $srcdir/$pkgname1-scripts
-cd $srcdir/$pkgname1-scripts
-echo -e '#!/bin/bash \n #setup symlink for fiber.toml along GOPATH \n export GOBIN=/usr/lib/skycoin/go/bin \n echo "export GOBIN=/usr/lib/skycoin/go/bin" \n export GOPATH=/usr/lib/skycoin/go \n echo "export GOPATH=/usr/lib/skycoin/go" \n echo "cx --generate-address > address.txt" \n "cat address.txt" \n echo "edit /usr/lib/skycoin/cx/fiber.toml" \n echo "export SECRET_KEY=" \n echo "export PUBLIC_KEY=" \n echo "cx --blockchain --heap-initial 100 --stack-size 100 --secret-key $SECRET_KEY --public-key $PUBLIC_KEY /usr/lib/skycoin/go/src/github.com/skycoin/cx/examples/blockchain/counter-bc.cx" \n echo "export GENESIS_ADDRESS=" \n echo "export GENESIS_SIGNATURE=" \n echo "cx --publisher --genesis-address $GENESIS_ADDRESS --genesis-signature $GENESIS_SIGNATURE --secret-key $SECRET_KEY --public-key $PUBLIC_KEY" \n echo "cx --peer --genesis-address $GENESIS_ADDRESS --port 6001 --genesis-signature $GENESIS_SIGNATURE --public-key $PUBLIC_KEY" \n echo "cx --create-wallet --wallet-seed "museum nothing practice weird wheel dignity economy attend mask recipe minor dress""' > $pkgname1-chaintest
-chmod +x $pkgname1-chaintest
+#mkdir -p $srcdir/$pkgname1-scripts
+#cd $srcdir/$pkgname1-scripts
+#chmod +x $pkgname1-chaintest
}
package() {
@@ -103,8 +108,8 @@ ln -rTsf $pkgdir/usr/lib/$projectname/go/bin/$pkgname1 $pkgdir/usr/bin/$pkgname1
chmod 755 $pkgdir/usr/bin/$pkgname1
#done
#install the scripts
-cxscripts=$( ls $srcdir/$pkgname1-scripts )
-for i in $cxscripts; do
-cp $srcdir/$pkgname1-scripts/$i $pkgdir/usr/bin/$i
-done
+#cxscripts=$( ls $srcdir/$pkgname1-scripts )
+#for i in $cxscripts; do
+#cp $srcdir/$pkgname1-scripts/$i $pkgdir/usr/bin/$i
+#done
}