summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 548c37b7c5ae385e73f44bd42de8c5891882e904 (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
32
# Maintainer: Ivan Zenin <i.zenin@gmx.com>

pkgname=linkchecker-git
pkgver=latest
pkgrel=4
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-xdg" "python-dnspython" "python-future")
optdepends=("python-argcomplete")
provides=('linkchecker')
conflicts=('linkchecker')
makedepends=('git')
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 setup.py install \
      --prefix=/usr \
      --root="${pkgdir}"
  find "${pkgdir}" -type d -name .git -exec rm -r '{}' +
}