summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoses Narrow2019-04-03 17:17:28 -0500
committerMoses Narrow2019-04-03 17:17:28 -0500
commite286bee89bce3bb429d3862801de4cce60566a39 (patch)
tree220778d7135360cbd30c90dd6839154244823a85
parent8acb3dbfecb4a5e6cc306e779a495623a37d0ff3 (diff)
downloadaur-e286bee89bce3bb429d3862801de4cce60566a39.tar.gz
bump pkgrel; fixed; optimized
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD60
2 files changed, 23 insertions, 40 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 528860adf47..7cf382a96e8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,13 @@
pkgbase = skywire-mainnet
pkgdesc = Skywire: Building a New Internet. Skycoin.net
pkgver = autogenerated
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/skycoin/skywire
arch = x86_64
arch = i686
arch = armv6h
arch = armv7h
arch = aarch64
- license = MIT
makedepends = dep
makedepends = git
makedepends = go
diff --git a/PKGBUILD b/PKGBUILD
index 02bc21592c3..4caa07d5c1d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,10 +6,10 @@ pkgname1=skywire
pkgdesc="Skywire: Building a New Internet. Skycoin.net"
pkgver='autogenerated'
pkggopath="github.com/$projectname/$pkgname1"
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
url="https://${pkggopath}"
-license=(MIT)
+license=()
makedepends=(dep git go gcc)
provides=('skywire')
conflicts=('skywire')
@@ -18,12 +18,21 @@ sha256sums=('SKIP')
validpgpkeys=('DE08F924EEE93832DABC642CA8DC761B1C0C0CFC')
export GOOS=linux
+export GOPATH="$srcdir"
+export GOROOT="$builddir"
+export GOBIN="$GOROOT"/bin
+export GOROOT_FINAL=/usr/lib/$pkgname
+
+export CGO_ENABLED=0
+
case "$CARCH" in
- x86_64) export GOARCH=amd64 ;;
+armel) export GOARCH="arm" GOARM="5" ;;
+armhf) export GOARCH="arm" GOARM="6" ;;
+armv7) export GOARCH="arm" GOARM="7" ;;
+x86) export GOARCH="386" GO386="387" ;;
+x86_64) export GOARCH="amd64" ;;
+*) return 1 ;;
esac
-export GOROOT_FINAL=/usr/lib/go
-export GOPATH_FINAL=$HOME/go
-export GOBIN_FINAL=$HOME/go/bin
pkgver() {
cd "$srcdir/$pkgname1"
@@ -55,29 +64,16 @@ build() {
export GOBIN=${GOPATH}/bin
export PATH=${GOPATH}/bin:${PATH}
cd $srcdir/go/src/$pkggopath
- GO111MODULE=on go install \
- -gcflags "all=-trimpath=${GOPATH}" \
- -asmflags "all=-trimpath=${GOPATH}" \
- -ldflags "-extldflags $LDFLAGS" \
- -v ./...
- mkdir skywire
- mkdir apps
- # Build apps.
- GO111MODULE=on go build -o ./apps/chat.v1.0 ./cmd/apps/chat
- GO111MODULE=on go build -o ./apps/helloworld.v1.0 ./cmd/apps/helloworld
- GO111MODULE=on go build -o ./apps/therealproxy.v1.0 ./cmd/apps/therealproxy
- GO111MODULE=on go build -o ./apps/therealproxy-client.v1.0 ./cmd/apps/therealproxy-client
- GO111MODULE=on go build -o ./apps/therealssh.v1.0 ./cmd/apps/therealssh
- GO111MODULE=on go build -o ./apps/therealssh-client.v1.0 ./cmd/apps/therealssh-client
-
+ make build
+ make
+ make install
#user must generate default json config by running this script after install
- echo -e '#!/bin/bash \n # this script sets up skywire after installation \n mkdir -p ~/skywire \n sudo chmod 777 ~/skywire \n sudo chmod 777 ~/apps \n cd ~/ \n ln -s /usr/lib/skycoin/skywire/apps ~/ \n skywire-cli config \n skywire-node skywire.json' > $srcdir/go/bin/$pkgname1-setup
+ echo -e '#!/bin/bash \n # this script sets up skywire after installation \n mkdir -p ~/skywire \n sudo chmod 777 ~/skywire \n sudo chmod 777 ~/apps \n cd ~/ \n ln -s /usr/lib/skycoin/skywire/apps ~/ \n skywire-cli config \n skywire-manager-node gen-config \n skywire-node skywire.json' > $srcdir/go/bin/$pkgname1-setup
chmod +x $srcdir/go/bin/$pkgname1-setup
}
package() {
- msg2 'installing files'
- options=(!strip staticlibs)
+ options=(!strip staticlibs)
#create directory trees
mkdir -p $pkgdir/usr/bin
mkdir -p $pkgdir/usr/lib/$projectname/go/bin
@@ -87,21 +83,9 @@ package() {
#restate go envs
export GOPATH=$pkgdir/usr/lib/$projectname/go
export GOBIN=$pkgdir/usr/lib/$projectname/go/bin
- #put all bins in /go/bin
- cp $srcdir/go/src/github.com/skycoin/skywire/apps/chat.v1.0 $srcdir/go/bin/skywire-chat
- cp $srcdir/go/src/github.com/skycoin/skywire/apps/helloworld.v1.0 $srcdir/go/bin/skywire-helloworld
- cp $srcdir/go/src/github.com/skycoin/skywire/apps/therealproxy.v1.0 $srcdir/go/bin/skywire-therealproxy
- cp $srcdir/go/src/github.com/skycoin/skywire/apps/therealproxy-client.v1.0 $srcdir/go/bin/skywire-therealproxy-client
- cp $srcdir/go/src/github.com/skycoin/skywire/apps/therealssh.v1.0 $srcdir/go/bin/skywire-therealssh
- cp $srcdir/go/src/github.com/skycoin/skywire/apps/therealssh-client.v1.0 $srcdir/go/bin/skywire-therealssh-client
- #mke sure all the binaries are prepended with 'skywire-'
+ msg2 'installing binaries'
skybins="$srcdir"/go/bin
- potentialnameconflicts=$( ls --ignore=skywire* "$skybins")
- cd $skybins
- for i in $potentialnameconflicts; do
- mv $i $pkgname1-$i
- done
- #now symlink binaries to /usr/bin
+ cp $skybins/manager-node $skybins/skywire-manager-node
skywirebins=$( ls $skybins )
for i in $skywirebins; do
install -Dm755 $srcdir/go/bin/$i $pkgdir/usr/lib/$projectname/go/bin/$i