Added PKGBUILD

main
Jef Roosens 2022-06-25 13:28:18 +02:00
commit a25a2f264c
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
3 changed files with 58 additions and 0 deletions

14
.SRCINFO 100644
View File

@ -0,0 +1,14 @@
pkgbase = hf-git
pkgdesc = Command line interface for editing /etc/hosts easily (Development version)
pkgver = r19.a3fac17
pkgrel = 1
url = https://github.com/jenspots/hf
arch = x86_64
license = AGPL-3.0
makedepends = git
makedepends = cmake
depends = glibc
source = hf-git::git+https://github.com/jenspots/hf#branch=main
md5sums = SKIP
pkgname = hf-git

5
.gitignore vendored 100644
View File

@ -0,0 +1,5 @@
*
!.gitignore
!PKGBUILD
!.SRCINFO

39
PKGBUILD 100644
View File

@ -0,0 +1,39 @@
# 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"
}