summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJguer2017-07-04 20:21:39 +0100
committerJguer2017-07-04 20:21:39 +0100
commitd1dc0521e87cfe4edd48ba41df8a3fa2f65c09d0 (patch)
treec5b5c9e653d9b4d742034de38e17052ff63b8db7
parent53b509838e7480edf89d88280fc5093f91107742 (diff)
downloadaur-d1dc0521e87cfe4edd48ba41df8a3fa2f65c09d0.tar.gz
Updated to v2
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD74
2 files changed, 31 insertions, 58 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dbb721dfda33..1ca26300272b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,21 @@
pkgbase = yay
pkgdesc = Yet another yogurt. Pacman wrapper and AUR helper written in go.
- pkgver = 1.114
- pkgrel = 2
+ pkgver = 2.152
+ pkgrel = 1
url = https://github.com/Jguer/yay
arch = i686
arch = x86_64
- arch = arm
+ arch = armv7h
+ arch = aarch64
license = GPL
- makedepends = go
makedepends = git
+ makedepends = go
depends = sudo
conflicts = yay-bin
- source = yay::git://github.com/jguer/yay.git#branch=master
- md5sums = SKIP
+ options = !strip
+ options = !emptydirs
+ source = https://github.com/Jguer/yay/archive/v2.152.tar.gz
+ md5sums = e95e870ddd2232953967eb56ee4097d1
pkgname = yay
diff --git a/PKGBUILD b/PKGBUILD
index 08f1b479b3f9..3a6df1b1b066 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,78 +1,48 @@
# Maintainer: Jguer <joaogg3@gmail.com>
pkgname=yay
-pkgver=1.114
-pkgrel=2
+pkgver=2.152
+pkgrel=1
pkgdesc="Yet another yogurt. Pacman wrapper and AUR helper written in go."
-arch=('i686' 'x86_64' 'arm')
+arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/Jguer/yay"
license=('GPL')
+options=('!strip' '!emptydirs')
depends=(
'sudo'
)
makedepends=(
- 'go'
'git'
+ 'go'
)
conflicts=('yay-bin')
-source=("yay::git://github.com/jguer/yay.git#branch=${BRANCH:-master}")
-md5sums=('SKIP')
-
-pkgver() {
- if [[ "$PKGVER" ]]; then
- echo "$PKGVER"
- return
- fi
-
- cd "$srcdir/$pkgname"
- local count=$(git rev-list --count HEAD)
- echo "1.${count}"
-}
+source=("https://github.com/Jguer/yay/archive/v${pkgver}.tar.gz")
+md5sums=('e95e870ddd2232953967eb56ee4097d1')
build() {
- cd "$srcdir/$pkgname"
-
- if [ -L "$srcdir/$pkgname" ]; then
- rm "$srcdir/$pkgname" -rf
- cp -r "$srcdir/.go/src/$pkgname/" "$srcdir/$pkgname"
- fi
-
- rm -rf "$srcdir/.go/src"
-
- mkdir -p "$srcdir/.go/src/github.com/jguer"
-
- export GOPATH="$srcdir/.go"
-
- cp -r "$srcdir/$pkgname" "$srcdir/.go/src/github.com/jguer/"
-
- cd "$srcdir/.go/src/github.com/jguer/$pkgname/cmd/yay"
- ln -sf "$srcdir/.go/src/github.com/jguer/$pkgname/cmd/yay" "$srcdir/$pkgname"
-
- git submodule update --init
-
- go get github.com/jguer/go-alpm
- go install -v \
- -gcflags "-trimpath $GOPATH/src" \
- -ldflags="-X main.version=$pkgver"
+ export GOPATH="${srcdir}/.go"
+ export GOBIN="$GOPATH/bin"
+ go get github.com/jguer/go-alpm github.com/mikkeloscar/aur github.com/mikkeloscar/gopkgbuild
+ ln -sf "$srcdir/$pkgname-$pkgver" "$GOPATH/src/github.com/jguer/yay"
+ cd "$srcdir/$pkgname-$pkgver"
+ go build -v -o ${pkgname} -ldflags "-s -w -X main.version=${pkgver}"
}
package() {
- #install executable
- install -DT "${srcdir}/.go/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
- cd "${srcdir}/.go/src/github.com/jguer/${pkgname}" || exit
+_output="${srcdir}/$pkgname-$pkgver"
+ install -Dm755 "${_output}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
# Install GLP v3
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${_output}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname/-bin}/LICENSE"
# Install manpage
- install -Dm644 yay.8 "${pkgdir}/usr/share/man/man8/yay.8"
+ install -Dm644 "${_output}/yay.8" "${pkgdir}/usr/share/man/man8/yay.8"
+
+ # Install bash completion
+ install -Dm644 "${_output}/bash-completion" "${pkgdir}/usr/share/bash-completion/completions/yay"
# Install zsh completion
- install -Dm644 "zsh-completion" "${pkgdir}/usr/share/zsh/site-functions/_yay"
+ install -Dm644 "${_output}/zsh-completion" "${pkgdir}/usr/share/zsh/site-functions/_yay"
# Install fish completion
- install -Dm644 "yay.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/yay.fish"
-
- # Install bash completion
- install -Dm644 "bash-completion" "${pkgdir}/usr/share/bash-completion/completions/yay"
-
+ install -Dm644 "${_output}/yay.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/yay.fish"
}