summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: d0839545ee3039bedd6990aa5bc7947bd186e0c3 (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
# Maintainer: Olivier Gayot <olivier.gayot@sigexec.com>

pkgname=phpdoc-git
pkgver=1
pkgrel=1
pkgdesc="Read the documentation of PHP functions in your terminal"
arch=('any')
url="https://git.sigexec.com/cgit.cgi/phpdoc.git/"
license=('BSD')
depends=('php-docs' 'sed' 'which')
makedepends=('git')
optdepends=('w3m')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname}::git+https://git.sigexec.com/cgit.cgi/${pkgname%-git}.git")
md5sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname}"

    ## Git, tags available
    # printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"

    # Git, no tags available
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
    cd "${srcdir}/${pkgname}"

    install -D phpdoc.sh "${pkgdir}/usr/bin/phpdoc"
    install -D php.vim "${pkgdir}/usr/share/vim/vimfiles/after/ftplugin/php.vim"
}