From 2fb66e4a9fe04c0e347f8866ec1742c4e728f4ad Mon Sep 17 00:00:00 2001 From: fanyx Date: Thu, 27 Oct 2022 15:27:36 +0200 Subject: [PATCH] New package: hydrus-504 --- srcpkgs/hydrus/files/hydrus.desktop | 9 +++++++ srcpkgs/hydrus/template | 40 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 srcpkgs/hydrus/files/hydrus.desktop create mode 100644 srcpkgs/hydrus/template diff --git a/srcpkgs/hydrus/files/hydrus.desktop b/srcpkgs/hydrus/files/hydrus.desktop new file mode 100644 index 000000000000..495c2f060d6e --- /dev/null +++ b/srcpkgs/hydrus/files/hydrus.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Hydrus Client +Comment=Danbooru-like image tagging and searching system for the desktop +Exec=hydrus-client +Icon=/usr/lib/hydrus/static/hydrus_non-transparent.png +Terminal=false +Type=Application +Categories=Application;FileTools;Graphics;Network; diff --git a/srcpkgs/hydrus/template b/srcpkgs/hydrus/template new file mode 100644 index 000000000000..34663909343b --- /dev/null +++ b/srcpkgs/hydrus/template @@ -0,0 +1,40 @@ +# Template file for 'hydrus' +pkgname=hydrus +version=504 +revision=1 +pycompile_dirs="usr/lib/hydrus" +hostmakedepends="python3" +depends="python3 libopencv-python3 python3-BeautifulSoup4 python3-yaml python3-lz4 + python3-numpy python3-Twisted python3-Pillow python3-pysocks python3-psutil + python3-send2trash python3-html5lib python3-requests python3-QtPy noto-fonts-emoji + python3-mpv python3-service_identity python3-PyQt5 fmt python3-pyside2 ffmpeg + miniupnpc desktop-file-utils python3-cloudscraper python3-openssl" +short_desc="Danbooru-like image tagging and searching system for the desktop" +maintainer="fanyx " +license="WTFPL" +homepage="https://hydrusnetwork.github.io/hydrus/" +distfiles="https://github.com/hydrusnetwork/hydrus/archive/refs/tags/v${version}.tar.gz" +checksum=06aff739f5444940296841a23a4f3ac7a5ace8ffface7ee280fce319ef2c8fea + +python_version="3" + +do_install() { + vsed -i hydrus/core/HydrusConstants.py -e 's|^LICENSE_PATH.*|LICENSE_PATH = "/usr/share/licenses/hydrus/license.txt"|' + chmod +x server.py + + vmkdir usr/lib/hydrus + vcopy hydrus usr/lib/hydrus/ + vcopy static usr/lib/hydrus/ + vcopy client.pyw usr/lib/hydrus/ + vcopy server.py usr/lib/hydrus/ + + vmkdir usr/bin + ln -sf /usr/lib/hydrus/client.pyw ${DESTDIR}/usr/bin/hydrus-client + ln -sf /usr/lib/hydrus/server.py ${DESTDIR}/usr/bin/hydrus-server + + vmkdir usr/share/applications + vcopy ${FILESDIR}/hydrus.desktop usr/share/applications/ + + vlicense COPYING + vlicense license.txt +}