# Maintainer: xgjmibzr pkgname=httm pkgver=0.38.1 pkgrel=1 pkgdesc="Prints the size, date and locations of available unique versions (deduplicated by modify time and size) of files residing on ZFS or BTRFS snapshots." arch=('x86_64') url="https://github.com/kimono-koans/httm" license=('MPL-2.0') conflicts=('httm-bin' 'httm-git') options=('!strip' '!emptydirs') #install='httm.install' depends=('gcc-libs') optdepends=('btrfs-progs: BTRFS support' 'zfs-utils: ZFS support' 'nilfs-utils: NILFS2 support') makedepends=('cargo') source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz") sha512sums=('e8fb0c5ca61cfc4dcc7597441713de8e0c882f934ade8ab9c149dc31dae988ae544cc67348ae340e1ad34d21858d3e5bdc5a1a78a5c3d7aec01bc1812bdc994b') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" cargo fetch --target "$CARCH-unknown-linux-gnu" } build(){ export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target # use cargo to build from a tagged release cd "${srcdir}/${pkgname}-${pkgver}" cargo build --frozen --release --all-features } package(){ # install executable install -Dm755 "${srcdir}/${pkgname}-${pkgver}/target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" # install man page install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1" # install README.md install -Dm644 "${srcdir}/${pkgname}-${pkgver}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md" # install LICENSE install -Dm644 "${srcdir}/${pkgname}-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }