mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-11-23 17:12:18 -05:00
Add searx-py3
This commit is contained in:
parent
e98c3ee1eb
commit
620567183b
53
src/searx-py3/PKGBUILD
Normal file
53
src/searx-py3/PKGBUILD
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# Maintainer: Jake <ja.ke@posteo.de>
|
||||||
|
|
||||||
|
pkgname=searx-py3
|
||||||
|
pkgver=0.13.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A privacy-respecting, hackable metasearch engine (python3 based)"
|
||||||
|
arch=('any')
|
||||||
|
url="https://asciimoo.github.io/searx/"
|
||||||
|
license=('AGPL')
|
||||||
|
makedepends=('openssl')
|
||||||
|
depends=(
|
||||||
|
'python-certifi'
|
||||||
|
'python-flask'
|
||||||
|
'python-flask-babel'
|
||||||
|
'python-lxml'
|
||||||
|
'python-idna'
|
||||||
|
'python-pygments'
|
||||||
|
'python-pyopenssl'
|
||||||
|
'python-dateutil'
|
||||||
|
'python-yaml'
|
||||||
|
'python-requests'
|
||||||
|
'python-pysocks')
|
||||||
|
conflicts=('searx-git' 'searx')
|
||||||
|
backup=('etc/searx/settings.yml')
|
||||||
|
install=searx.install
|
||||||
|
source=("https://github.com/asciimoo/searx/archive/v$pkgver.zip"
|
||||||
|
'searx.install'
|
||||||
|
'searx.service')
|
||||||
|
sha512sums=('6c43d451d9ebc00f39ac5cdd74b95da420cb545f4f2dc4aa6ad03df4df6d1472fde909f535b0ea3bf2333b39329f203cd640f103b165392be7519bb35b6b3967'
|
||||||
|
'ad2d321f4d4c60f8aae9b577e9bbaa4558a927c198f849c610657e3994a780e6f402fe70ff36201075b1a82eddabd1b4a2c7e517a6ae5996b2b1c9ae8323c2c3'
|
||||||
|
'64ab805f7e0089d9b638c2972687ba60331304b3d63bfff138ce8b7903d999f40854067c384cafbc6c635afc335bd084b758cbb7c5cac397d97ed1f31e67ac6e')
|
||||||
|
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd $srcdir/searx-$pkgver
|
||||||
|
|
||||||
|
# Allow newer versions of the dependencies
|
||||||
|
sed -i "s|==|>=|g" requirements.txt
|
||||||
|
|
||||||
|
# Generate a random secret key
|
||||||
|
sed -i -e "s/ultrasecretkey\" # change this!/`openssl rand -hex 32`\"/g" searx/settings.yml
|
||||||
|
|
||||||
|
python3.6 setup.py install --root=$pkgdir --optimize=1
|
||||||
|
|
||||||
|
mv $pkgdir/usr/lib/python3.6/site-packages/{README.rst,searx/}
|
||||||
|
mv $pkgdir/usr/lib/python3.6/site-packages/{tests,searx/}
|
||||||
|
|
||||||
|
mkdir -p $pkgdir/etc/searx
|
||||||
|
mv $pkgdir/usr/lib/python3.6/site-packages/searx/settings.yml $pkgdir/etc/searx/
|
||||||
|
ln -s /etc/searx/settings.yml $pkgdir/usr/lib/python3.6/site-packages/searx/settings.yml
|
||||||
|
|
||||||
|
install -Dm0644 ../searx.service $pkgdir/usr/lib/systemd/system/searx.service
|
||||||
|
}
|
12
src/searx-py3/searx.install
Normal file
12
src/searx-py3/searx.install
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
post_install() {
|
||||||
|
getent passwd searx >/dev/null || useradd -rb /usr/lib/python3.6/site-packages -s /usr/bin/nologin searx
|
||||||
|
echo "Settings are at /etc/searx/settings.yml"
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
post_install
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
echo "You may want to remove searx user"
|
||||||
|
}
|
21
src/searx-py3/searx.service
Normal file
21
src/searx-py3/searx.service
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Searx server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=searx
|
||||||
|
Environment=SEARX_SETTINGS_PATH=/etc/searx/settings.yml
|
||||||
|
PrivateTmp=true
|
||||||
|
PrivateDevices=true
|
||||||
|
# Prevent accessing /home, /root and /run/user
|
||||||
|
ProtectHome=true
|
||||||
|
# Prevent writes to /usr, /boot, and /etc
|
||||||
|
ProtectSystem=full
|
||||||
|
ExecStart=/usr/bin/searx-run
|
||||||
|
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=1
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user