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
.
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.
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
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
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: