summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 77c80fb21ff4ba642d1ede1f2a89fba91174ba10 (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
# Maintainer: Chris Billington <chrisjbillington@gmail.com>
pkgname=('git-nautilus-icons-py2')
_pypi_name=('git_nautilus_icons')
pkgver=1.1.1
pkgrel=1
arch=('x86_64' 'i686')
url="https://github.com/chrisjbillington/git_nautilus_icons"
license=('BSD 2-Clause "Simplified"')
pkgdesc="A Nautilus extension to overlay icons on files in git repositories, Python 2 version"
depends=('git-nautilus-icons-common-py2' 'python2-nautilus')
makedepends=('python2-setuptools')
provides=('git-nautilus-icons-py2')
conflicts=('git-nautilus-icons' 'git-nautilus-icons-py2')
source=("https://files.pythonhosted.org/packages/source/${_pypi_name::1}/$_pypi_name/$_pypi_name-$pkgver.tar.gz")
sha512sums=('528d915aa2c94dde3b56f9b697434ec9808d72530cc232c34aae8c970fb611be86e1a4ad4ebddbce65af4d5d99e5e8e17e9e42bb5dfafb6f976496e43da1e4bd')

build() {
    cd "${srcdir}/${_pypi_name}-${pkgver}"
    python2 setup.py build
}

package() {
    cd "${srcdir}/${_pypi_name}-${pkgver}"
    python2 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

    # compile Python bytecode for modules outside of site-packages:
    python2 -m compileall -d / "${pkgdir}"/usr/{lib,share}
    python2 -O -m compileall -d / "${pkgdir}"/usr/{lib,share}
}