summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b3526b421bda9f140bb9a5ec294267cdb6e2a55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Contributor: Ivan Zenin <i.zenin@gmx.com>

pkgname=linkchecker-git
pkgver=v10.6.0.r38.gc9b07de2
pkgrel=1
pkgdesc="Check websites for broken links (development version)"
arch=('i686' 'x86_64')
url="https://linkchecker.github.io/linkchecker"
license=("GPL")
depends=("python>=3.5" "python-beautifulsoup4" "python-requests>=2.4" "python-dnspython")
optdepends=("python-argcomplete")
provides=('linkchecker')
conflicts=('linkchecker')
makedepends=('git' 'python-build' 'python-hatchling' 'python-installer' 'python-setuptools-scm' 'python-hatch-vcs')
source=("git+https://github.com/linkchecker/linkchecker.git")
md5sums=('SKIP')

pkgver() {
  cd "${srcdir}"/linkchecker
  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

package() {
  cd "${srcdir}"/linkchecker
  python -m build --wheel --no-isolation
  python -m installer --destdir="$pkgdir" dist/*.whl
  find "${pkgdir}" -type d -name .git -exec rm -r '{}' +
}