diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-20 20:01:13 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-20 20:16:43 +0200 |
commit | f4ff81233adc30ccf13f6efd040e3d5a3480b39d (patch) | |
tree | bd39a94196d82da1fc8e0aa451ed361e90c434b9 /community/rust | |
parent | b8367044e174d43c4ea1ce4b423e050679d728cd (diff) | |
download | aports-f4ff81233adc30ccf13f6efd040e3d5a3480b39d.tar.bz2 aports-f4ff81233adc30ccf13f6efd040e3d5a3480b39d.tar.xz |
community/rust: return -src subpackage back
Diffstat (limited to 'community/rust')
-rw-r--r-- | community/rust/APKBUILD | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD index f275f06437..97fa0713cc 100644 --- a/community/rust/APKBUILD +++ b/community/rust/APKBUILD @@ -51,6 +51,7 @@ subpackages=" $pkgname-gdb::noarch $pkgname-lldb::noarch $pkgname-doc + $pkgname-src::noarch cargo cargo-bash-completions:_cargo_bashcomp:noarch cargo-zsh-completion:_cargo_zshcomp:noarch @@ -88,9 +89,6 @@ prepare() { # Remove bundled dependencies. rm -Rf src/llvm/ - - # Save untouched sources for packaging in -src subpackage. - cp -a "$builddir"/src "$srcdir"/rust-src } build() { @@ -114,7 +112,7 @@ build() { --musl-root="/usr" \ --disable-docs \ --enable-extended \ - --tools="analysis,cargo" \ + --tools="analysis,cargo,src" \ --enable-llvm-link-shared \ --enable-option-checking \ --enable-locked-deps \ @@ -212,6 +210,18 @@ lldb() { _mv "$pkgdir"/$_sharedir/etc/lldb_*.py $_sharedir/etc/ } +src() { + pkgdesc="$pkgdesc (source code)" + depends="$pkgname" + license="$license OFL-1.1 GPL-3.0-or-later GPL-3.0-with-GCC-exception CC-BY-SA-3.0 LGPL-3.0" + + _mv "$pkgdir"/usr/lib/rustlib/src/rust "$subpkgdir"/usr/src/ + rmdir -p "$pkgdir"/usr/lib/rustlib/src 2>/dev/null || true + + mkdir -p "$subpkgdir"/usr/lib/rustlib/src + ln -s ../../../src/rust "$subpkgdir"/usr/lib/rustlib/src/rust +} + cargo() { pkgdesc="The Rust package manager" license="Apache-2.0 MIT UNLICENSE" @@ -256,15 +266,6 @@ _cargo_doc() { _mv usr/share/man/man1/cargo* "$subpkgdir"/usr/share/man/man1/ } -src() { - pkgdesc="$pkgdesc (source code)" - depends="$pkgname" - license="$license OFL-1.1 GPL-3.0-or-later GPL-3.0-with-GCC-exception CC-BY-SA-3.0 LGPL-3.0" - - mkdir -p "$subpkgdir"/usr/src - cp -alr "$srcdir"/rust-src "$subpkgdir"/usr/src/rust -} - _mv() { local dest; for dest; do true; done # get last argument mkdir -p "$dest" |