DEBBUILD 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. pkgname=searx-qt
  2. pkgver=0.6.0
  3. pkgrel=1
  4. pkgdesc="Desktop client application for Searx/SearXNG/searx-space"
  5. maintainer="CYBERDEViL"
  6. arch="all"
  7. url="https://notabug.org/CYBERDEViL/searx-qt"
  8. license=("GPL3")
  9. depends=("python3-requests" "python3-pyqt5" "python3-jsonschema" "python3-bs4")
  10. optdepends=(
  11. "python3-pysocks: socks proxy support"
  12. "python3-pillow: thumbnail support")
  13. makedepends=("gettext" "qtbase5-dev-tools" "python3-build" "python3-installer"
  14. "python3-wheel" "python3-setuptools")
  15. provides=("searx-qt")
  16. conflicts=("searx-qt")
  17. source=()
  18. sha512sums=()
  19. pkgver() {
  20. if [[ ! -d "${pkgname}" ]]; then
  21. # This happends the first time in this hacky DEBBUILD
  22. echo "${pkgver}"
  23. return
  24. fi
  25. cd "${pkgname}"
  26. # Are we on a tagged commit?
  27. git describe --exact-match HEAD >/dev/null 2>&1
  28. if [[ $? -ne 0 ]]; then
  29. # We not have checkedout a tag, return short commit hash.
  30. echo "${pkgver}-$(git rev-parse --short=7 HEAD)"
  31. return 0;
  32. fi
  33. # This will print the tag name
  34. git describe --tags --abbrev=0
  35. }
  36. prepare() {
  37. ln -s $(realpath ${ROOT}/../../../) "${srcdir}/${pkgname}"
  38. cd ${srcdir}
  39. pkgver=$(pkgver)
  40. sed -i "s/__git__ = '.*'/__git__ = '$(pkgver)'/g" ${pkgname}/searxqt/version.py
  41. sed -i "s/Version=.*/Version=$(pkgver)/g" ${pkgname}/share/searx-qt.desktop
  42. }
  43. build() {
  44. cd "$srcdir/$pkgname"
  45. make
  46. }
  47. package() {
  48. cd "$srcdir/$pkgname"
  49. make DESTDIR="$pkgdir" install
  50. }