summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd54e978e04cfd906dfc85d39f85e82a2e289d8f (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: txtsd <aur.archlinux@ihavea.quest>

pkgname=flaresolverr
_pkgname=FlareSolverr
pkgver=3.3.21
pkgrel=2
pkgdesc='A proxy server to bypass Cloudflare protection'
arch=(any)
url='https://github.com/FlareSolverr/FlareSolverr'
license=('MIT')
depends=(
  chromium
  python
  python-bottle
  python-certifi
  python-func-timeout
  python-pefile
  python-prometheus_client
  python-requests
  python-selenium
  python-waitress
  python-websockets
  python-xvfbwrapper
)
install=flaresolverr.install
source=(
  "${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz"
  flaresolverr.service
  flaresolverr.sysusers
  flaresolverr.tmpfiles
  flaresolverr.install
)
sha256sums=('79d24e60eb95525cda77e3b80b57f09aba471d24ae1234647f51a1f372ac79fc'
            '8f71d609bf31ec88930bf582e1fda0d894bbb4fe6b2049fdf6e98703830cc15c'
            '62f114d4e559cf9dae22bfd90759eff697e42da5f700a52988e70e78f3048ae2'
            '4a61a6d9db1a9f4ec0812d86ef524a7f575a45f272404f0ebfc79376628feeb2'
            '35881784db47d88cf6a3ee33e831f3655183c248282a348595bef013c7695f54')

prepare() {
  cd "${_pkgname}-${pkgver}"

  # Checks one directory above src/
  # We don't want that
  sed -i 's/os.pardir, //' src/utils.py
}

package() {
  cd "${_pkgname}-${pkgver}"

  install -dm755 "${pkgdir}/opt/${pkgname}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  rm LICENSE

  cp -dr "${srcdir}/${_pkgname}-${pkgver}/src/"* "${pkgdir}/opt/${pkgname}"
  cp package.json "${pkgdir}/opt/${pkgname}"

  install -Dm644 "${srcdir}/flaresolverr.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
  install -Dm644 "${srcdir}/flaresolverr.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
  install -Dm644 "${srcdir}/flaresolverr.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
}