summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 44fc7f09587f1c0eb91463ab589eb9865def25db (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>

_pkgbase=akvcam
pkgname=${_pkgbase}-dkms-git
pkgver=1.2.2.r0.gefe302a
pkgrel=1
pkgdesc="Virtual camera for Linux"
url="https://github.com/webcamoid/akvcam"
arch=('any')
license=('GPL2')
depends=('dkms')
makedepends=('git')
conflicts=("${_pkgbase}-dkms")
provides=("${_pkgbase}-dkms")
source=("git://github.com/webcamoid/akvcam.git")
md5sums=('SKIP')

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

package() {
    cd "${srcdir}/${_pkgbase}/src"

    make install INSTALLDIR="${pkgdir}/usr/src/${_pkgbase}-${pkgver}"
    cp -vf "${srcdir}/${_pkgbase}/COPYING" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}"
    mkdir -p "${pkgdir}/usr/share/licenses/${_pkgbase}"
    cp -vf "${srcdir}/${_pkgbase}/COPYING" "${pkgdir}/usr/share/licenses/${_pkgbase}"
    mkdir -p "${pkgdir}/etc/${_pkgbase}/examples"
    cp -vf "${srcdir}/${_pkgbase}/share/config_example.ini" "${pkgdir}/etc/${_pkgbase}"
    cp -vf "${srcdir}/${_pkgbase}/share/examples/output.c" "${pkgdir}/etc/${_pkgbase}/examples"
}