]> git.proxmox.com Git - rustc.git/commitdiff
rust standard library source package
authorMatthijs van Otterdijk <matthijs@wirevirt.net>
Sun, 14 May 2017 00:46:06 +0000 (02:46 +0200)
committerMatthijs van Otterdijk <matthijs@wirevirt.net>
Sun, 14 May 2017 00:46:06 +0000 (02:46 +0200)
debian/TODO.Debian
debian/control
debian/libstd-rust-src.install [new file with mode: 0644]
debian/rules

index c1ee6ffe65f20c2e6b4edf5cf3ab914976032a17..b152c96508f9c5f1870134833d06ed4cf1fa8c07 100644 (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
index 506029a76e9dc7c28435b36349536f6a6a146784..285bc9ef805ef162e46157ae91fef4bb8ea481f1 100644 (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.
diff --git a/debian/libstd-rust-src.install b/debian/libstd-rust-src.install
new file mode 100644 (file)
index 0000000..ffd24b5
--- /dev/null
@@ -0,0 +1 @@
+usr/src/rust
index c63230b928f7891e31fab26d08384c66db9019db..4a5ca19cb20f1000a0c6316321ca4aeef1126e5a 100755 (executable)
@@ -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: