summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO41
-rw-r--r--PKGBUILD80
-rw-r--r--hydrus-client5
-rw-r--r--hydrus-server2
-rw-r--r--hydrus.install12
-rw-r--r--paths-in-opt.patch60
6 files changed, 104 insertions, 96 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 73897eaa6d24..9ae23b1b028b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,13 @@
pkgbase = hydrus
pkgdesc = Danbooru-like image tagging and searching system for the desktop
- pkgver = 402
+ pkgver = 571
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-pyqt5
depends = python-qtpy
- depends = qt5-charts
- depends = python-pyopenssl
depends = emoji-font
depends = python-mpv
+ 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
- conflicts = hydrus-docs
- conflicts = hydrus-sources
+ 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
+ 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=f0c9969b27f24af04af003864e971b44b198e8a7
+ source = hydrus::git+https://github.com/hydrusnetwork/hydrus.git#commit=ef01ac9bc79f10cf917294481d73f8461b94b90c
source = paths-in-opt.patch
source = hydrus-client
source = hydrus-server
source = hydrus.desktop
sha256sums = SKIP
- sha256sums = 62958435b7d7040abfa38547887bdc8c354ead15b26285e84ded515ac04068a1
- sha256sums = 7b0dbc6f38f9aaff409e435ba807199575166976b52715d6b54418f89dbde634
- sha256sums = 463841cc16059b516cc327cfbc30d3383e2236b085ba2d503e82f5be39444806
+ sha256sums = f9f5a5927c7f2c016dbab3e4135a921918617ba393babd9b6a903ff5d0154cdd
+ sha256sums = b1854ecac184385f0aa48fcefd426223fac3eeec0f1180ba58b6a58b03257d68
+ sha256sums = 5956d418d29fe19f54263acf47adce7c6d134d19ec65e2810d4517ce83529480
sha256sums = 9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923
pkgname = hydrus
-
diff --git a/PKGBUILD b/PKGBUILD
index a652a56f1e32..1a24f95bbb5b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,66 +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=402
+pkgname=hydrus
+_pkgname=hydrus
+pkgver=571
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-pyqt5 python-qtpy qt5-charts
- python-pyopenssl emoji-font python-mpv)
+ 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'
- )
-source=("${pkgbase}::git+https://github.com/hydrusnetwork/${pkgbase}.git#commit=f0c9969b27f24af04af003864e971b44b198e8a7"
+ '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=ef01ac9bc79f10cf917294481d73f8461b94b90c"
paths-in-opt.patch
hydrus-client
hydrus-server
hydrus.desktop)
sha256sums=('SKIP'
- '62958435b7d7040abfa38547887bdc8c354ead15b26285e84ded515ac04068a1'
- '7b0dbc6f38f9aaff409e435ba807199575166976b52715d6b54418f89dbde634'
- '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"
@@ -68,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 9e9e822095d9..060d2ef97178 100644
--- a/hydrus-client
+++ b/hydrus-client
@@ -1,3 +1,4 @@
#!/bin/sh
-export QT_API="${QT_API:-pyqt5}"
-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 d9edc30266be..72d6fe795fca 100644
--- a/paths-in-opt.patch
+++ b/paths-in-opt.patch
@@ -1,36 +1,10 @@
-diff --git a/hydrus/client/gui/ClientGUI.py b/hydrus/client/gui/ClientGUI.py
-index 2c3933e..c84a039 100644
---- a/hydrus/client/gui/ClientGUI.py
-+++ b/hydrus/client/gui/ClientGUI.py
-@@ -772,7 +772,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/client/gui/ClientGUIStyle.py b/hydrus/client/gui/ClientGUIStyle.py
-index 7de8ef2..1196c62 100644
---- a/hydrus/client/gui/ClientGUIStyle.py
-+++ b/hydrus/client/gui/ClientGUIStyle.py
-@@ -6,7 +6,7 @@ from hydrus.core import HydrusConstants as HC
- from hydrus.core import HydrusData
- from hydrus.core import HydrusExceptions
-
--STYLESHEET_DIR = os.path.join( HC.BASE_DIR, 'static', 'qss' )
-+STYLESHEET_DIR = os.path.join( HC.STATIC_DIR, 'qss' )
-
- DEFAULT_HYDRUS_STYLESHEET = ''
- ORIGINAL_STYLE_NAME = None
diff --git a/hydrus/core/HydrusConstants.py b/hydrus/core/HydrusConstants.py
-index f14ed6e..4d7a20e 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 )
-
@@ -59,15 +33,16 @@ index f14ed6e..4d7a20e 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 = False
- PLATFORM_MACOS = False
-@@ -44,23 +20,16 @@ elif sys.platform == 'linux': PLATFORM_LINUX = True
- 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' )
@@ -82,14 +57,25 @@ index f14ed6e..4d7a20e 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"