summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4140da111873f7de1741ff2ab99be3f026e1ecb (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
# Maintainer: Sebastian Reuße <seb@wirrsal.net>
pkgname=git-hooks-git
_gitname=git-hooks
pkgver=1.00.0.r22.ge5ac866
pkgrel=1
pkgdesc="A tool to manage project, user, and global Git hooks for multiple git repositories."
arch=(any)
url="https://github.com/icefox/git-hooks"
license=(BSD)
depends=(git)
makedepends=(git)
provides=(git-hooks)
conflicts=(git-hooks)
source=(git+https://github.com/icefox/git-hooks)
sha256sums=(SKIP)


pkgver() {
    cd "$_gitname"
    git describe --long --tags | \
        sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
    cd "$_gitname"
    install -D git-hooks "$pkgdir"/usr/bin/git-hooks
    install -D README.md "$pkgdir"/usr/share/doc/git-hooks/README.md
    install -D LICENSE "$pkgdir"/usr/share/licenses/git-hooks-git/LICENSE

    mkdir -p "$pkgdir"/usr/share/git-hooks
    install-hooks-from git_hooks
    install-hooks-from contrib
}

install-hooks-from() {
    pushd "$1"
    find -type f -exec install -D {} "$pkgdir"/usr/share/git-hooks/{} \;
    popd
}