I have found GDrive from https://github.com/prasmussen/gdrive very 
interesting and have found ArchLinux a=has gdrive and gdrive-git 
packages. So tried this PKGBUILD,

=====================================================================
$ cat /tmp/mingw-w64-gdrive-git/PKGBUILD
_realname=gdrive
pkgbase=mingw-w64-${_realname}-git
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
pkgver=r283.e14e24a
pkgrel=1
pkgdesc="Google Drive CLI Client"
arch=('x86_64' 'i686')
url="https://github.com/prasmussen/gdrive";
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-go")
options=('!strip' '!emptydirs')
#source=(https://github.com/prasmussen/${_realname}/archive/$pkgver.tar.gz)
source=("${_realname}"::git://github.com/prasmussen/gdrive.git)
sha256sums=('SKIP')

_gourl="github.com/prasmussen/gdrive"
_gobuild="build/src/${_gourl}"

pkgver() {
   cd "${_realname}"
   printf 'r%s.%s' "$(git rev-list --count HEAD)" \
          "$(git rev-parse --short HEAD)"
}

prepare() {
     mkdir -p "$(dirname ${_gobuild})"

     GOROOT="/mingw64/lib/go" GOPATH="${srcdir}/build" go get -u -d 
"${_gourl}"

     rsync --delete -a "${srcdir}/${_realname}/" "${_gobuild}/"
}

build() {
     GOROOT="/mingw64/lib/go" GOPATH="${srcdir}/build" \
           go install -ldflags="-s -w" "${_gourl}"
}

package() {
     cd build
     install -Dm755 bin/gdrive "${pkgdir}/mingw64/bin/gdrive"
}
=====================================================================

and it works,

$ pacman -U mingw-w64-*-gdrive-git-*.pkg.tar.xz

So, why you do not add it to MSYS2/MINGW distro? I am sure you can 
do/write a better PKGBUILD...


Angelo


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to