diff options
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | hydrus.install | 12 | ||||
-rw-r--r-- | paths-in-opt.patch | 39 |
4 files changed, 61 insertions, 57 deletions
@@ -1,11 +1,10 @@ pkgbase = hydrus-git pkgdesc = Danbooru-like image tagging and searching system for the desktop - pkgver = 476.r2.gd5166b4a + pkgver = 525a.r0.g2691a92c pkgrel = 1 url = http://hydrusnetwork.github.io/hydrus/ - install = hydrus.install arch = any - license = WTFPL + license = custom makedepends = git makedepends = mkdocs makedepends = mkdocs-material @@ -25,28 +24,35 @@ pkgbase = hydrus-git depends = python-qtpy depends = emoji-font depends = python-mpv + depends = python-lxml + depends = python-urllib3 + depends = python-typing_extensions depends = python-service-identity - depends = qt5-python-bindings - depends = fmt - depends = pyside2 + depends = pyside6 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 = 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-pyqt5-chart: display bandwidth usage charts + optdepends = python-dateutil: improved fuzzy date search + optdepends = python-pympler: debug menus to profile memory usage + optdepends = python-pyqt6-charts: display bandwidth usage charts + 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 - provides = hydrus + optdepends = swftools: to display SWF thumbnails + provides = hydrus=525a.r0.g2691a92c + provides = hydrus-docs=525a.r0.g2691a92c conflicts = hydrus conflicts = hydrus-docs - conflicts = hydrus-sources options = !strip - source = git+https://github.com/hydrusnetwork/hydrus.git + source = hydrus::git+https://github.com/hydrusnetwork/hydrus.git source = paths-in-opt.patch source = hydrus-client source = hydrus-server source = hydrus.desktop sha256sums = SKIP - sha256sums = 6dde03b452b842d089cfdffb4cf8554b4985934d664054b2bb71006694f923c6 + sha256sums = b196485720ed874a22fe49a48ce92db423dda12824b2755071bbf47cfc891bc0 sha256sums = d2cb826ce0dd1892ab95fc3b14dbe6bd312210f653d0aea31938eeb7e361fdc5 sha256sums = 463841cc16059b516cc327cfbc30d3383e2236b085ba2d503e82f5be39444806 sha256sums = 9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923 @@ -5,34 +5,43 @@ DOC_DIRS=(opt/hydrus/help) pkgname=hydrus-git _pkgname=hydrus -pkgver=476.r2.gd5166b4a +pkgver=525a.r0.g2691a92c pkgrel=1 pkgdesc="Danbooru-like image tagging and searching system for the desktop" arch=(any) -license=(WTFPL) -install=hydrus.install -provides=(hydrus) -conflicts=(hydrus hydrus-docs hydrus-sources) +license=(custom) +provides=("hydrus=$pkgver" "hydrus-docs=$pkgver") +conflicts=(hydrus hydrus-docs) url=http://hydrusnetwork.github.io/hydrus/ 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 python-qtpy emoji-font python-mpv - python-service-identity qt5-python-bindings fmt pyside2) + python-lxml python-urllib3 python-typing_extensions + python-service-identity # required by twisted for https hostname verification + pyside6) makedepends=(git mkdocs mkdocs-material) 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' + 'python-cbor2: cbor support in client-server communication' + 'python-chardet: detect text encoding more accurately' 'python-cloudscraper: bypass cloudflare "checking your browser" challenges' - 'python-pyqt5-chart: display bandwidth usage charts' - 'python-pyopenssl: to generate certificates for accessing client API and server via HTTPS') -source=("git+https://github.com/hydrusnetwork/${_pkgname}.git" + 'python-dateutil: improved fuzzy date search' + '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' + # 'python-pyparsing: currently unused' + # 'speedcopy: may speed up file transfers' + 'swftools: to display SWF thumbnails') +source=("${_pkgname}::git+https://github.com/hydrusnetwork/${_pkgname}.git" paths-in-opt.patch hydrus-client hydrus-server hydrus.desktop) sha256sums=('SKIP' - '6dde03b452b842d089cfdffb4cf8554b4985934d664054b2bb71006694f923c6' + 'b196485720ed874a22fe49a48ce92db423dda12824b2755071bbf47cfc891bc0' 'd2cb826ce0dd1892ab95fc3b14dbe6bd312210f653d0aea31938eeb7e361fdc5' '463841cc16059b516cc327cfbc30d3383e2236b085ba2d503e82f5be39444806' '9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923') @@ -44,11 +53,7 @@ pkgver() { prepare() { cd "${srcdir}/${_pkgname}" - git apply < ../paths-in-opt.patch - - # Remove unit tests - rm -f "hydrus/Test"*.py - rm -rf "static/testing" + patch -Np1 < ../paths-in-opt.patch } build() { @@ -68,10 +73,14 @@ package() { install -m755 -d "${pkgdir}/opt/hydrus" cp -r help hydrus static client.pyw 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" 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 64ec3007c32a..273fe4c68ddc 100644 --- a/paths-in-opt.patch +++ b/paths-in-opt.patch @@ -1,23 +1,23 @@ diff --git a/hydrus/client/gui/ClientGUI.py b/hydrus/client/gui/ClientGUI.py -index 418c93e..91e2683 100644 +index 8ed3a258..a63c53ac 100644 --- a/hydrus/client/gui/ClientGUI.py +++ b/hydrus/client/gui/ClientGUI.py -@@ -4133,7 +4133,7 @@ class FrameGUI( ClientGUITopLevelWindows.MainFrameThatResizes ): - python_executable = python_executable.replace( 'pythonw', 'python' ) +@@ -6153,7 +6153,7 @@ class FrameGUI( CAC.ApplicationCommandProcessorMixin, ClientGUITopLevelWindows.M + 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 ] - -- 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 db6a88b..49e5fdb 100644 +index b38f7432..4d71fbd9 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 +46,16 @@ index db6a88b..49e5fdb 100644 - - BASE_DIR = os.getcwd() - +- +RUNNING_FROM_FROZEN_BUILD = False +HYDRUS_MODULE_DIR = '/opt/hydrus/hydrus' +BASE_DIR = os.path.expanduser("~/.local/share/hydrus") muh_platform = sys.platform.lower() -@@ -43,32 +19,16 @@ PLATFORM_HAIKU = muh_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' ) ) +@@ -66,32 +41,16 @@ 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' ) @@ -75,7 +76,8 @@ index db6a88b..49e5fdb 100644 - - desired_userpath_db_dir = os.path.join( '~', 'Hydrus' ) - -- ++USERPATH_DB_DIR = DEFAULT_DB_DIR + -USERPATH_DB_DIR = os.path.expanduser( desired_userpath_db_dir ) - -if USERPATH_DB_DIR == desired_userpath_db_dir: @@ -84,8 +86,7 @@ index db6a88b..49e5fdb 100644 - - USERPATH_DB_DIR = None - -+USERPATH_DB_DIR = DEFAULT_DB_DIR - +- -LICENSE_PATH = os.path.join( BASE_DIR, 'license.txt' ) +LICENSE_PATH = "/usr/share/licenses/hydrus/license.txt" |