generated from archlinux/template
Updated to v2
This commit is contained in:
parent
53b509838e
commit
d1dc0521e8
15
.SRCINFO
15
.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
|
||||
|
||||
|
76
PKGBUILD
76
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 zsh completion
|
||||
install -Dm644 "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 -Dm644 "${_output}/yay.8" "${pkgdir}/usr/share/man/man8/yay.8"
|
||||
|
||||
# Install bash completion
|
||||
install -Dm644 "bash-completion" "${pkgdir}/usr/share/bash-completion/completions/yay"
|
||||
install -Dm644 "${_output}/bash-completion" "${pkgdir}/usr/share/bash-completion/completions/yay"
|
||||
|
||||
# Install zsh completion
|
||||
install -Dm644 "${_output}/zsh-completion" "${pkgdir}/usr/share/zsh/site-functions/_yay"
|
||||
|
||||
# Install fish completion
|
||||
install -Dm644 "${_output}/yay.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/yay.fish"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user