diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 16:36:10 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 16:38:22 +0100 |
commit | 1c09ef2c32916b3cc1250696c17f7c42ec557376 (patch) | |
tree | 6ab4c33957d35d4c894b21e4161c957b03e9d81a /main/py-pygments/APKBUILD | |
parent | bf2dd2a0966e3f20e206e0cf5c898191520c187f (diff) | |
download | aports-1c09ef2c32916b3cc1250696c17f7c42ec557376.tar.bz2 aports-1c09ef2c32916b3cc1250696c17f7c42ec557376.tar.xz |
main/py-pygments: fix conflict in /usr/bin between py2 and py3
Diffstat (limited to 'main/py-pygments/APKBUILD')
-rw-r--r-- | main/py-pygments/APKBUILD | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/main/py-pygments/APKBUILD b/main/py-pygments/APKBUILD index 7724ed749a..6ef649e354 100644 --- a/main/py-pygments/APKBUILD +++ b/main/py-pygments/APKBUILD @@ -8,7 +8,7 @@ pkgdesc="A syntax highlighting package written in Python." url="http://pygments.org/" arch="noarch" license="BSD" -depends="" +depends="py3-${pkgname#py-}" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc::noarch" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" @@ -22,6 +22,9 @@ build() { package() { mkdir -p "$pkgdir" + + mkdir -p "$pkgdir"/usr/bin + ln -s pygmentize "$pkgdir"/usr/bin/pygmentize-3 } _py2() { @@ -35,12 +38,17 @@ _py3() { _py() { local python="$1" + local pyver="${1:6:1}" pkgdesc="$pkgdesc (for $python)" - depends="$depends $python" + depends="$python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" - $python setup.py install --prefix=/usr --root="$subpkgdir" + $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1 + + local path; for path in "$subpkgdir"/usr/bin/*; do + mv "$path" "$path-$pyver" || return 1 + done } doc() { |