add completions to debian, binary and arch packages

This commit is contained in:
Abraham Toriz 2022-11-06 20:46:45 -06:00
parent bc2b96d425
commit 6496d684ff
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
5 changed files with 27 additions and 12 deletions

View File

@ -51,17 +51,23 @@ build:
# build the binary
- cargo build --locked --release
# create the tar package
- mkdir -p build/bin build/doc/man
# move things to the build directory
- mkdir -p build/bin build/share/doc/tiempo build/share/man/man1 build/share/bash-completion/completions build/share/zsh/site-functions build/share/fish/vendor_completions.d
# move binary
- cp target/release/t build/bin/
- cp CHANGELOG.md build/doc/
- cp README.md build/doc/
- cp LICENSE build/doc/
- cp -R docs/build/html build/doc/
- cp docs/build/man/tiempo.1.gz build/doc/man/
# move documentation
- cp CHANGELOG.md build/share/doc/tiempo/
- cp README.md build/share/doc/tiempo/
- cp LICENSE build/share/doc/tiempo/
- cp -R docs/build/html build/share/doc/tiempo/
# move man page
- cp docs/build/man/tiempo.1.gz build/share/man/man1/
# move completions
- cp completions/bash/t build/share/bash-completions/completions/
- cp completions/fish/t.fish build/share/fish/vendor_completions.d/
- cp completions/zsh/_t build/share/zsh/site-functions/
# compress the tar file
- tar -cvzf tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz build/
# makes the debian archive
# makes the debian archive
- ./debpackage.sh
# computes the sums
- sha256sum tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz > tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz.sum

View File

@ -41,6 +41,9 @@ install -Dm644 "README.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/README.md
install -Dm644 "LICENSE" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/LICENSE"
install -Dm644 "CHANGELOG.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/CHANGELOG.md"
install -Dm644 "build/doc/man/$PROJECT_NAME.1.gz" "${DPKG_DIR}/usr/share/man/man1/$PROJECT_NAME.1.gz"
install -Dm644 "completions/bash/t" "${DPKG_DIR}/usr/share/bash-completions/completions/"
install -Dm644 "completions/fish/t.fish" "${DPKG_DIR}/usr/share/fish/vendor_completions.d/"
install -Dm644 "completions/zsh/_t" "${DPKG_DIR}/usr/share/zsh/site-functions/"
gzip -n --best "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/changelog"
cat > "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/copyright" <<EOF

View File

@ -35,10 +35,13 @@ package() {
cd \"\$srcdir/build\"
install -Dm755 bin/$PROJECT_BINARY \"\$pkgdir\"/usr/bin/$PROJECT_BINARY
install -Dm644 doc/README.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/README.md
install -Dm644 doc/LICENSE \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/LICENSE
install -Dm644 doc/CHANGELOG.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/CHANGELOG.md
install -Dm644 doc/man/$PROJECT_NAME.1.gz \"\$pkgdir\"/usr/share/man/man1/$PROJECT_NAME.1.gz
install -Dm644 share/doc/$PROJECT_NAME/README.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/README.md
install -Dm644 share/doc/$PROJECT_NAME/LICENSE \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/LICENSE
install -Dm644 share/doc/$PROJECT_NAME/CHANGELOG.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/CHANGELOG.md
install -Dm644 share/man/man1/$PROJECT_NAME.1.gz \"\$pkgdir\"/usr/share/man/man1/$PROJECT_NAME.1.gz
install -Dm644 share/bash-completions/completions/t \"\$pkgdir\"/usr/share/bash-completions/completions/t
install -Dm644 share/fish/vendor_completions.d/t.fish \"\$pkgdir\"/usr/share/fish/vendor_completions.d/t.fish
install -Dm644 share/zsh/site-functions/_t \"\$pkgdir\"/usr/share/zsh/site-functions/_t
}
" | tee PKGBUILD > /dev/null

View File

@ -49,6 +49,9 @@ package() {
install -Dm644 CHANGELOG.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/CHANGELOG.md
install -Dm644 docs/build/man/$PROJECT_NAME.1.gz \"\$pkgdir\"/usr/share/man/man1/$PROJECT_NAME.1.gz
install -Dm644 completions/bash/t \"\$pkgdir\"/usr/share/bash-completions/completions/
install -Dm644 completions/fish/t.fish \"\$pkgdir\"/usr/share/fish/vendor_completions.d/
install -Dm644 completions/zsh/_t \"\$pkgdir\"/usr/share/zsh/site-functions/
}" | tee PKGBUILD > /dev/null
makepkg --printsrcinfo > .SRCINFO