summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0a02352b32e17eaf59213b4ac28bd9660de2eedf (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
# Maintainer: pkg_maintainer <archlinuxpackagemaintainer@gmail.com>
pkgname=websurfx-git
pkgver=v1.0.0.r722.99ec846
pkgrel=1
epoch=
pkgdesc="An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
arch=('x86_64')
url="https://github.com/neon-mmd/websurfx"
license=('AGPL3')
groups=()
depends=(rustup cargo luajit)
makedepends=(git)
checkdepends=()
optdepends=('redis: A redis cache server for distributed caching')
provides=(websurfx-git)
conflicts=(websurfx-edge-git)
replaces=()
backup=()
options=()
install=${pkgname}.install
changelog=
source=("git+$url")
noextract=()
md5sums=('SKIP')
validpgpkeys=()

pkgver() {
    cd websurfx
    printf "v1.0.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
	cd websurfx
    git checkout stable
	cargo build -r
}

package() {
	cd websurfx
    mkdir -p ${pkgdir}/etc/xdg/websurfx/
    mkdir -p ${pkgdir}/opt/websurfx/
	cp -rf public/ ${pkgdir}/opt/websurfx/public/
	install -Dm755 target/release/websurfx "${pkgdir}/usr/bin/websurfx"
	install -Dm644 websurfx/config.lua "${pkgdir}/etc/xdg/websurfx/config.lua"
	install -Dm644 websurfx/allowlist.txt "${pkgdir}/etc/xdg/websurfx/allowlist.txt"
	install -Dm644 websurfx/blocklist.txt "${pkgdir}/etc/xdg/websurfx/blocklist.txt"
	install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}