hf-git/PKGBUILD

40 lines
826 B
Bash

# Maintainer: Jef Roosens
pkgbase=hf-git
pkgname=hf-git
pkgver=r19.a3fac17
pkgrel=1
pkgdesc="Command line interface for editing /etc/hosts easily (Development version)"
arch=('x86_64')
url='https://github.com/jenspots/hf'
license=('AGPL-3.0')
depends=('glibc')
makedepends=('git' 'cmake')
source=("${pkgname}::git+https://github.com/jenspots/hf#branch=main")
md5sums=('SKIP')
pkgver() {
cd "${pkgname}"
commit_count="$(git rev-list --count HEAD)"
commit="$(git rev-parse --short HEAD)"
echo "r${commit_count}.${commit}"
}
build() {
cmake -B build -S "${pkgname}" \
-DCMAKE_BUILD_TYPE='None' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-Wno-dev
cmake --build build
}
package() {
# DESTDIR="$pkgdir" cmake --install build
install -Dm755 'build/hf' "${pkgdir}/usr/bin/hf"
}