summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordr460nf1r32021-04-08 11:52:31 +0200
committerdr460nf1r32021-04-08 11:52:31 +0200
commit865d282243a5204751305ba651f27089f8616876 (patch)
tree6e1d42230f583c0931cd966c002a3952be2e33a4
downloadaur-865d282243a5204751305ba651f27089f8616876.tar.gz
Initial upload
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD35
-rw-r--r--whoogle.install13
-rw-r--r--whoogle.service17
4 files changed, 84 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cedeb1513e7e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = whoogle
+ pkgdesc = A self-hosted, ad-free, privacy-respecting metasearch engine
+ pkgver = 0.4.0
+ pkgrel = 1
+ url = https://github.com/benbusby/whoogle-search
+ install = whoogle.install
+ arch = x86_64
+ arch = aarch64
+ license = MIT
+ makedepends = python
+ makedepends = python-pip
+ depends = python
+ conflicts = whoogle-git
+ source = whoogle-0.4.0.tar.gz::https://github.com/benbusby/whoogle-search/archive/refs/tags/v0.4.0.tar.gz
+ source = whoogle.service
+ sha256sums = 2122b14246d89b7d389fd56921a427ece816d1eb53bd2cef1475658524f2b30b
+ sha256sums = b8474f3024d310b67454b8b59977fd26b66dba3930f31604058b773e13905e49
+
+pkgname = whoogle
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..89b0b1f0b808
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: dr460nf1r3 <dr460nf1r3@garudalinux.org>
+
+pkgname=whoogle
+pkgver=0.4.0
+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)
+conflicts=(whoogle-git)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/benbusby/whoogle-search/archive/refs/tags/v$pkgver.tar.gz"
+ whoogle.service)
+sha256sums=('2122b14246d89b7d389fd56921a427ece816d1eb53bd2cef1475658524f2b30b'
+ 'b8474f3024d310b67454b8b59977fd26b66dba3930f31604058b773e13905e49')
+install=whoogle.install
+
+build() {
+ # Following official instructions
+ cd $pkgname-search-$pkgver
+ python3 -m venv venv
+ source venv/bin/activate
+ pip install -r requirements.txt
+
+ # Cleanup unsed
+ rm -r docs test .dockerignore .gitignore .replit .travis.yml docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt setup.py
+}
+
+package() {
+ install -dm0755 "$pkgdir/usr/lib/systemd/system/"
+ install -m0644 "$srcdir/whoogle.service" "$pkgdir/usr/lib/systemd/system/whoogle.service"
+ install -dm0755 "$pkgdir/opt/whoogle-search"
+ cp -r "$srcdir/$pkgname-search-$pkgver/" "$pkgdir/opt/"
+}
diff --git a/whoogle.install b/whoogle.install
new file mode 100644
index 000000000000..e590a4bdb628
--- /dev/null
+++ b/whoogle.install
@@ -0,0 +1,13 @@
+post_install() {
+ systemctl enable --now whoogle
+ echo ""
+ echo "Enabled the Whoogle systemd service."
+ echo "Visit localhost:5000 to start searching!"
+ echo ""
+}
+
+post_upgrade() {
+ systemctl daemon-reload
+ systemctl restart whoogle
+ echo "Restarted Whoogle systemd service."
+}
diff --git a/whoogle.service b/whoogle.service
new file mode 100644
index 000000000000..64edbfa6c6b3
--- /dev/null
+++ b/whoogle.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Whoogle
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+User=root
+WorkingDirectory=/opt/whoogle-search
+ExecStart=/opt/whoogle-search/venv/bin/python3 -um app --host 0.0.0.0 --port 5000
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+RestartSec=3
+SyslogIdentifier=whoogle
+
+[Install]
+WantedBy=multi-user.target