summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 68133be3b5489a982e5f15591ccb11e64c2c273a (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
33
34
35
36
37
38
# Maintainer: taotieren <admin@taotieren.com>

pkgbase=can-doc-git
pkgname=can-doc-git
pkgver=r9.9f10695
pkgrel=1
groups=()
pkgdesc="Linux-CAN / SocketCAN documentation"
arch=(any)
url="https://github.com/linux-can/can-doc"
license=('unkown')
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
depends=()
makedepends=(git)
optdepends=("can-utils: Linux-CAN / SocketCAN user space applications"
    "can-isotp-dkms: Kernel modules for isotp")
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}"
#     git describe --long --tags | sed 's/^v//g' | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare()
{
    git -C "${srcdir}/${pkgname}" clean -dfx
}

package() {
    install -dm0755 "${pkgdir}/usr/share/doc/${pkgname%-git}"

    cd "${srcdir}/${pkgname}"/
    rm -rf .*
    cp -rv * "${pkgdir}/usr/share/doc/${pkgname%-git}/"
}