blob: 3ccb3a4abedef667598c02ff07e71115c94c8e3c (
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
|
# Maintainer: dr460nf1r3 <dr460nf1r3 at garudalinux dot org>
pkgname=whoogle
pkgver=0.9.1
pkgrel=1
pkgdesc='A self-hosted, ad-free, privacy-respecting metasearch engine'
arch=(x86_64 aarch64)
url="https://github.com/benbusby/whoogle-search"
license=(MIT)
depends=(python)
makedepends=(python python-pip)
optdepends=('tor: use the TOR network to perform searches')
conflicts=($pkgname-git)
backup=('etc/default/whoogle')
source=("$pkgname-$pkgver.tar.gz::https://github.com/benbusby/whoogle-search/archive/refs/tags/v$pkgver.tar.gz"
$pkgname
$pkgname.conf
$pkgname.service)
sha256sums=('a49ac9faeed64535bfc41d7021428a1eeddf26bd82c848abf2c533fe61417140'
'e30ff5ecef199ce2a37b097709461c51ca07bdbbcc4609db74203834b62c60b1'
'51cda92f3ad2166eb2cb63ff80561f48b39688a57b66291d2eee5e1c7fcd8ee3'
'ab6256f3fdaac3ba58ddbb39bb5c24bde53312f0584ae4ed4ae74bc7752a07f4')
install=$pkgname.install
prepare() {
mv $pkgname-search-$pkgver $pkgname-search
}
build() {
# Following official instructions
cd $pkgname-search
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Cleanup unsed files
_cleanup=(docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt)
for i in "${_cleanup[@]}"; do
rm -r "$i"
done
}
package() {
install -m0644 -D "$srcdir/whoogle" "$pkgdir/etc/default/whoogle"
install -m0644 -D "$srcdir/whoogle.conf" "$pkgdir/usr/lib/sysusers.d/whoogle.conf"
install -m0644 -D "$srcdir/whoogle.service" "$pkgdir/usr/lib/systemd/system/whoogle.service"
install -Dm0644 "$srcdir/$pkgname-search/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -dm0755 "$pkgdir/opt/whoogle-search"
cp -r "$srcdir/whoogle-search/" "$pkgdir/opt/"
}
|