Skip to content

Commit 356a442

Browse files
KSXGitHubclaude
andauthored
fix(pkgbuild): install USAGE.md to /usr/share/doc/ (#386)
`USAGE.md` is a generated file documenting CLI usage but was not being installed by either `PKGBUILD` variant. Add it alongside `README.md` in `/usr/share/doc/$pkgname/`. https://claude.ai/code/session_01KsLCFmqMNrxwpH8a2SgmG9 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4ed3a27 commit 356a442

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

ci/github-actions/generate-pkgbuild.py3

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ for line in open('checksums/sha1sum.txt').readlines():
2121

2222
maintainer = '# Maintainer: Hoàng Văn Khải <hvksmr1996@gmail.com>\n'
2323
readme_url = f'https://raw.githubusercontent.com/KSXGitHub/parallel-disk-usage/{release_tag}/README.md'
24+
usage_url = f'https://raw.githubusercontent.com/KSXGitHub/parallel-disk-usage/{release_tag}/USAGE.md'
2425
license_url = f'https://raw.githubusercontent.com/KSXGitHub/parallel-disk-usage/{release_tag}/LICENSE'
2526

2627
opening = maintainer + '\n# This file is automatically generated. Do not edit.\n'
@@ -51,7 +52,7 @@ with open('./pkgbuild/parallel-disk-usage-bin/PKGBUILD', 'w') as pkgbuild:
5152
for ext in supported_completions
5253
)
5354
man_page_source = f'pdu.{release_tag}.1::{source_url_prefix}/pdu.1'
54-
content += f'source=(pdu-{checksum}::{source_url} {completion_source} {man_page_source} {readme_url} {license_url})\n'
55+
content += f'source=(pdu-{checksum}::{source_url} {completion_source} {man_page_source} {readme_url} {usage_url} {license_url})\n'
5556
content += f'_checksum={checksum}\n'
5657
completion_checksums = ' '.join('SKIP' for _ in supported_completions)
5758
content += f'_completion_checksums=({completion_checksums})\n'

template/parallel-disk-usage-bin/PKGBUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ sha1sums=(
1212
"${_completion_checksums[@]}" # for the completion files
1313
SKIP # for the man page
1414
SKIP # for the readme file
15+
SKIP # for the usage file
1516
SKIP # for the license file
1617
)
1718

1819
package() {
1920
install -Dm755 "pdu-$_checksum" "$pkgdir/usr/bin/pdu"
2021
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
22+
install -Dm644 USAGE.md "$pkgdir/usr/share/doc/$pkgname/USAGE.md"
2123
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2224
install -Dm644 "completion.$pkgver.bash" "$pkgdir/usr/share/bash-completion/completions/pdu"
2325
install -Dm644 "completion.$pkgver.fish" "$pkgdir/usr/share/fish/completions/pdu.fish"

template/parallel-disk-usage/PKGBUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package() {
1616
cd "$srcdir/parallel-disk-usage-$pkgver"
1717
install -Dm755 target/release/pdu "$pkgdir/usr/bin/pdu"
1818
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
19+
install -Dm644 USAGE.md "$pkgdir/usr/share/doc/$pkgname/USAGE.md"
1920
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2021
install -Dm644 exports/completion.bash "$pkgdir/usr/share/bash-completion/completions/pdu"
2122
install -Dm644 exports/completion.fish "$pkgdir/usr/share/fish/completions/pdu.fish"

0 commit comments

Comments
 (0)