From 32d9de37611fb0e0878b80ad59db2be1242760ee Mon Sep 17 00:00:00 2001 From: madomado Date: Sat, 18 Nov 2023 19:18:44 +0800 Subject: [PATCH] fix: depthcharge-tools (#818) --- .../depthcharge-tools/depthcharge-tools.spec | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/anda/tools/depthcharge-tools/depthcharge-tools.spec b/anda/tools/depthcharge-tools/depthcharge-tools.spec index 594504034c..02f2cf57b0 100644 --- a/anda/tools/depthcharge-tools/depthcharge-tools.spec +++ b/anda/tools/depthcharge-tools/depthcharge-tools.spec @@ -6,7 +6,7 @@ License: GPL-2.0-or-later URL: https://github.com/alpernebbi/depthcharge-tools Source0: %url/archive/v%version/v%version.tar.gz Requires: vboot-utils dtc gzip lz4 python3-setuptools uboot-tools vboot-utils xz -BuildRequires: python3-setuptools python3-rpm-macros +BuildRequires: python3-setuptools python3-rpm-macros systemd-rpm-macros redhat-rpm-config python3-docutils BuildArch: noarch %description @@ -21,12 +21,25 @@ python3 setup.py build %install python3 setup.py install --skip-build --root=%buildroot +mkdir -p %buildroot/usr/lib/kernel/install.d %buildroot{%_unitdir,%bash_completions_dir,%zsh_completions_dir,%_mandir/man1} +install -Dm644 systemd/*.install %buildroot/usr/lib/kernel/install.d/ +install -Dm644 systemd/*.service %buildroot%_unitdir/ +install -Dm644 completions/_mkdepthcharge.bash %buildroot%bash_completions_dir/mkdepthcharge +install -Dm644 completions/_depthchargectl.bash %buildroot%bash_completions_dir/depthchargectl +install -Dm644 completions/_{mkdepthcharge,depthchargectl}.zsh %buildroot%zsh_completions_dir/ +rst2man mkdepthcharge.rst | gzip > mkdepthcharge.1.gz +rst2man depthchargectl.rst | gzip > depthchargectl.1.gz +install -Dm644 *.1.gz %buildroot%_mandir/man1/ %files %doc README.rst %license LICENSE -%_bindir/depthchargectl -%_bindir/mkdepthcharge +%_bindir/{mkdepthcharge,depthchargectl} +%_mandir/man1/{mkdepthcharge,depthchargectl}.1.gz +%bash_completions_dir/{mkdepthcharge,depthchargectl} +/usr/lib/kernel/install.d/90-depthcharge-tools.install +%_unitdir/depthchargectl-bless.service +%zsh_completions_dir/_{mkdepthcharge,depthchargectl}.zsh %_prefix/lib/python%python3_version/site-packages/depthcharge_tools-%version-py%python3_version.egg-info/ %_prefix/lib/python%python3_version/site-packages/depthcharge_tools/