1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 18:25:41 +03:00
aports/community/git-metafile/APKBUILD
ptrcnull fbcf4c4f11 */*: utilise sparse crates.io fetches
this is a million times faster

new only in rust 1.68, and fails on older versions,
but we have only latest in aports and don't support anything else, so
it's okay.
2023-03-10 00:35:53 +01:00

58 lines
1.9 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=git-metafile
pkgver=0.2.3
pkgrel=0
pkgdesc="Store and restore files metadata in a git repository"
url="https://github.com/jirutka/git-metafile"
# ppc64le, aarch64 - fails to build
# others - limited by rust/cargo
arch="x86_64 armv7 armhf x86"
license="MIT"
depends="git"
makedepends="cargo rust"
source="https://github.com/jirutka/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz
post-checkout
pre-commit
git-etc-init
gitignore
"
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo build --frozen --release
}
check() {
./target/release/git-metafile --version
}
package() {
local sharedir="$pkgdir/usr/share/$pkgname"
install -D -m 755 target/release/git-metafile "$pkgdir"/usr/bin/git-metafile
cd "$pkgdir"
install -D -m 755 "$srcdir"/git-etc-init usr/sbin/git-etc-init
install -D -m 644 "$srcdir"/gitignore "$sharedir"/gitignore
install -D -m 755 "$srcdir"/pre-commit "$sharedir"/hooks/pre-commit
install -D -m 755 "$srcdir"/post-checkout "$sharedir"/hooks/post-checkout
ln -s post-checkout "$sharedir"/hooks/post-rewrite
}
sha512sums="
147568fecd48c9e8a68777792db70c0f7b50aaa0c9d766f96cb22c7ed8f49861212c399abfc9be65e95fa341dabe6ae2bb567eb5e77a74a69db2183d0ad00e2a git-metafile-0.2.3.tar.gz
4bd2120071e11a8e9005491ad13ef9065cdb295eed11c3d168d511b93e3acabafc47f07b3463dd14ecd7147d41ce24dcc58eee2131c5656e8f2036eb4ab907f2 post-checkout
af36b28793d94e0c4d73020e50346ee3dcc981082b8304a2e224207ed5c0ea6ea8a4c59e2160f20f4d08e1d94104ee102f32d07d75f96ff88454f2fecb49a074 pre-commit
b45f9adf07bfbde958b7bdb8bfa18c18ee1d67110d8a1228c020a94cdcf8bd72e1e85714529968de6dc1a49016b5b31c30c3aff9fbcc1b6d9ccc8bf175369bce git-etc-init
35edd88ec44f3eaadd64cb324e33f443295bf48c32b280f8aaae103c1c00df9d801c277c3987d19dbd5c71893a0504862f4f724251d81d1c404147d7d7c31abe gitignore
"