summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e0bcd17bde06de98e0fa42f55e36bcd9faedec5a (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
pkgbase=('python-titlecase')
pkgname=('python-titlecase' 'python2-titlecase')
_module='titlecase'
pkgver='0.12.0'
pkgrel=1
pkgdesc="Python Port of John Gruber's titlecase.pl"
url="https://github.com/ppannuto/python-titlecase"
depends=()
makedepends=('python-setuptools' 'python2-setuptools')
license=('MIT')
arch=('any')
source=("https://files.pythonhosted.org/packages/source/t/titlecase/titlecase-${pkgver}.tar.gz")
md5sums=('238c9655b9943801b1816046dcedb00e')

prepare() {
    cp -a "${srcdir}/${_module}-${pkgver}"{,-python2}
}

build() {
    cd "${srcdir}/${_module}-${pkgver}"
    python setup.py build

    cd "${srcdir}/${_module}-${pkgver}-python2"
    python2 setup.py build
}

package_python-titlecase() {
    depends+=('python')
    cd "${srcdir}/${_module}-${pkgver}"
    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}

package_python2-titlecase() {
    depends+=('python2')
    cd "${srcdir}/${_module}-${pkgver}-python2"
    python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}