summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 90a650970cb3e57ba706ff325906dd66c289423a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Maintainer: Antonin Dach <dach@protonmail.com>
pkgname=librewolf-firefox-shim
pkgver=123.0
pkgrel=1
pkgdesc="A symlink for using librewolf as a firefox"
arch=('any')
url="https://librewolf-community.gitlab.io/"
license=('MIT')
depends=('librewolf')
provides=(
  "firefox=${pkgver}"
)
conflicts=(
  "firefox"
)

pkgver() {
  if [[ $CI == true ]]; then
    # Assuming build runner is without extra and has online access
    git ls-remote https://codeberg.org/librewolf/source | grep -oP '\d{3}\.\d+\.\d+' | sort -r | head -n 1
  else
    pacman -Qi librewolf | grep -E '^Version[[:space:]]*:' | head -n 1 | awk -F ':' '{print $2}' | sed -E 's|-.*||' | tr -d '[[:space:]]'
  fi
}

package() {
  install -d "$pkgdir"/usr/bin
  ln -s /usr/bin/librewolf "$pkgdir"/usr/bin/firefox
}