# Maintainer: Julien Virey pkgname=hostctl pkgver=1.1.4 pkgrel=4 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=('c3df61772bb0f521def04e3fff2bda652725ee2dfb4c58e10456d84e94f67003') build() { cd $pkgname-$pkgver go build \ -trimpath \ -buildmode=pie \ -mod=readonly \ -modcacherw \ -ldflags "-X github.com/guumaster/hostctl/cmd/hostctl/actions.version=$pkgver -linkmode external -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 }