From d7758cd4aa6fa2fea34d7279bc108d4905a11997 Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Fri, 3 Apr 2026 15:59:58 -0700 Subject: [PATCH] Add VesperOS debian packaging files --- debian/control | 35 +++++++++++++++++++++++++++++++++ debian/copyright | 27 ++++++++++++++++++++++++++ debian/hyfetch.wrapper | 11 +++++++++++ debian/rules | 44 ++++++++++++++++++++++++++++++++++++++++++ debian/source/format | 1 + 5 files changed, 118 insertions(+) create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/hyfetch.wrapper create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..b737258f --- /dev/null +++ b/debian/control @@ -0,0 +1,35 @@ +Source: hyfetch +Section: utils +Priority: optional +Maintainer: VesperOS Desktop Team +Build-Depends: debhelper-compat (= 13), + python3:any, +Rules-Requires-Root: no +Standards-Version: 4.7.2 +Homepage: https://github.com/hykilpikonna/HyFetch + +Package: hyfetch +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + python3, + neowofetch, +Suggests: bash-completion +Description: neofetch with LGBTQ+ pride flags + HyFetch is a command-line tool that displays system information alongside + LGBTQ+ pride flags in your terminal. It is based on neofetch and adds + colorful flag overlays using the terminal's color capabilities. + . + Includes a bundled neowofetch script (a fork of neofetch) and a fast + Rust-based backend for improved performance. + +Package: neowofetch +Architecture: all +Depends: ${misc:Depends}, bash +Provides: neofetch +Replaces: neofetch +Conflicts: neofetch +Description: neofetch fork with extended hardware and colour support + neowofetch is a fork of the neofetch system information script with + additional hardware detection, colour improvements, and active maintenance. + It is a drop-in replacement for neofetch and provides the same command. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..fe098f52 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,27 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: HyFetch +Upstream-Contact: Azalea Gui +Source: https://github.com/hykilpikonna/HyFetch + +Files: * +Copyright: Azalea Gui +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. diff --git a/debian/hyfetch.wrapper b/debian/hyfetch.wrapper new file mode 100644 index 00000000..76f92e28 --- /dev/null +++ b/debian/hyfetch.wrapper @@ -0,0 +1,11 @@ +#!/usr/bin/python3 +import sys +import os + +# Allow forcing Python fallback with env var +if os.environ.get('HYFETCH_PY'): + from hyfetch.py import run_py + run_py() +else: + from hyfetch.__main__ import run_rust + run_rust() diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..e90c64b1 --- /dev/null +++ b/debian/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +# Rust is provided by rustup in the VesperOS build environment +export PATH := $(HOME)/.cargo/bin:$(PATH) + +PY_DIST_DIR = $(CURDIR)/debian/hyfetch/usr/lib/python3/dist-packages + +%: + dh $@ + +override_dh_auto_build: + cargo build --release --manifest-path Cargo.toml + +override_dh_auto_install: + # Python package + install -d $(PY_DIST_DIR) + cp -r hyfetch $(PY_DIST_DIR)/hyfetch + # Rust binary inside the Python package (hyfetch looks for it at hyfetch/rust/hyfetch) + install -d $(PY_DIST_DIR)/hyfetch/rust + install -m 755 target/release/hyfetch $(PY_DIST_DIR)/hyfetch/rust/hyfetch + # Entry point wrappers + install -d debian/hyfetch/usr/bin + install -m 755 debian/hyfetch.wrapper debian/hyfetch/usr/bin/hyfetch + # Man pages + install -d debian/hyfetch/usr/share/man/man1 + install -m 644 docs/hyfetch.1 debian/hyfetch/usr/share/man/man1/hyfetch.1 + # neowofetch package + install -d debian/neowofetch/usr/bin + install -m 755 hyfetch/scripts/neowofetch debian/neowofetch/usr/bin/neowofetch + ln -sf neowofetch debian/neowofetch/usr/bin/neofetch + install -d debian/neowofetch/usr/share/man/man1 + install -m 644 docs/neofetch.1 debian/neowofetch/usr/share/man/man1/neowofetch.1 + ln -sf neowofetch.1.gz debian/neowofetch/usr/share/man/man1/neofetch.1.gz + # Bash completion + install -d debian/hyfetch/usr/share/bash-completion/completions + install -m 644 hyfetch/scripts/autocomplete.bash \ + debian/hyfetch/usr/share/bash-completion/completions/hyfetch + # Zsh completion + install -d debian/hyfetch/usr/share/zsh/vendor-completions + install -m 644 hyfetch/scripts/autocomplete.zsh \ + debian/hyfetch/usr/share/zsh/vendor-completions/_hyfetch + +override_dh_auto_test: + # skip tests diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..89ae9db8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native)