summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78a9f30c5a1e9e5298928b96f9e0de0ba08d4f6a (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
39
40
41
42
43
# Maintainer: James An <james@jamesan.ca>

_pkgname=PimpMyLog
pkgname="${_pkgname,,}-git"
pkgver=1.7.9.r0.g22f448c
pkgrel=1
pkgdesc="Log viewer for your web server (formerly the PHP Apache Log Viewer)"
arch=('any')
url="http://pimpmylog.com"
license=('GPL3')
depends=('php>=5.2')
optdepends=('apache: compatible web server'
            'nginx: compatible web server'
            'lighttpd: compatible web server'
            'darkhttpd: compatible web server')
makedepends=('git')
provides=("${_pkgname,,}=$pkgver")
conflicts=("${_pkgname,,}")
options=()
install=
source=("${_pkgname,,}"::"git+https://github.com/potsky/$_pkgname.git"
        'nginx.conf')
md5sums=('SKIP'
         '78ee0cca1e8da50b0064648ed125bbd8')

pkgver() {
    cd "${_pkgname,,}"
    (
        set -o pipefail
        git describe --long --tag | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

package() {
    cd "${_pkgname,,}"

    install -m755 -d "$pkgdir/usr/share/webapps/${_pkgname,,}"
    cp -a * "$pkgdir/usr/share/webapps/${_pkgname,,}/"

    install -Dm644 README.md "$pkgdir/usr/share/doc/${_pkgname,,}/README.md"
    install -Dm644 ../nginx.conf "$pkgdir/etc/nginx/conf.d/${_pkgname,,}.conf"
}