summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 64ac8db82c8c79bd7217b84b485fd27d8ea5acbb (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
44
45
46
# Maintainer: Elias Riedel GĂ„rding <eliasrg@kth.se>
# Author: Bryan Bugyi <bryanbugyi34@gmail.com>
pkgname=funky-git
pkgver=v3.3.1.r11.g2997e05
pkgrel=1
pkgdesc="Create directory-specific shell functions"
arch=('any')
url="https://github.com/bbugyi200/funky"
license=('MIT')
depends=('python-setuptools' 'python-future' 'python-pygments' 'python-six')
makedepends=('git')
provides=('funky')
conflicts=('funky')
install=funky-git.install
source=("git+https://github.com/bbugyi200/funky.git")
md5sums=('SKIP')

# --- Packaging notes ---
# usr/bin/funky imports pkg_resources, so python-setuptools is in depends, not
# makedepends, following the Python packaging guidelines

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


build() {
    cd "${pkgname%%-git}"
    python setup.py build
}


package() {
    cd "${pkgname%%-git}"

    mkdir -p "$pkgdir/usr/share/licenses/${pkgname}"
    cp LICENSE "$pkgdir/usr/share/licenses/${pkgname}"

    mkdir -p "$pkgdir/usr/share/doc/${pkgname%%-git}"
    cp README.md "$pkgdir/usr/share/doc/${pkgname%%-git}"

    # Set XDG_DATA_HOME to avoid installing funky.sh in $HOME/.local/share
    XDG_DATA_HOME=/usr/share python setup.py install \
        --root="$pkgdir/" --optimize=1 --skip-build
}