summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 05d043464581f2d8580cb4ca499bfa39f5600b4b (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
# Maintainer: Sebastian Reu├če <seb@wirrsal.net>
pkgname=git-issues-git
_gitname=git-issues
pkgver=r107.389658d
pkgrel=1
pkgdesc="A distributed issue tracking system based on Git repositories, written in Python."
arch=(any)
url=https://github.com/duplys/git-issues
license=(custom:BSD)
depends=(python2)
makedepends=(git)
provides=(git-issues)
conflicts=(git-issues)
source=(git+https://github.com/duplys/git-issues)
md5sums=(SKIP)

pkgver() {
    cd "$_gitname"
    commit=$(git rev-list --count master)
    hash=$(git rev-parse --short HEAD)
    echo "r$commit.$hash"
}

package() {
    cd "$srcdir/$_gitname"
   
    python2 -m compileall *.py
    mkdir -p "$pkgdir"/opt/git-issues
    install *.{py,pyc} "$pkgdir"/opt/git-issues

    sed -i 's|/usr/bin/env python|/usr/bin/env python2|' git-issues *.py    
    install -m755 git-issues "$pkgdir"/opt/git-issues
    mkdir -p "$pkgdir"/usr/bin
    ln -s /opt/git-issues/git-issues "$pkgdir"/usr/bin

    # git-issues wants these to be installed in the same path as the
    # executable. It will copy these into repositories where it is used.
    install README README.textile LICENSE "$pkgdir"/opt/git-issues
        
    install -D LICENSE "$pkgdir"/usr/share/licenses/git-issues-git/LICENSE
}