upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / passff-host / trunk / PKGBUILD
blob03c0a419853f38596012744c67b48087a2418974
1 # Maintainer: Daurnimator <daurnimator@archlinux.org>
2 # Contributor: Jaron Kent-Dobias <jaron@kent-dobias.com>
3 # Contributor: arcnmx <arcnmx@gmail.com>
5 pkgname=passff-host
6 pkgver=1.2.3
7 pkgrel=1
8 epoch=1
9 pkgdesc="PassFF native messaging host application for Firefox, Chromium, Chrome, Vivaldi"
10 url="https://github.com/passff/passff-host"
11 license=(GPL2)
12 depends=('pass' 'python')
13 optdepends=('pass-otp')
14 arch=('any')
15 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/passff/passff-host/archive/${pkgver}.tar.gz")
16 sha256sums=('891c75c87db4c982d05b0beb87061ba8e89f6abe27c74c5c6cb43f7a44034aba')
18 build() {
19   cd "${pkgname}-${pkgver}"
21   sed -i -e "s/_VERSIONHOLDER_/${pkgver}/g" 'src/passff.py'
22   sed -i -e 's/PLACEHOLDER/\/usr\/share\/passff\/passff.py/' 'src/passff.json'
25 package() {
26   cd "${pkgname}-${pkgver}"
28   install -Dm 755 "src/passff.py" "${pkgdir}/usr/share/passff/passff.py"
29   python -O -m compileall "${pkgdir}/usr/share/passff/passff.py"
31   install -Dm 644 "src/passff.json" "${pkgdir}/usr/share/passff/passff.json"
32   for d in \
33     '/etc/chromium/native-messaging-hosts' \
34     '/etc/opt/chrome/native-messaging-hosts' \
35     '/usr/lib/mozilla/native-messaging-hosts' \
36     '/etc/vivaldi/native-messaging-hosts' \
37   ; do
38     mkdir -p "${pkgdir}/${d}/"
39     ln -s '/usr/share/passff/passff.json' "${pkgdir}/${d}/passff.json"
40   done