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
|
pkgbase = yay
|
||||||
pkgdesc = Yet another yogurt. Pacman wrapper and AUR helper written in go.
|
pkgdesc = Yet another yogurt. Pacman wrapper and AUR helper written in go.
|
||||||
pkgver = 1.114
|
pkgver = 2.152
|
||||||
pkgrel = 2
|
pkgrel = 1
|
||||||
url = https://github.com/Jguer/yay
|
url = https://github.com/Jguer/yay
|
||||||
arch = i686
|
arch = i686
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
arch = arm
|
arch = armv7h
|
||||||
|
arch = aarch64
|
||||||
license = GPL
|
license = GPL
|
||||||
makedepends = go
|
|
||||||
makedepends = git
|
makedepends = git
|
||||||
|
makedepends = go
|
||||||
depends = sudo
|
depends = sudo
|
||||||
conflicts = yay-bin
|
conflicts = yay-bin
|
||||||
source = yay::git://github.com/jguer/yay.git#branch=master
|
options = !strip
|
||||||
md5sums = SKIP
|
options = !emptydirs
|
||||||
|
source = https://github.com/Jguer/yay/archive/v2.152.tar.gz
|
||||||
|
md5sums = e95e870ddd2232953967eb56ee4097d1
|
||||||
|
|
||||||
pkgname = yay
|
pkgname = yay
|
||||||
|
|
||||||
|
76
PKGBUILD
76
PKGBUILD
@ -1,78 +1,48 @@
|
|||||||
# Maintainer: Jguer <joaogg3@gmail.com>
|
# Maintainer: Jguer <joaogg3@gmail.com>
|
||||||
pkgname=yay
|
pkgname=yay
|
||||||
pkgver=1.114
|
pkgver=2.152
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="Yet another yogurt. Pacman wrapper and AUR helper written in go."
|
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"
|
url="https://github.com/Jguer/yay"
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
|
options=('!strip' '!emptydirs')
|
||||||
depends=(
|
depends=(
|
||||||
'sudo'
|
'sudo'
|
||||||
)
|
)
|
||||||
makedepends=(
|
makedepends=(
|
||||||
'go'
|
|
||||||
'git'
|
'git'
|
||||||
|
'go'
|
||||||
)
|
)
|
||||||
conflicts=('yay-bin')
|
conflicts=('yay-bin')
|
||||||
source=("yay::git://github.com/jguer/yay.git#branch=${BRANCH:-master}")
|
source=("https://github.com/Jguer/yay/archive/v${pkgver}.tar.gz")
|
||||||
md5sums=('SKIP')
|
md5sums=('e95e870ddd2232953967eb56ee4097d1')
|
||||||
|
|
||||||
pkgver() {
|
|
||||||
if [[ "$PKGVER" ]]; then
|
|
||||||
echo "$PKGVER"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$srcdir/$pkgname"
|
|
||||||
local count=$(git rev-list --count HEAD)
|
|
||||||
echo "1.${count}"
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$pkgname"
|
export GOPATH="${srcdir}/.go"
|
||||||
|
export GOBIN="$GOPATH/bin"
|
||||||
if [ -L "$srcdir/$pkgname" ]; then
|
go get github.com/jguer/go-alpm github.com/mikkeloscar/aur github.com/mikkeloscar/gopkgbuild
|
||||||
rm "$srcdir/$pkgname" -rf
|
ln -sf "$srcdir/$pkgname-$pkgver" "$GOPATH/src/github.com/jguer/yay"
|
||||||
cp -r "$srcdir/.go/src/$pkgname/" "$srcdir/$pkgname"
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
fi
|
go build -v -o ${pkgname} -ldflags "-s -w -X main.version=${pkgver}"
|
||||||
|
|
||||||
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"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
#install executable
|
_output="${srcdir}/$pkgname-$pkgver"
|
||||||
install -DT "${srcdir}/.go/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
install -Dm755 "${_output}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||||
cd "${srcdir}/.go/src/github.com/jguer/${pkgname}" || exit
|
|
||||||
|
|
||||||
# Install GLP v3
|
# 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 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 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 bash completion
|
# 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