commit e13179e6eb7c64c02571e03e37a15a22f2af5375 Author: qwjyh Date: Wed Mar 20 10:48:53 2024 +0900 init with 0.1.0 diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..959b93d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = xdbm + pkgdesc = Cross device backup manager, which manages backups on several storages mounted on multiple devices. + pkgver = 0.1.0 + pkgrel = 1 + url = https://github.com/qwjyh/xdbm + arch = i686 + arch = x86_64 + arch = armv6h + arch = armv7h + license = MIT OR Apache-1.0 + makedepends = cargo + depends = libgit2 + source = xdbm-0.1.0.tar.gz::https://static.crates.io/crates/xdbm/xdbm-0.1.0.crate + sha512sums = SKIP + +pkgname = xdbm diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..dbf742e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: qwjyh + +pkgname=xdbm +pkgver=0.1.0 +pkgrel=1 +depends=('libgit2') +makedepends=('cargo') +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +pkgdesc="Cross device backup manager, which manages backups on several storages mounted on multiple devices." +url="https://github.com/qwjyh/xdbm" +source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate") +license=('MIT OR Apache-1.0') +sha512sums=('SKIP') + +# Generated in accordance to https://wiki.archlinux.org/title/Rust_package_guidelines. +# Might require further modification depending on the package involved. +prepare() { + cd "$pkgname-$pkgver" || exit + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +build() { + cd "$pkgname-$pkgver" || exit + export CFLAGS+=' -ffat-lto-objects' + cargo build --frozen --release --all-features +} + +check() { + cd "$pkgname-$pkgver" || exit + cargo test --frozen --all-features +} + +package() { + cd "$pkgname-$pkgver" || exit + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" + + for shell in 'bash' 'zsh' 'fish'; do + "$pkgdir/usr/bin/$pkgname" completion $shell > "$pkgname.$shell" + done + install -Dm644 "$pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname" + install -Dm644 "$pkgname.zsh" "$pkgdir/usr/share/zsh/site-functions/_$pkgname" + install -Dm644 "$pkgname.fish" "$pkgdir/usr/share/fish/vendor_completions.d/$pkgname.fish" +} + +# vim: ts=2 sw=2: