summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD81
-rw-r--r--hydrus-client4
-rw-r--r--hydrus-server2
-rw-r--r--hydrus.install12
-rw-r--r--paths-in-opt.patch47
6 files changed, 103 insertions, 82 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c92b29cfdcc4..d9e9b2410622 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,13 @@
pkgbase = hydrus
pkgdesc = Danbooru-like image tagging and searching system for the desktop
- pkgver = 430
+ pkgver = 572
pkgrel = 1
url = http://hydrusnetwork.github.io/hydrus/
- install = hydrus.install
arch = any
- license = WTFPL
+ license = custom
makedepends = git
depends = python
- depends = opencv
+ depends = python-opencv
depends = python-beautifulsoup4
depends = python-yaml
depends = python-lz4>=0.10.1
@@ -20,30 +19,42 @@ pkgbase = hydrus
depends = python-send2trash
depends = python-html5lib
depends = python-requests
- depends = hdf5
depends = python-qtpy
depends = emoji-font
depends = python-mpv
- depends = qt5-python-bindings
+ depends = python-lxml
+ depends = python-urllib3
+ depends = python-typing_extensions
+ depends = python-service-identity
+ depends = qt6-multimedia
+ depends = qt6-svg
+ depends = python-pyqt6
optdepends = ffmpeg: show duration and other information on video thumbnails
optdepends = miniupnpc: automatic port forwarding
optdepends = desktop-file-utils: to add Hydrus to your desktop environment menus
+ optdepends = hydrus-docs: offline documentation
+ optdepends = python-cbor2: cbor support in client-server communication
+ optdepends = python-chardet: detect text encoding more accurately
optdepends = python-cloudscraper: bypass cloudflare "checking your browser" challenges
- optdepends = python-pyqtchart: display bandwidth usage charts
+ optdepends = python-dateutil: improved fuzzy date search
+ optdepends = python-dateparser: date string to timestamp parser for predicate system
+ optdepends = python-psd-tools: handle PSD files and extract thumbnails
+ optdepends = python-pympler: debug menus to profile memory usage
+ optdepends = python-cryptography: to generate certificates for accessing client API and server via HTTPS
optdepends = python-pyopenssl: to generate certificates for accessing client API and server via HTTPS
- conflicts = hydrus-docs
- conflicts = hydrus-sources
+ optdepends = qt6-webengine: to display PDF thumbnails
+ optdepends = swftools: to display SWF thumbnails
+ conflicts = hydrus-docs-dummy
options = !strip
- source = hydrus::git+https://github.com/hydrusnetwork/hydrus.git#commit=0db1e676661ecaca96470bf76c06f65871a99b05
+ source = hydrus::git+https://github.com/hydrusnetwork/hydrus.git#commit=c63273e3635a2a0d4f199835dd9befbf75ac6c67
source = paths-in-opt.patch
source = hydrus-client
source = hydrus-server
source = hydrus.desktop
sha256sums = SKIP
- sha256sums = bac23f99d7ac1fea5c1fea4c3ff478c1fc327017b6a68be1212d752390f252fd
- sha256sums = d2cb826ce0dd1892ab95fc3b14dbe6bd312210f653d0aea31938eeb7e361fdc5
- sha256sums = 463841cc16059b516cc327cfbc30d3383e2236b085ba2d503e82f5be39444806
+ sha256sums = f9f5a5927c7f2c016dbab3e4135a921918617ba393babd9b6a903ff5d0154cdd
+ sha256sums = b1854ecac184385f0aa48fcefd426223fac3eeec0f1180ba58b6a58b03257d68
+ sha256sums = 5956d418d29fe19f54263acf47adce7c6d134d19ec65e2810d4517ce83529480
sha256sums = 9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923
pkgname = hydrus
-
diff --git a/PKGBUILD b/PKGBUILD
index 1faf711d3501..a447a145c22c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,67 +1,81 @@
# Maintainer: Score_Under <seejay 11@gmail com>
options=(!strip) # Don't strip libs because there aren't any
-DOC_DIRS=(opt/hydrus/help)
-pkgbase=hydrus
-pkgname=(hydrus)
-pkgver=430
+pkgname=hydrus
+_pkgname=hydrus
+pkgver=572
pkgrel=1
pkgdesc="Danbooru-like image tagging and searching system for the desktop"
arch=(any)
-license=(WTFPL)
-install=hydrus.install
-conflicts=(hydrus-docs hydrus-sources)
+license=(custom)
url=http://hydrusnetwork.github.io/hydrus/
-depends=(python opencv python-beautifulsoup4 python-yaml
+depends=(python python-opencv python-beautifulsoup4 python-yaml
'python-lz4>=0.10.1' python-numpy python-twisted python-pillow
python-pysocks python-psutil python-send2trash python-html5lib
- python-requests hdf5 python-qtpy emoji-font python-mpv
- qt5-python-bindings)
+ python-requests python-qtpy emoji-font python-mpv
+ python-lxml python-urllib3 python-typing_extensions
+ python-service-identity # required by twisted for https hostname verification
+ qt6-multimedia # https://aur.archlinux.org/packages/hydrus#comment-914337
+ qt6-svg # https://aur.archlinux.org/packages/hydrus#comment-923550
+ python-pyqt6)
makedepends=(git)
optdepends=('ffmpeg: show duration and other information on video thumbnails'
'miniupnpc: automatic port forwarding'
'desktop-file-utils: to add Hydrus to your desktop environment menus'
+ 'hydrus-docs: offline documentation'
+ 'python-cbor2: cbor support in client-server communication'
+ 'python-chardet: detect text encoding more accurately'
'python-cloudscraper: bypass cloudflare "checking your browser" challenges'
- 'python-pyqtchart: display bandwidth usage charts'
- 'python-pyopenssl: to generate certificates for accessing client API and server via HTTPS')
-source=("${pkgbase}::git+https://github.com/hydrusnetwork/${pkgbase}.git#commit=0db1e676661ecaca96470bf76c06f65871a99b05"
+ 'python-dateutil: improved fuzzy date search'
+ 'python-dateparser: date string to timestamp parser for predicate system'
+ 'python-psd-tools: handle PSD files and extract thumbnails'
+ 'python-pympler: debug menus to profile memory usage'
+ # 'python-pyqt6-charts: display bandwidth usage charts'
+ 'python-cryptography: to generate certificates for accessing client API and server via HTTPS'
+ 'python-pyopenssl: to generate certificates for accessing client API and server via HTTPS'
+ 'qt6-webengine: to display PDF thumbnails'
+ # 'python-pyparsing: currently unused'
+ # 'speedcopy: may speed up file transfers'
+ 'swftools: to display SWF thumbnails')
+conflicts=(hydrus-docs-dummy)
+source=("${_pkgname}::git+https://github.com/hydrusnetwork/${_pkgname}.git#commit=c63273e3635a2a0d4f199835dd9befbf75ac6c67"
paths-in-opt.patch
hydrus-client
hydrus-server
hydrus.desktop)
sha256sums=('SKIP'
- 'bac23f99d7ac1fea5c1fea4c3ff478c1fc327017b6a68be1212d752390f252fd'
- 'd2cb826ce0dd1892ab95fc3b14dbe6bd312210f653d0aea31938eeb7e361fdc5'
- '463841cc16059b516cc327cfbc30d3383e2236b085ba2d503e82f5be39444806'
+ 'f9f5a5927c7f2c016dbab3e4135a921918617ba393babd9b6a903ff5d0154cdd'
+ 'b1854ecac184385f0aa48fcefd426223fac3eeec0f1180ba58b6a58b03257d68'
+ '5956d418d29fe19f54263acf47adce7c6d134d19ec65e2810d4517ce83529480'
'9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923')
prepare() {
- cd "$pkgbase"
- git apply < ../paths-in-opt.patch
-
- # Remove unit tests
- rm -f "hydrus/Test"*.py
- rm -rf "static/testing"
+ cd "${srcdir}/${_pkgname}"
+ patch -Np1 < ../paths-in-opt.patch
}
build() {
- cd "$pkgbase"
+ cd "${srcdir}/${_pkgname}"
msg 'Compiling .py files...'
python -OO -m compileall -fq .
}
-package_hydrus() {
- cd "$pkgbase"
+package() {
+ cd "${srcdir}/${_pkgname}"
# Create /opt/hydrus and copy hydrus files to there
install -m755 -d "${pkgdir}/opt/hydrus"
- cp -r help hydrus static client.pyw server.py "${pkgdir}/opt/hydrus/"
+ cp -r hydrus static hydrus_client.py hydrus_server.py "${pkgdir}/opt/hydrus/"
+
+ # Remove unit tests
+ rm -rf "${pkgdir}/opt/hydrus/hydrus/test" "${pkgdir}/opt/hydrus/static/testing"
# Create and populate /opt/hydrus/bin
install -d -m755 "${pkgdir}/opt/hydrus/bin"
ln -s /usr/bin/upnpc "${pkgdir}/opt/hydrus/bin/upnpc_linux"
ln -s /usr/bin/ffmpeg "${pkgdir}/opt/hydrus/bin/ffmpeg"
+ ln -s /usr/bin/swfrender "${pkgdir}/opt/hydrus/bin/swfrender_linux"
# Install hydrus-client and hydrus-server executables
install -d -m755 "${pkgdir}/usr/bin"
@@ -69,10 +83,17 @@ package_hydrus() {
# Install .desktop shortcut
install -d -m755 "${pkgdir}/usr/share/applications"
- install -m644 ../hydrus.desktop "${pkgdir}/usr/share/applications/${pkgbase}.desktop"
+ install -m644 ../hydrus.desktop "${pkgdir}/usr/share/applications/io.github.hydrusnetwork.hydrus.desktop"
# Install license files
- install -d -m755 "${pkgdir}/usr/share/licenses/${pkgbase}"
- install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgbase}/"
- install -m644 license.txt "${pkgdir}/usr/share/licenses/${pkgbase}/"
+ install -d -m755 "${pkgdir}/usr/share/licenses/${_pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${_pkgname}/"
+ install -m644 license.txt "${pkgdir}/usr/share/licenses/${_pkgname}/"
}
+
+# Tests (they don't pass!)
+# makedepends+=(python-httmock)
+# check() {
+# cd "${srcdir}/${_pkgname}"
+# python -m unittest discover -s hydrus/test -p 'Test*.py'
+# }
diff --git a/hydrus-client b/hydrus-client
index 16b14ba225f3..060d2ef97178 100644
--- a/hydrus-client
+++ b/hydrus-client
@@ -1,2 +1,4 @@
#!/bin/sh
-exec python -OO /opt/hydrus/client.pyw "$@"
+: "${QT_API:=pyqt6}"
+export QT_API
+exec python -OO /opt/hydrus/hydrus_client.py "$@"
diff --git a/hydrus-server b/hydrus-server
index ea3cd3fce25a..9bc319d4d458 100644
--- a/hydrus-server
+++ b/hydrus-server
@@ -1,2 +1,2 @@
#!/bin/sh
-exec python -OO /opt/hydrus/server.py "$@"
+exec python -OO /opt/hydrus/hydrus_server.py "$@"
diff --git a/hydrus.install b/hydrus.install
deleted file mode 100644
index 27c282a04440..000000000000
--- a/hydrus.install
+++ /dev/null
@@ -1,12 +0,0 @@
-post_install() {
- # Ignore failures because it's only an opt dep
- update-desktop-database -q 2>/dev/null || :
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
diff --git a/paths-in-opt.patch b/paths-in-opt.patch
index 80ad33684de4..72d6fe795fca 100644
--- a/paths-in-opt.patch
+++ b/paths-in-opt.patch
@@ -1,23 +1,10 @@
-diff --git a/hydrus/client/gui/ClientGUI.py b/hydrus/client/gui/ClientGUI.py
-index db9fd6f..c925431 100644
---- a/hydrus/client/gui/ClientGUI.py
-+++ b/hydrus/client/gui/ClientGUI.py
-@@ -792,7 +792,7 @@ class FrameGUI( ClientGUITopLevelWindows.MainFrameThatResizes ):
- python_executable = python_executable.replace( 'pythonw', 'python' )
-
-
-- server_script_path = os.path.join( HC.BASE_DIR, 'server.py' )
-+ server_script_path = '/opt/hydrus/server.py'
-
- cmd = [ python_executable, server_script_path, db_param ]
-
diff --git a/hydrus/core/HydrusConstants.py b/hydrus/core/HydrusConstants.py
-index 857715d..ff6a7ae 100644
+index d59bf1aa..8cbf8fee 100644
--- a/hydrus/core/HydrusConstants.py
+++ b/hydrus/core/HydrusConstants.py
-@@ -5,33 +5,9 @@ import typing
- # old method of getting frozen dir, doesn't work for symlinks looks like:
- # BASE_DIR = getattr( sys, '_MEIPASS', None )
+@@ -11,34 +11,9 @@ import yaml
+ RUNNING_CLIENT = False
+ RUNNING_SERVER = False
-RUNNING_FROM_FROZEN_BUILD = getattr( sys, 'frozen', False )
-
@@ -46,15 +33,16 @@ index 857715d..ff6a7ae 100644
-
- BASE_DIR = os.getcwd()
-
+-
+RUNNING_FROM_FROZEN_BUILD = False
+HYDRUS_MODULE_DIR = '/opt/hydrus/hydrus'
+BASE_DIR = os.path.expanduser("~/.local/share/hydrus")
- PLATFORM_WINDOWS = sys.platform == 'win32'
- PLATFORM_MACOS = sys.platform == 'darwin'
-@@ -41,23 +17,16 @@ PLATFORM_HAIKU = sys.platform == 'haiku1'
- RUNNING_FROM_SOURCE = sys.argv[0].endswith( '.py' ) or sys.argv[0].endswith( '.pyw' )
- RUNNING_FROM_MACOS_APP = os.path.exists( os.path.join( BASE_DIR, 'running_from_app' ) )
+ muh_platform = sys.platform.lower()
+
+@@ -69,34 +44,18 @@ elif RUNNING_FROM_FROZEN_BUILD:
+ elif RUNNING_FROM_MACOS_APP:
+ NICE_RUNNING_AS_STRING = 'from App'
-BIN_DIR = os.path.join( BASE_DIR, 'bin' )
-HELP_DIR = os.path.join( BASE_DIR, 'help' )
@@ -69,14 +57,25 @@ index 857715d..ff6a7ae 100644
-if PLATFORM_MACOS:
-
-- USERPATH_DB_DIR = os.path.join( os.path.expanduser( '~' ), 'Library', 'Hydrus' )
+- desired_userpath_db_dir = os.path.join( '~', 'Library', 'Hydrus' )
-
-else:
-
-- USERPATH_DB_DIR = os.path.join( os.path.expanduser( '~' ), 'Hydrus' )
+- desired_userpath_db_dir = os.path.join( '~', 'Hydrus' )
+-
+-
+-USERPATH_DB_DIR = os.path.expanduser( desired_userpath_db_dir )
+-
+-if USERPATH_DB_DIR == desired_userpath_db_dir:
+-
+- # could not figure it out, probably a crazy user situation atm
+-
+- USERPATH_DB_DIR = None
-
+USERPATH_DB_DIR = DEFAULT_DB_DIR
+ WE_SWITCHED_TO_USERPATH = False
+
-LICENSE_PATH = os.path.join( BASE_DIR, 'license.txt' )
+LICENSE_PATH = "/usr/share/licenses/hydrus/license.txt"