summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD115
-rw-r--r--PKGBUILD.sigbin566 -> 0 bytes
3 files changed, 56 insertions, 75 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9dc901c2923..bafc8c1f570 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = cx
- pkgdesc = CX Skycoin Blockchain Programming Language
+ pkgdesc = CX Blockchain Programming Language. skycoin.com/cx
pkgver = 0.7.1
- pkgrel = 3
- url = https://github.com/skycoinproject/cx
+ pkgrel = 4
+ url = https://github.com/skycoin/cx
arch = any
makedepends = git
makedepends = go
@@ -19,13 +19,11 @@ pkgbase = cx
makedepends = cairo
makedepends = perl
makedepends = pango
- makedepends = skycoin-keyring
- source = https://github.com/skycoinproject/cx/archive/v0.7.1.tar.gz
- source = PKGBUILD.sig
- validpgpkeys = DE08F924EEE93832DABC642CA8DC761B1C0C0CFC
- validpgpkeys = 98F934F04F9334B81DFA3398913BBD5206B19620
+ makedepends = goyacc
+ makedepends = musl
+ makedepends = kernel-headers-musl
+ source = https://github.com/skycoin/cx/archive/v0.7.1.tar.gz
sha256sums = 1deb342041cc365c92617e8cf6c24801ff3011f2df90a988b4541b5bc83be4fe
- sha256sums = SKIP
pkgname = cx
options = !strip
diff --git a/PKGBUILD b/PKGBUILD
index 9a3b21219b8..d5f7df69afa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,75 +1,52 @@
# Maintainer: Moses Narrow <moe_narrow@use.startmail.com>
# Maintainer: Rudi [KittyCash] <rudi@skycoinmail.com>
pkgname=cx
-pkgname1=cx
-projectname=skycoin
-githuborg=skycoinproject
-pkgdesc="CX Skycoin Blockchain Programming Language"
+_pkgname=$pkgname
+_projectname=skycoin
+_githuborg=$_projectname
+pkgdesc="CX Blockchain Programming Language. skycoin.com/cx"
pkgver=0.7.1
-pkggopath="github.com/${githuborg}/${pkgname1}"
-pkgrel=3
+_pkggopath="github.com/${_githuborg}/${_pkgname}"
+_pkggopath1="github.com/SkycoinProject/${_pkgname}"
+pkgrel=4
arch=('any')
-url="https://${pkggopath}"
+url="https://${_pkggopath}"
license=()
-makedepends=('git' 'go' 'gcc' 'glade' 'xorg-server-xvfb' 'libxinerama' 'libxcursor' 'libxrandr' 'libglvnd' 'libglade' 'mesa' 'libxi' 'cairo' 'perl' 'pango' 'skycoin-keyring')
-source=("${url}/archive/v${pkgver}.tar.gz"
-"PKGBUILD.sig")
-sha256sums=('1deb342041cc365c92617e8cf6c24801ff3011f2df90a988b4541b5bc83be4fe'
- 'SKIP')
-validpgpkeys=('DE08F924EEE93832DABC642CA8DC761B1C0C0CFC' # Moses Narrow <moe_narrow@use.startmail.com>
- '98F934F04F9334B81DFA3398913BBD5206B19620') #iketheadore skycoin <luxairlake@protonmail.com>
-
-export GOOS=linux
-export GOPATH="${srcdir}"
-
-export CGO_ENABLED=1
-
-case "$CARCH" in
-x86) export GOARCH="386" GO386="387" ;;
-x86_64) export GOARCH="amd64" ;;
-arm*) export GOARCH="arm" ;;
-armel) export GOARCH="arm" GOARM="5" ;;
-armhf) export GOARCH="arm" GOARM="6" ;;
-armv7) export GOARCH="arm" GOARM="7" ;;
-armv8) export GOARCH="arm64" ;;
-aarch64) export GOARCH="arm64" ;;
-mips) export GOARCH="mips" ;;
-mips64) export GOARCH="mips64" ;;
-mips64el) export GOARCH="mips64le" ;;
-mipsel) export GOARCH="mipsle" ;;
-*) return 1 ;;
- esac
-
+makedepends=('git' 'go' 'gcc' 'glade' 'xorg-server-xvfb' 'libxinerama' 'libxcursor' 'libxrandr' 'libglvnd' 'libglade' 'mesa' 'libxi' 'cairo' 'perl' 'pango' 'goyacc' 'musl' 'kernel-headers-musl')
+source=("${url}/archive/v${pkgver}.tar.gz")
+sha256sums=('1deb342041cc365c92617e8cf6c24801ff3011f2df90a988b4541b5bc83be4fe')
+#validpgpkeys=('DE08F924EEE93832DABC642CA8DC761B1C0C0CFC' # Moses Narrow <moe_narrow@use.startmail.com>
+#'98F934F04F9334B81DFA3398913BBD5206B19620') #iketheadore skycoin <luxairlake@protonmail.com>
prepare() {
#verify PKGBUILD signature
- gpg --verify ${srcdir}/PKGBUILD.sig ../PKGBUILD
+ #gpg --verify ${srcdir}/PKGBUILD.sig ../PKGBUILD
# https://wiki.archlinux.org/index.php/Go_package_guidelines
- mkdir -p ${srcdir}/go/src/${pkggopath//${pkgname1}/} "${srcdir}"/go/bin
- ln -rTsf ${srcdir}/${pkgname1}-${pkgver} ${srcdir}/go/src/${pkggopath}
- cd ${srcdir}/go/src/${pkggopath}/
- #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
-}
+ mkdir -p ${srcdir}/go/src/${_pkggopath1//${_pkgname}/} ${srcdir}/go/bin
+ ln -rTsf ${srcdir}/${_pkgname}-${pkgver} ${srcdir}/go/src/${_pkggopath1}
+ #cd ${srcdir}/go/src/${_pkggopath}/
+ }
build() {
+ set -x
export GOPATH=${srcdir}/go
export GOBIN=${GOPATH}/bin
- export PATH=${GOPATH}/bin:${PATH}
- # cp -b Makefile ${srcdir}/go/src/${pkggopath}/Makefile
- cd ${srcdir}/go/src/${pkggopath}
- make install-gfx-deps
- make build-full
-
- cmddir=${srcdir}/go/src/github.com/${githuborg}/${pkgname1}/cmd
- #using go build for determinism
- cd ${cmddir}/newcoin
- msg2 'building cx-newcoin binary'
- go build -trimpath -ldflags '-extldflags ${LDFLAGS}' -ldflags=-buildid= -o $GOBIN/ .
- #binary transparency
+ export CC=musl-gcc
+ # cp -b Makefile ${srcdir}/go/src/${_pkggopath}/Makefile
+ cd ${srcdir}/go/src/${_pkggopath1}
+ #make build-full
+ #go get -u github.com/SkycoinProject/nex ##added as makedep
+ #go get -u modernc.org/goyacc ##added as makedep
+ goyacc -o cxgo/cxgo0/cxgo0.go cxgo/cxgo0/cxgo0.y
+ goyacc -o cxgo/parser/cxgo.go cxgo/parser/cxgo.y
+ _cmddir=${srcdir}/go/src/${_pkggopath1}/cmd
+ #static compilation
+ _msg2 'building cx binary'
+ cd ${srcdir}/go/src/${_pkggopath1}/
+ go build -tags="base cxfx" -trimpath --ldflags '-linkmode external -extldflags "-static" -buildid=' -i -o $GOBIN/ cxgo/.
+ cd ${srcdir}/go/src/${_pkggopath1}/cmd/newcoin
+ _msg2 'building cx-newcoin binary'
+ go build -trimpath --ldflags '-linkmode external -extldflags "-static" -buildid=' -o $GOBIN/ . #binary transparency
cd $GOBIN
msg2 'binary sha256sums'
sha256sum $(ls)
@@ -79,14 +56,20 @@ package() {
options=(!strip staticlibs)
#make dirs
mkdir -p ${pkgdir}/usr/bin
- mkdir -p ${pkgdir}/usr/lib/${projectname}/go/bin
- mkdir -p ${pkgdir}/usr/lib/${projectname}/go/src/github.com/${projectname}/
- mkdir -p ${pkgdir}/usr/lib/${projectname}/${pkgname1}/
+# mkdir -p ${pkgdir}/opt/${_projectname}/go/bin
+# mkdir -p ${pkgdir}/opt/${_projectname}/go/src/github.com/${_projectname}/
+ mkdir -p ${pkgdir}/opt/${_pkgname}/
#^MAKE DEPENDANCIES ARE IN GOBIN; GET ONLY CX & NEWCOIN
- install -Dm755 ${srcdir}/go/bin/newcoin ${pkgdir}/usr/lib/${projectname}/go/bin/newcoin
- ln -rTsf ${pkgdir}/usr/lib/${projectname}/go/bin/newcoin ${pkgdir}/usr/bin/newcoin
+ install -Dm755 ${srcdir}/go/bin/newcoin ${pkgdir}/opt/${_pkgname}/bin/newcoin
+ ln -rTsf ${pkgdir}/opt/${_pkgname}/bin/newcoin ${pkgdir}/usr/bin/newcoin
chmod 755 ${pkgdir}/usr/bin/newcoin
- install -Dm755 ${srcdir}/go/bin/${pkgname1} ${pkgdir}/usr/lib/${projectname}/go/bin/${pkgname1}
- ln -rTsf ${pkgdir}/usr/lib/${projectname}/go/bin/${pkgname1} ${pkgdir}/usr/bin/${pkgname1}
- chmod 755 ${pkgdir}/usr/bin/${pkgname1}
+ install -Dm755 ${srcdir}/go/bin/${_pkgname} ${pkgdir}/opt/${_pkgname}/bin/${_pkgname}
+ ln -rTsf ${pkgdir}/opt/${_pkgname}/bin/${_pkgname} ${pkgdir}/usr/bin/${_pkgname}
+ chmod 755 ${pkgdir}/usr/bin/${_pkgname}
+}
+
+_msg2() {
+(( QUIET )) && return
+local mesg=$1; shift
+printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@"
}
diff --git a/PKGBUILD.sig b/PKGBUILD.sig
deleted file mode 100644
index f98f0343b77..00000000000
--- a/PKGBUILD.sig
+++ /dev/null
Binary files differ