mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
|
|
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
|
|
pkgname=py-polib
|
|
_pkgname=polib
|
|
pkgver=1.1.0
|
|
pkgrel=0
|
|
pkgdesc="A library to manipulate gettext files"
|
|
url="http://polib.readthedocs.org/en/latest/index.html"
|
|
arch="noarch"
|
|
license="MIT"
|
|
makedepends="python2-dev python3-dev py-setuptools"
|
|
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
|
|
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
|
|
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
python2 setup.py build
|
|
python3 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
python2 setup.py check
|
|
python3 setup.py check
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"
|
|
}
|
|
|
|
_py() {
|
|
local python=$1
|
|
pkgdesc="$pkgdesc (for $python)"
|
|
depends="$python libmagic"
|
|
install_if="$pkgname=$pkgver-r$pkgrel $python"
|
|
|
|
cd "$builddir"
|
|
$python setup.py install --prefix=/usr --root="$subpkgdir"
|
|
}
|
|
|
|
_py2() {
|
|
replaces="$pkgname"
|
|
_py python2
|
|
}
|
|
|
|
_py3() {
|
|
_py python3
|
|
}
|
|
|
|
sha512sums="74681585b4d7252e107acd7d73f49f7e91c90adcd180722d39d35c40ec158434798af0124a16788cf564c73b84f52a040aefeb58355a1a3cd85848c3f6a5e67f polib-1.1.0.tar.gz"
|