# Maintainer: Julien Virey pkgname=hostctl pkgver=1.0.14 pkgrel=2 pkgdesc='Command-line tool to manage your hosts file' arch=('x86_64') url='https://github.com/guumaster/hostctl' license=('MIT') conflicts=("${pkgname}-bin") makedepends=('go') source=("$url/archive/v$pkgver.tar.gz") sha256sums=('c69a539d50805f59acf3f171eef8f9db3e1c8813559071b7259b6d31cefa0553') build() { cd $pkgname-$pkgver go build \ -trimpath \ -buildmode=pie \ -mod=readonly \ -modcacherw \ -ldflags "-X github.com/guumaster/hostctl/cmd/hostctl/actions.version=$pkgver -s -w -extldflags $LDFLAGS" \ -o $pkgname cmd/hostctl/main.go } package() { cd $pkgname-$pkgver install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/ install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname }