Package Details: update-hosts-git r399.da403b6-1

Git Clone URL: https://aur.archlinux.org/update-hosts-git.git (read-only, click to copy)
Package Base: update-hosts-git
Description: Generate a hosts file based on multiple sources (git)
Upstream URL: https://github.com/pyamsoft/update-hosts.git
Keywords: adblock blocker hosts
Licenses: GPLv2
Conflicts: update-hosts
Provides: update-hosts
Submitter: pyamsoft
Maintainer: pyamsoft
Last Packager: pyamsoft
Votes: 1
Popularity: 0.000000
First Submitted: 2015-09-12 05:29
Last Updated: 2020-12-27 05:45

Dependencies (6)

Required by (0)

Sources (1)

Latest Comments

sekret commented on 2021-09-11 07:34

Hi there, please remove the line that creates the bash-completion folder, because it stays empty, so it's not required.

And please remove all this unnecessary stuff you put in there!!! All those commented spellcheck lines really make it a pain to watch and use.

Furthermore, those msg "Could not cd into $srcdir/$_gitname" lines are completely unnecessary!!! And it's a lot cleaner to just use the install command instead of first creating the required directory and then to copy the files there. With install you can create the directories and copy the files with the required rights in one single line.

tl;dr: Here's a cleaned PKGBUILD


# Maintainer: pyamsoft <developer(dot)pyamsoft(at)gmail(dot)com>

_gitname=update-hosts
pkgname=update-hosts-git
pkgdesc="Generate a hosts file based on multiple sources (git)"
pkgver=r404.fafedba
pkgrel=1
arch=('any')
makedepends=('git')
depends=('bash')
optdepends=(
  'curl: Default download client'
  'wget: Optional download client'
  'iprange: Helper to optimize ipset configuration'
  'ipset: Parse ip address sets as an extra blocklist'
  'dnsmasq: Parse hosts as an extra dnsmasq blocklist'
)
provides=('update-hosts')
conflicts=('update-hosts')
license=('GPL2')
url="https://github.com/pyamsoft/update-hosts.git"
sha256sums=('SKIP')
source=("${_gitname}::git+${url}#branch=main")

pkgver() {
  cd "$srcdir/$_gitname"

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/$_gitname"

  install -Dm755 "${_gitname}" "${pkgdir}/usr/bin/${_gitname}"
  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_gitname}/LICENSE"
  install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_gitname}/README.md"
}

sekret commented on 2016-02-06 11:44

Please change the arch line to

arch=('any')

because there are no binaries in this package!



Furthermore you need to add the license to the package. To do this, please add this line to the package() function:

install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"



One last thing: All the dependencies you list in the depends line are in the base group, therefore they don't have to be included as a dependency, because every Arch user is supposed to have this group installed! :)