PKGBUILD 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Maintainer (aur): Jake <aur@ja-ke.tech>
  2. # parabola changes and rationale:
  3. # - Fixed license
  4. # - Moved random secret key generation in the .install: having that in
  5. # prepare() is not obtimal even for AUR, but it still works fine in many
  6. # cases because users run the package on the machine that compiles it, so
  7. # even if it ends up in the package, it's not a big issue, unless users share
  8. # the package as they are not aware of this issue in the first place.
  9. pkgname=searx
  10. pkgver=0.16.0
  11. pkgrel=2
  12. pkgrel+=par1
  13. pkgdesc="A privacy-respecting, hackable metasearch engine (python(3) based)"
  14. arch=('any')
  15. url="https://asciimoo.github.io/searx/"
  16. license=('AGPL3')
  17. makedepends=('openssl')
  18. install="${pkgname}.install"
  19. depends=(
  20. 'uwsgi'
  21. 'uwsgi-plugin-python'
  22. 'python-certifi'
  23. 'python-flask'
  24. 'python-flask-babel'
  25. 'python-lxml'
  26. 'python-idna'
  27. 'python-pygments'
  28. 'python-pyopenssl'
  29. 'python-dateutil'
  30. 'python-yaml'
  31. 'python-requests'
  32. 'python-pysocks')
  33. conflicts=('searx-git' )
  34. replaces=('searx-py3')
  35. backup=('etc/searx/settings.yml' 'etc/uwsgi/searx.ini')
  36. source=("https://github.com/asciimoo/searx/archive/v$pkgver.zip"
  37. 'searx.ini'
  38. 'searx.sysusers'
  39. '0003-Fix-deprecated-werkzeug-import.patch')
  40. sha512sums=('3ae4e4c295830e65eefbd39ed9885b60a42a4d4db4d87c179ace76cf43f8c75d49f1363f019bedd135c0597191612e16592cacd159ae97a42a25dcc2fee9d00b'
  41. '6e1e7771e747e2bcb9cbc3e5ec9735461b6d791c0c0412e06e7dd802c18625edd0916de32164bf780c18ef7b6a87f55ed1e917377b3adb2bf53c0344f34b49e8'
  42. '6856e26451fe053d37c2ce4b9d5f3b35891dd8ec702c5256c02d04415124c57705abc497f12943948a85621bb0238d26c2c1f3a7bf42404a6ff1487c7655909e'
  43. '064738f57b8bfbd937d56c592f7321140aab5f894e8ea457ae0d2d9407523f58471f4ba7424968f1d6db7fe51e4f8d360d1e997284eeb7b8528dbcf10f5f12dd')
  44. prepare() {
  45. cd "$srcdir/$pkgname-$pkgver"
  46. patch --forward --strip=1 --input="${srcdir}/0003-Fix-deprecated-werkzeug-import.patch"
  47. # Allow newer versions of the dependencies
  48. sed -i "s|==|>=|g" requirements.txt
  49. }
  50. package() {
  51. cd "$srcdir/$pkgname-$pkgver"
  52. local _site_packages="$(python -c 'import site; print(site.getsitepackages()[0])')"
  53. python setup.py install --root="$pkgdir" --optimize=1
  54. mv "${pkgdir}${_site_packages}"/{README.rst,requirements*,searx}
  55. mkdir -p "$pkgdir/etc/$pkgname"
  56. mv "${pkgdir}${_site_packages}/$pkgname/settings.yml" $pkgdir/etc/$pkgname/
  57. ln -s /etc/$pkgname/settings.yml "${pkgdir}${_site_packages}/$pkgname/settings.yml"
  58. install -Dm644 "${srcdir}/searx.sysusers" "${pkgdir}/usr/lib/sysusers.d/searx.conf"
  59. install -Dm644 "${srcdir}/searx.ini" "${pkgdir}/etc/uwsgi/searx.ini"
  60. }