diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-16 18:35:59 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-22 02:45:59 +0200 |
commit | 4fa26deecb7919b84546187714fd3369f4b7af95 (patch) | |
tree | 2f329340e0074279c452ee75c4dd23bb26c722d9 | |
parent | ecee06b883a97bbc7be8455580db410e84557320 (diff) | |
download | aports-4fa26deecb7919b84546187714fd3369f4b7af95.tar.bz2 aports-4fa26deecb7919b84546187714fd3369f4b7af95.tar.xz |
main/llvm4: add provides=llvm and omit version suffix in bin names
-rw-r--r-- | main/llvm4/APKBUILD | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/main/llvm4/APKBUILD b/main/llvm4/APKBUILD index 8cb8ed73dc..b9aba12d7c 100644 --- a/main/llvm4/APKBUILD +++ b/main/llvm4/APKBUILD @@ -11,6 +11,8 @@ pkgdesc="Low Level Virtual Machine compiler system (version $_majorver)" arch="all" url="http://llvm.org/" license="UOI-NCSA" +provides="llvm=$pkgver-r$pkgrel" +replaces="llvm" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends="binutils-dev chrpath cmake file libffi-dev paxmark python2 zlib-dev" subpackages="$pkgname-static $pkgname-libs $pkgname-dev" @@ -124,15 +126,21 @@ package() { | awk -F: '$2~/ELF/{print $1}' \ | xargs -r chrpath -d - # Symlink files in bindir to /usr/bin with version infix/suffix. + # Symlink files from /usr/lib/llvm*/bin to /usr/bin. mkdir -p "$pkgdir"/usr/bin local name newname path for path in bin/*; do name=${path##*/} + # Add version infix/suffix to the executable name. case "$name" in llvm-*) newname="llvm$_majorver-${name#llvm-}";; *) newname="$name$_majorver";; esac + # If this package provides=llvm (i.e. it's the default/latest + # llvm package), omit version infix/suffix. + if [ -n "$provides" ]; then + newname=$name + fi case "$name" in FileCheck | obj2yaml | yaml2obj) continue;; esac @@ -154,12 +162,14 @@ package() { static() { pkgdesc="LLVM $_majorver static libraries" + provides="llvm-static=$pkgver-r$pkgrel" _mv "$pkgdir"/$_prefix/lib/*.a "$subpkgdir"/$_prefix/lib/ } libs() { pkgdesc="LLVM $_majorver runtime library" + provides="llvm-libs=$pkgver-r$pkgrel" local soname="libLLVM-$_majorver.0.so" local soname2="libLLVM-$pkgver.so" @@ -178,6 +188,7 @@ libs() { } dev() { + provides="llvm-dev=$pkgver-r$pkgrel" default_dev cd "$subpkgdir" |