summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas18182021-03-03 20:15:27 +0100
committerLukas18182021-03-03 20:15:27 +0100
commit092b173533ae9634baaf1b30533fde9b7f814097 (patch)
tree8e353c8b0ad0033a19f663ab51b7a2d6829625b4
parentc52c409a46bdca330846d1c7bf6388d83efc535b (diff)
downloadaur-092b173533ae9634baaf1b30533fde9b7f814097.tar.gz
set browser dependency automatically
meta packages were removed from AUR
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD26
2 files changed, 29 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6e511973d2c..58487c71d55 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
pkgbase = nfauthenticationkey
pkgdesc = create a Netflix authentican Key, which can be used for the Neflix Kodi addon or somewhere else.
pkgver = 1.1.3
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CastagnaIT/NFAuthenticationKey/tree/linux
arch = any
license = GPL3
makedepends = sed
- depends = nfauthenticationkey-browser
depends = python
depends = python-pycryptodomex
depends = python-websocket-client
+ depends = chromium
+ optdepends = chromium
+ optdepends = google-chrome
+ optdepends = brave
source = NFAuthenticationKey-Linux-1.1.3.tar.gz::https://github.com/CastagnaIT/NFAuthenticationKey/archive/eef806798f0b211dd87cdb1f949956801a812eb7.tar.gz
sha512sums = 639203cf05bb2c71b7ad7aa21e129b01b89ac91578aa59ad2aa31a8601b07ceb82854201207b2cc501e4a0c16ee188b61f2e1b507e63b72ca55f75ccd991730d
diff --git a/PKGBUILD b/PKGBUILD
index 9385bca970d..e5a369021b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,16 +3,38 @@
pkgname=nfauthenticationkey
_commit=eef806798f0b211dd87cdb1f949956801a812eb7
pkgver=1.1.3
-pkgrel=1
+pkgrel=2
arch=('any')
pkgdesc="create a Netflix authentican Key, which can be used for the Neflix Kodi addon or somewhere else."
url="https://github.com/CastagnaIT/NFAuthenticationKey/tree/linux"
license=('GPL3')
makedepends=('sed')
-depends=('nfauthenticationkey-browser' 'python' 'python-pycryptodomex' 'python-websocket-client')
+optdepends=('chromium' 'google-chrome' 'brave')
+depends=('python' 'python-pycryptodomex' 'python-websocket-client')
source=("NFAuthenticationKey-Linux-$pkgver.tar.gz::https://github.com/CastagnaIT/NFAuthenticationKey/archive/$_commit.tar.gz")
sha512sums=('639203cf05bb2c71b7ad7aa21e129b01b89ac91578aa59ad2aa31a8601b07ceb82854201207b2cc501e4a0c16ee188b61f2e1b507e63b72ca55f75ccd991730d')
+_check_browser()
+{
+ pacman -qQi $1 > /dev/null
+ test $? -eq 0 || return 1
+ echo "found $1"
+ echo "use $1 as browser dependency"
+ depends+=("$1")
+}
+
+_set_browser_dependency()
+{
+ echo "set browser dependency based on installed browsers"
+ _check_browser chromium && return
+ _check_browser brave && return
+ _check_browser google-chrome && return
+ echo "no supported browser found"
+ echo "use chromium as browser dependency"
+ depends+=('chromium')
+}
+
+_set_browser_dependency 1>&2
prepare()
{