1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 02:35:23 +03:00
aports/community/git-metafile/APKBUILD
2021-07-06 03:29:38 +02:00

51 lines
1.8 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=git-metafile
pkgver=0.2.1
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
"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cargo build --release --locked
}
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="
d82ca14a37b873e8c7cabf9ef254686e1acecf2812abf5739c4bfba94bf9fac6fcdca5bc067c77f5370f55477d5b7eaa8947d2e89cd09a2500e522b4994ffbaa git-metafile-0.2.1.tar.gz
4bd2120071e11a8e9005491ad13ef9065cdb295eed11c3d168d511b93e3acabafc47f07b3463dd14ecd7147d41ce24dcc58eee2131c5656e8f2036eb4ab907f2 post-checkout
af36b28793d94e0c4d73020e50346ee3dcc981082b8304a2e224207ed5c0ea6ea8a4c59e2160f20f4d08e1d94104ee102f32d07d75f96ff88454f2fecb49a074 pre-commit
b45f9adf07bfbde958b7bdb8bfa18c18ee1d67110d8a1228c020a94cdcf8bd72e1e85714529968de6dc1a49016b5b31c30c3aff9fbcc1b6d9ccc8bf175369bce git-etc-init
35edd88ec44f3eaadd64cb324e33f443295bf48c32b280f8aaae103c1c00df9d801c277c3987d19dbd5c71893a0504862f4f724251d81d1c404147d7d7c31abe gitignore
"