diff options
author | Moses Narrow | 2021-03-19 17:49:12 -0500 |
---|---|---|
committer | Moses Narrow | 2021-03-19 17:49:12 -0500 |
commit | 08f8c32717dcc71e4eed2a4cce55e41d79103548 (patch) | |
tree | 1cc492a3700f40997747b2a0b8db5142d8766087 /PKGBUILD | |
parent | 5d328e424702ab2ecd715c5163ed4bb6c072c0bc (diff) | |
download | aur-08f8c32717dcc71e4eed2a4cce55e41d79103548.tar.gz |
update to 0.4.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 24 insertions, 18 deletions
@@ -6,10 +6,10 @@ _pkgname=${pkgname} _githuborg=${_projectname} pkgdesc="Skywire Mainnet Node implementation. Skycoin.com" _pkggopath="github.com/${_githuborg}/${_pkgname}" -pkgver=0.3.0 +pkgver=0.4.0 #manually verioning because git describe isnt reflecting the version correctly #pkgver='autogenerated' -pkgrel=12 -#pkgrel=12 +pkgrel=1 +#pkgrel=1 arch=( 'i686' 'x86_64' 'aarch64' 'armv8' 'armv7' 'armv7l' 'armv7h' 'armv6h' 'armhf' 'armel' 'arm' ) url="https://${_pkggopath}" license=() @@ -41,7 +41,7 @@ sha256sums=('SKIP' #local _commit=$(git rev-parse --short HEAD) #echo "${_version}_${_date}.${_count}_${_commit}_${BRANCH:-develop}" #} - +#BUILD_OPTS= prepare() { #verify PKGBUILD signature # gpg --verify ${srcdir}/PKGBUILD.sig ${srcdir}/PKGBUILD #disabled the signature check @@ -50,9 +50,11 @@ prepare() { mkdir -p ${srcdir}/go/src/github.com/${_githuborg}/ ${srcdir}/go/bin ${srcdir}/go/apps ln -rTsf ${srcdir}/${_pkgname} ${srcdir}/go/src/${_pkggopath} cd ${srcdir}/go/src/${_pkggopath}/ -#avoid develop branch build failures on ARM -#[[ $CARCH == "x86_64" ]] && git checkout develop || git checkout d156980280fdb2ddfc8765ff77cdd55c0b7e9d9c -git checkout d156980280fdb2ddfc8765ff77cdd55c0b7e9d9c +#echo " +#version: +# echo "${BUILD_OPTS}" +#" >> Makefile +#BUILD_OPTS=$(make version) } build() { @@ -60,10 +62,11 @@ export GOPATH=${srcdir}/go export GOBIN=${GOPATH}/bin export _GOAPPS=${GOPATH}/apps export GOOS=linux -export CGO_ENABLED=1 +export CGO_ENABLED=1 #default anyways #use musl-gcc for static compilation export CC=musl-gcc +#build the golang webserver binary for hosting local package repo _msg2 "building skycache binary" cd ${srcdir}/${_scripts}/skycache go build -trimpath --ldflags '-s -w -linkmode external -extldflags "-static" -buildid=' -o $GOBIN/ skycache.go @@ -71,8 +74,8 @@ go build -trimpath --ldflags '-s -w -linkmode external -extldflags "-static" -bu #create the skywire binaries cd ${srcdir}/go/src/${_pkggopath} _cmddir=${srcdir}/go/src/${_pkggopath}/cmd -#static compilation ; need to re-evaluate build determinism - +#static compilation with 'musl' avoids glibc runtime deps +#which cause binary to fail if correct glibc / libc6 is not found on the system _buildbins skychat $_GOAPPS apps/ _buildbins skysocks $_GOAPPS apps/ _buildbins skysocks-client $_GOAPPS apps/ @@ -81,9 +84,6 @@ _buildbins vpn-server $_GOAPPS apps/ _buildbins skywire-visor $GOBIN _buildbins skywire-cli $GOBIN _buildbins setup-node $GOBIN -#_msg2 'building hypervisor binary' #hypervisor has been combined with the visor -#cd ${_cmddir}/hypervisor -#go build -trimpath -ldflags '-extldflags ${LDFLAGS}' -ldflags=-buildid= -o $GOBIN/ . #binary transparency cd $GOBIN _msg2 'binary sha256sums' @@ -101,12 +101,13 @@ _binname=$1 _msg2 "building ${_binname} binary" if [[ ! -f ${_GOHERE}/${_binname} ]] ; then cd ${_cmddir}/${_binpath}${_binname} - go build -trimpath --ldflags '-s -w -linkmode external -extldflags "-static" -buildid=' -o $_GOHERE/ . + go build -trimpath --ldflags="" --ldflags '-s -w -linkmode external -extldflags "-static" -buildid=' -o $_GOHERE/ . fi } package() { + _msg2 'creating dirs' #create directory trees or the visor might make them with weird permissions _skydir="opt/skywire" _skyapps="${_skydir}/apps" @@ -141,17 +142,17 @@ _skywirescripts=$( ls ${srcdir}/${_scripts}/${_pkgname} ) for i in ${_skywirescripts}; do _install2 ${srcdir}/${_scripts}/${_pkgname}/${i} ${_skyscripts} done - +#the main scripts get installed above, the following are satellite-package or haveto do with the tls config - WIP install -Dm755 ${srcdir}/${_scripts}/skywire-save/${_pkgname}-save.PKGBUILD ${pkgdir}/${_skydir}/${_pkgname}-save/PKGBUILD install -Dm755 ${srcdir}/${_scripts}/skywire-save/${_pkgname}-save.install ${pkgdir}/${_skydir}/${_pkgname}-save/${_pkgname}-save.install install -Dm644 ${srcdir}/${_scripts}/skywire-save/${_pkgname}-save.txt ${pkgdir}/${_skydir}/${_pkgname}-save/${_pkgname}-save.install -#install the satellite PKGBUILD for distributing the hypervisor key and it's script +#install the satellite PKGBUILD for distributing the hypervisor key and it's script - works with skycache to share the packages install -Dm755 ${srcdir}/${_scripts}/hypervisorkey/hypervisorkey.PKGBUILD ${pkgdir}/${_skydir}/hypervisorkey/PKGBUILD install -Dm755 ${srcdir}/${_scripts}/hypervisorkey/hypervisorkey.install ${pkgdir}/${_skydir}/hypervisorkey/hypervisorkey.install install -Dm755 ${srcdir}/${_scripts}/hypervisorkey/hypervisorkey-autoconfig.sh ${pkgdir}/${_skydir}/hypervisorkey/hypervisorkey-autoconfig.sh -#rename visor to skywire +#rename visor to skywire - matche the skycoin / skycoin-cli of the skycoin wallet [[ -f ${pkgdir}/usr/bin/${_pkgname}-visor ]] && mv ${pkgdir}/usr/bin/${_pkgname}-visor ${pkgdir}/usr/bin/${_pkgname} #install the system.d services (from the source) @@ -178,7 +179,6 @@ _binname="${_binname%%.*}" install -Dm755 ${1} ${pkgdir}/${2}/${_binname} ln -rTsf ${pkgdir}/${2}/${_binname} ${pkgdir}/usr/bin/${_binname} chmod +x ${pkgdir}/usr/bin/${_binname} - } _msg2() { @@ -186,3 +186,9 @@ _msg2() { local mesg=$1; shift printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" } + +_msg3() { +(( QUIET )) && return +local mesg=$1; shift +printf "${BLUE} -->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" +} |