rust standard library source package

This commit is contained in:
Matthijs van Otterdijk 2017-05-14 02:46:06 +02:00
parent 04cf01ce57
commit b125a683df
4 changed files with 35 additions and 3 deletions

1
debian/TODO.Debian vendored
View File

@ -1,4 +1,3 @@
- add -src package
- upload to experimental, check arch tests
- get cross-building working
- rm or re-fix dlstage0, update docs

21
debian/control vendored
View File

@ -54,7 +54,7 @@ Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, libstd-rust-dev (= ${binary:Version}),
gcc, libc-dev, libjs-jquery, binutils (>= 2.26)
Recommends: rust-gdb | rust-lldb
Suggests: rust-doc
Suggests: rust-doc, rust-src
Description: Rust systems programming language
Rust is a curly-brace, block-structured expression language. It
visually resembles the C language family, but differs significantly
@ -172,3 +172,22 @@ Description: Rust systems programming language - Documentation
.
This package contains the Rust tutorial, language reference and
standard library documentation.
Package: libstd-rust-src
Section: devel
Architecture: all
Build-Profiles: <!pkg.rust.nosrc>
Description: Rust systems programming language - Documentation
Rust is a curly-brace, block-structured expression language. It
visually resembles the C language family, but differs significantly
in syntactic and semantic details. Its design is oriented toward
concerns of "programming in the large", that is, of creating and
maintaining boundaries - both abstract and operational - that
preserve large-system integrity, availability and concurrency.
.
It supports a mixture of imperative procedural, concurrent actor,
object-oriented and pure functional styles. Rust also supports
generic programming and meta-programming, in both static and dynamic
styles.
.
This package contains sources of the rust standard library.

1
debian/libstd-rust-src.install vendored Normal file
View File

@ -0,0 +1 @@
usr/src/rust

15
debian/rules vendored
View File

@ -40,6 +40,7 @@ RELEASE_CHANNEL := stable
DEB_DESTDIR := $(CURDIR)/debian/tmp
RUST_VERSION := $(shell dpkg-parsechangelog --show-field Version | sed -re 's/([^.]+)\.([^.]+)\..*/\1.\2/')
RUST_LONG_VERSION := $(shell dpkg-parsechangelog --show-field Version | sed -re 's/([^+]+).*/\1/')
LIBSTD_PKG := libstd-rust-$(RUST_VERSION)
# These are the normal build flags
@ -107,6 +108,12 @@ ifneq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
BUILD_DOCS =
endif
BUILD_SRC = 1
ifneq (,$(findstring pkg.rust.nosrc,$(DEB_BUILD_PROFILES)))
DEB_CONFIGURE_FLAGS += --disable-dist-src
BUILD_SRC =
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
DEB_CONFIGURE_FLAGS += --disable-optimize --disable-optimize-cxx --disable-optimize-llvm
endif
@ -204,7 +211,13 @@ ifneq (,$(BUILD_DOCS))
sed -i -e "s,https://doc.rust-lang.org/\(favicon.ico\|logos/rust-logo-32x32-blk.png\),$${topdir}rust-logo-32x32-blk.png," \
-e "s,https://www.rust-lang.org/\(favicon.ico\|logos/rust-logo-32x32-blk.png\),$${topdir}rust-logo-32x32-blk.png," "$$file"; \
done
find $(DEB_DESTDIR) \( -iname '*.html' -empty -o -name .lock -o -name '*.inc' \) -delete
find $(DEB_DESTDIR) \( -iname '*.html' -empty -o -name .lock -o -name '*.inc' \) -delete;
endif
ifneq (,$(BUILD_SRC))
# extract library source
mkdir -p $(DEB_DESTDIR)/usr/src;
tar --strip-components=5 -xzf $(CURDIR)/build/dist/rust-src-$(RUST_LONG_VERSION).tar.gz -C $(DEB_DESTDIR)/usr/src
endif
override_dh_install-arch: