git-tpl
LOW
maintainer noirbizarre
0 votes
scanned 2026-08-19 03:41:13.749572
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: Axel H. <noirbizarre@gmail.com>
2
#
3
# Source package. `0.7.0` and `bf955f47816b03a001a372a6f945088ddaedbe95ad1c94c44bcbc6ce63780404` are substituted by
4
# .github/workflows/aur.yaml from the published release, and the result is
5
# pushed to the AUR. Edit this template, never the PKGBUILD in the AUR
6
# repository: that one is regenerated at every release.
7
8
pkgname=git-tpl
9
pkgver=0.7.0
10
pkgrel=1
11
pkgdesc="Git-native project templates"
12
arch=('x86_64' 'aarch64')
13
url="https://github.com/noirbizarre/git-tpl"
14
license=('MIT')
15
16
# zlib because libgit2 links the system one rather than bundling it: the binary
17
# really does need libz.so.1, and namcap errors on a needed library left
18
# undeclared.
19
depends=('gcc-libs' 'glibc' 'zlib')
20
21
# cmake, because `git2` is built with `vendored-libgit2` — libgit2 is compiled
22
# from source rather than linked against the system one, so a C toolchain is a
23
# build-time requirement even though nothing here is a C project.
24
makedepends=('cargo' 'cmake')
25
26
conflicts=('git-tpl-bin')
27
28
# !lto is not optional, and the failure it prevents is obscure. makepkg enables
29
# LTO globally, which puts `-flto=auto` into CFLAGS — and CFLAGS is what the
30
# libgit2-sys build script compiles vendored libgit2 with. The resulting
31
# libgit2.a holds LLVM bitcode rather than objects, and the link ends in a
32
# screenful of `undefined symbol: git_repository_open`. Nothing is lost by
33
# disabling it: Cargo.toml already sets `lto = true` on the release profile, so
34
# the Rust side is link-time optimised either way.
35
#
36
# !debug for a plainer reason: that same profile sets `strip = true`, so there
37
# is no debug data to split into a -debug package.
38
options=('!lto' '!debug')
39
40
# This project tags without a `v` prefix, so the tag is `$pkgver` as-is.
41
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
42
sha256sums=('bf955f47816b03a001a372a6f945088ddaedbe95ad1c94c44bcbc6ce63780404')
43
44
prepare() {
45
cd "$pkgname-$pkgver"
46
# Arch's Rust packaging guidelines: vendor the dependency graph up front so
47
# build() can run offline with `--frozen`. Cargo.lock is tracked, so this
48
# resolves exactly the graph upstream CI tested.
49
export RUSTUP_TOOLCHAIN=stable
50
cargo fetch --locked --target "$(rustc -vV | sed -n 's/^host: //p')"
51
}
52
53
build() {
54
cd "$pkgname-$pkgver"
55
export RUSTUP_TOOLCHAIN=stable
56
export CARGO_TARGET_DIR=target
57
cargo build --frozen --release
58
}
59
60
check() {
61
cd "$pkgname-$pkgver"
62
export RUSTUP_TOOLCHAIN=stable
63
export CARGO_TARGET_DIR=target
64
# No Git identity is exported here on purpose: the test harness scrubs
65
# GIT_AUTHOR_* and GIT_COMMITTER_* from the environment and configures each
66
# temporary repository itself, so anything set here would be discarded.
67
cargo test --frozen --release
68
}
69
70
package() {
71
cd "$pkgname-$pkgver"
72
# Named exactly `git-tpl`: Git resolves `git tpl` only through an
73
# executable with that name on PATH.
74
install -Dm755 target/release/git-tpl "$pkgdir/usr/bin/git-tpl"
75
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
76
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
77
78
# Generated by the binary just built, from the same command definition the
79
# parser uses, so they cannot describe flags this build does not have.
80
#
81
# The man page is not documentation for its own sake: Git intercepts
82
# `git tpl --help` and execs `man git-tpl`, which fails with exit 16 when
83
# no page is installed.
84
local _generated="$srcdir/generated"
85
./target/release/git-tpl man --out-dir "$_generated/man1"
86
install -Dm644 -t "$pkgdir/usr/share/man/man1" "$_generated"/man1/*.1
87
88
# One file per shell, each under the name that shell looks for. zsh wants a
89
# leading underscore and bash wants none; getting either wrong installs a
90
# script that is never sourced.
91
./target/release/git-tpl completion bash |
92
install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/git-tpl"
93
./target/release/git-tpl completion zsh |
94
install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_git-tpl"
95
./target/release/git-tpl completion fish |
96
install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/git-tpl.fish"
97
}
98
Changes since previous scan
--- PKGBUILD @ 2026-08-18 00:03+++ PKGBUILD @ 2026-08-19 03:41@@ -1,12 +1,12 @@ # Maintainer: Axel H. <noirbizarre@gmail.com> #-# Source package. `0.6.0` and `163cfac75aae9d1def03a46cf80f089eb2127a383ad8daea3b060614622da7a7` are substituted by+# Source package. `0.7.0` and `bf955f47816b03a001a372a6f945088ddaedbe95ad1c94c44bcbc6ce63780404` are substituted by # .github/workflows/aur.yaml from the published release, and the result is # pushed to the AUR. Edit this template, never the PKGBUILD in the AUR # repository: that one is regenerated at every release. pkgname=git-tpl-pkgver=0.6.0+pkgver=0.7.0 pkgrel=1 pkgdesc="Git-native project templates" arch=('x86_64' 'aarch64')@@ -39,7 +39,7 @@ # This project tags without a `v` prefix, so the tag is `$pkgver` as-is. source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")-sha256sums=('163cfac75aae9d1def03a46cf80f089eb2127a383ad8daea3b060614622da7a7')+sha256sums=('bf955f47816b03a001a372a6f945088ddaedbe95ad1c94c44bcbc6ce63780404') prepare() { cd "$pkgname-$pkgver"Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-19 03:41:13 | Low | 1 |
| 2026-08-18 00:03:42 | Clean | 2 |
| 2026-08-17 21:37:43 | Low | 1 |
| 2026-08-17 00:18:29 | Clean | 2 |
| 2026-08-16 19:33:38 | Low | 1 |
| 2026-08-16 09:32:18 | Low | 1 |
| 2026-08-16 01:31:50 | Low | 1 |