diff options
author | Michael | 2022-09-12 01:29:09 +0200 |
---|---|---|
committer | Michael | 2022-09-12 01:29:09 +0200 |
commit | 3858ac8664bd036a882d356134e5b5813373237e (patch) | |
tree | 0342d728f8e25fb4223524a3965fe69014db3c79 | |
parent | 0549cf9368d27944716a722ef69c6b79090aec6e (diff) | |
download | aur-3858ac8664bd036a882d356134e5b5813373237e.tar.gz |
update aur to fetch latest main branch again
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | egpu-switcher-git.install | 23 |
4 files changed, 51 insertions, 12 deletions
@@ -1,6 +1,6 @@ pkgbase = egpu-switcher-git pkgdesc = Distribution agnostic script that works with NVIDIA and AMD cards. - pkgver = 0.17.0.r2.ge9b9479 + pkgver = v0.18.0.rc.5.r0.g04b64c8 pkgrel = 1 epoch = 0 url = https://github.com/hertg/egpu-switcher @@ -8,11 +8,10 @@ pkgbase = egpu-switcher-git arch = any license = GPL makedepends = git - depends = pciutils>=3.3.0 - depends = bash>=4.0 + makedepends = go provides = egpu-switcher conflicts = egpu-switcher - source = egpu-switcher-git::git+https://github.com/hertg/egpu-switcher.git#branch=legacy + source = egpu-switcher-git::git+https://github.com/hertg/egpu-switcher.git md5sums = SKIP pkgname = egpu-switcher-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a0ddac572921 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/src +/pkg +/egpu-switcher-git +/egpu-switcher-git-* @@ -1,28 +1,43 @@ # Maintainer: hertg <aur@her.tg> _pkgname=egpu-switcher pkgname=$_pkgname-git -pkgver=0.17.0.r2.ge9b9479 +pkgver=v0.18.0.rc.5.r0.g04b64c8 pkgrel=1 epoch=0 pkgdesc="Distribution agnostic script that works with NVIDIA and AMD cards." arch=('any') url="https://github.com/hertg/egpu-switcher" license=('GPL') -depends=('pciutils>=3.3.0' 'bash>=4.0') -makedepends=('git') +depends=() +makedepends=('git' 'go') provides=($_pkgname) conflicts=($_pkgname) install=${pkgname}.install -source=("${pkgname}::git+https://github.com/hertg/egpu-switcher.git#branch=legacy") +source=("${pkgname}::git+https://github.com/hertg/egpu-switcher.git") md5sums=('SKIP') pkgver() { - cd "$srcdir/${pkgname}" + cd "$srcdir/$pkgname" printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')" } +# check() { +# cd "$srcdir/$pkgname" +# make test +# } + +build() { + cd "$srcdir/$pkgname" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export ORIGIN="aur" + make build -s +} + package() { - cd "$srcdir/${pkgname}" - make DESTDIR="$pkgdir/" install + cd "$srcdir/$pkgname" + make DESTDIR="$pkgdir/" install -s } diff --git a/egpu-switcher-git.install b/egpu-switcher-git.install index 86575ca1bd96..bcce57fd1307 100644 --- a/egpu-switcher-git.install +++ b/egpu-switcher-git.install @@ -1,3 +1,24 @@ pre_remove() { - egpu-switcher cleanup + egpu-switcher disable +} + +post_install() { + egpu-switcher enable --no-prompt +} + +pre_upgrade() { + egpu-switcher disable +} + +post_upgrade() { + # TODO remove this warning + major=$(cut -d'.' -f1 <<< $1 | cut -c2-) + minor=$(cut -d'.' -f2 <<< $1) + if [ $major -eq '0' -a $minor -lt 18 ]; then + echo "========" + echo "BREAKING UPDATE: You seem to update from the legacy version, please run the setup again" + echo "========" + fi + + egpu-switcher enable --no-prompt } |