diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 16:40:27 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 16:41:29 +0100 |
commit | 84b018b35cdf5fe395928db61ddcbde7fa6ba169 (patch) | |
tree | ab92ec755e07569120b78b82389153b22f3fa86b /main/py-docutils | |
parent | 1c09ef2c32916b3cc1250696c17f7c42ec557376 (diff) | |
download | aports-84b018b35cdf5fe395928db61ddcbde7fa6ba169.tar.bz2 aports-84b018b35cdf5fe395928db61ddcbde7fa6ba169.tar.xz |
main/py-docutils: change suffix for executables to -<major>
Diffstat (limited to 'main/py-docutils')
-rw-r--r-- | main/py-docutils/APKBUILD | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/main/py-docutils/APKBUILD b/main/py-docutils/APKBUILD index d1dd4645ef..4ec355a5bb 100644 --- a/main/py-docutils/APKBUILD +++ b/main/py-docutils/APKBUILD @@ -3,7 +3,7 @@ pkgname=py-docutils _pkgname=docutils pkgver=0.12 -pkgrel=1 +pkgrel=2 pkgdesc="Documentation Utilities for Python" url="http://docutils.sourceforge.net/" arch="noarch" @@ -23,13 +23,11 @@ build() { package() { mkdir -p "$pkgdir" - local py3ver="$(_pyver python3)" - # Create unsuffixed symlinks for executables from py3 subpackage. cd "$builddir"/tools mkdir -p "$pkgdir"/usr/bin local name; for name in rst*.py; do - ln -s ${name%.py}-$py3ver "$pkgdir"/usr/bin/${name%.py} + ln -s ${name%.py}-3 "$pkgdir"/usr/bin/${name%.py} done } @@ -46,6 +44,7 @@ _py3() { _py() { local python="$1" + local pyver="${1:6:1}" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" @@ -54,7 +53,6 @@ _py() { $python setup.py install --prefix=/usr --root="$subpkgdir" # Remove .py extension and add version suffix to executable files. - local pyver="$(_pyver $python)" local path; for path in "$subpkgdir"/usr/bin/*.py; do mv "$path" "${path/.py/-$pyver}" || return 1 done @@ -76,10 +74,6 @@ doc() { cp licenses/* "$licdir"/ } -_pyver() { - "$1" -V 2>&1 | sed -En 's/[Pp]ython (\d+\.\d+).*/\1/p' -} - md5sums="4622263b62c5c771c03502afa3157768 docutils-0.12.tar.gz" sha256sums="c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa docutils-0.12.tar.gz" sha512sums="0087433f8b76e1d0302d2fab77fdbda941132d16ac1fcecb26ca66119687eefd9e2f6901e05d705f857fa31e2526136c9827dfd57c44cd295bd10dcce3faebf9 docutils-0.12.tar.gz" |