Commit 5fa0a906 authored by Wolfgang Silbermayr's avatar Wolfgang Silbermayr

Package + RFS rustdoc-stripper

parent 787eda21
......@@ -95,6 +95,7 @@ because all required dependencies are available in main::
libudev-sys
timerfd
rustc-std-workspace-core
rustdoc-stripper
sniffglue (update, bugfix - need better changelog)
encoding-rs (update)
cmake (update)
......
rust-rustdoc-stripper (0.1.5-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
* Package rustdoc-stripper 0.1.5 from crates.io using debcargo 2.2.9
Closes: #916325
-- Wolfgang Silbermayr <wolfgang@silbermayr.at> Thu, 13 Dec 2018 06:09:41 +0100
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: rustdoc-stripper
Upstream-Contact: Guillaume Gomez <guillaume1.gomez@gmail.com>
Source: https://github.com/GuillaumeGomez/rustdoc-stripper
Files: *
Copyright: 2015-2017 Guillaume Gomez <guillaume1.gomez@gmail.com>
License: Apache-2.0
Files: debian/*
Copyright:
2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
2018 Wolfgang Silbermayr <wolfgang@silbermayr.at>
License: Apache-2.0
License: Apache-2.0
Debian systems provide the Apache 2.0 license in
/usr/share/common-licenses/Apache-2.0
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: rustdoc-stripper
Upstream-Contact: Guillaume Gomez <guillaume1.gomez@gmail.com>
Source: https://github.com/GuillaumeGomez/rustdoc-stripper
Files: *
Copyright: FIXME (overlay) UNKNOWN-YEARS Guillaume Gomez <guillaume1.gomez@gmail.com>
License: Apache-2.0
Comment:
FIXME (overlay): Since upstream copyright years are not available in
Cargo.toml, they were extracted from the upstream Git repository. This may not
be correct information so you should review and fix this before uploading to
the archive.
Files: ./LICENSE
Copyright: 2015 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./src/consts.rs
Copyright: 2016 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./src/lib.rs
Copyright: 2015 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./src/main.rs
Copyright: 2015 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./src/regenerate.rs
Copyright: 2015 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./src/strip.rs
Copyright: 2015 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./src/types.rs
Copyright: 2016 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./src/utils.rs
Copyright: 2015 Gomez Guillaume
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: ./tests/tests.rs
Copyright:
2016 Gomez Guillaume
2013-2015, The Gtk-rs Project Developers.
License: UNKNOWN-LICENSE; FIXME (overlay)
Comment:
FIXME (overlay): These notices are extracted from files. Please review them
before uploading to the archive.
Files: debian/*
Copyright:
2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
2018 Wolfgang Silbermayr <wolfgang@silbermayr.at>
License: Apache-2.0
License: Apache-2.0
Debian systems provide the Apache 2.0 license in
/usr/share/common-licenses/Apache-2.0
overlay = "."
uploaders = ["Wolfgang Silbermayr <wolfgang@silbermayr.at>"]
[source]
section = "utils"
build_depends = ["help2man", "librust-tempfile-dev"]
[packages.bin]
section = "utils"
summary = "Strip rustdoc comments from source code"
description = """
rustdoc-stripper is a tool used to remove rustdoc comments from your code and
save them in a comments.cmts file if you want to regenerate them.
"""
From f52f8335a3a33975ca8a1bc3664331791f81ef52 Mon Sep 17 00:00:00 2001
From: Wolfgang Silbermayr <wolfgang@silbermayr.at>
Date: Thu, 13 Dec 2018 05:31:58 +0100
Subject: [PATCH] Use tempfile instead of tempdir
---
Cargo.toml | 4 ++--
tests/tests.rs | 28 ++++++++++++++--------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index ac8186d..605d356 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,5 +28,5 @@ crate-type = ["dylib", "rlib"]
[[bin]]
name = "rustdoc-stripper"
-[dev-dependencies.tempdir]
-version = "0.3.4"
+[dev-dependencies.tempfile]
+version = "3"
diff --git a/tests/tests.rs b/tests/tests.rs
index 5d09ee9..08c3f6a 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -13,12 +13,12 @@
// limitations under the License.
extern crate stripper_lib;
-extern crate tempdir;
+extern crate tempfile;
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
-use tempdir::TempDir;
+use tempfile::{TempDir, tempdir};
const BASIC : &'static str = r#"//! File comment
//! three
@@ -445,7 +445,7 @@ fn compare_files(expected_content: &str, file: &Path) {
fn test_strip() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC);
{
let mut f = gen_file(&temp_dir, comment_file, "");
@@ -460,7 +460,7 @@ fn test_strip() {
fn test_regeneration() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC_STRIPPED);
gen_file(&temp_dir, comment_file, &get_basic_md(test_file));
stripper_lib::regenerate_doc_comments(temp_dir.path().to_str().unwrap(), false,
@@ -474,7 +474,7 @@ fn test_regeneration() {
fn test2_strip() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC2);
{
let mut f = gen_file(&temp_dir, comment_file, "");
@@ -489,7 +489,7 @@ fn test2_strip() {
fn test2_regeneration() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC2_STRIPPED);
gen_file(&temp_dir, comment_file, BASIC2_MD);
stripper_lib::regenerate_doc_comments(temp_dir.path().to_str().unwrap(), false,
@@ -503,7 +503,7 @@ fn test2_regeneration() {
fn test3_strip() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC3);
{
let mut f = gen_file(&temp_dir, comment_file, "");
@@ -518,7 +518,7 @@ fn test3_strip() {
fn test3_regeneration() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC3_STRIPPED);
gen_file(&temp_dir, comment_file, &get_basic3_md(test_file));
stripper_lib::regenerate_doc_comments(temp_dir.path().to_str().unwrap(), false,
@@ -532,7 +532,7 @@ fn test3_regeneration() {
fn test4_strip() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC4);
{
let mut f = gen_file(&temp_dir, comment_file, "");
@@ -547,7 +547,7 @@ fn test4_strip() {
fn test4_regeneration() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC4);
gen_file(&temp_dir, comment_file, &get_basic4_md());
stripper_lib::regenerate_doc_comments(temp_dir.path().to_str().unwrap(), false,
@@ -561,7 +561,7 @@ fn test4_regeneration() {
fn test5_strip() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC5);
{
let mut f = gen_file(&temp_dir, comment_file, "");
@@ -576,7 +576,7 @@ fn test5_strip() {
fn test5_regeneration() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC5_STRIPPED);
gen_file(&temp_dir, comment_file, &get_basic5_md(test_file));
stripper_lib::regenerate_doc_comments(temp_dir.path().to_str().unwrap(), false,
@@ -591,7 +591,7 @@ fn test5_regeneration() {
fn test6_regeneration() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC6);
gen_file(&temp_dir, comment_file, &get_basic6_md(test_file));
stripper_lib::regenerate_doc_comments(temp_dir.path().to_str().unwrap(), false,
@@ -606,7 +606,7 @@ fn test6_regeneration() {
fn test7_regeneration() {
let test_file = "basic.rs";
let comment_file = "basic.md";
- let temp_dir = TempDir::new("").unwrap();
+ let temp_dir = tempdir().unwrap();
gen_file(&temp_dir, test_file, BASIC7);
gen_file(&temp_dir, comment_file, &get_basic7_md(test_file));
stripper_lib::regenerate_doc_comments(temp_dir.path().to_str().unwrap(), false,
--
2.20.0
0001-Use-tempfile-instead-of-tempdir.patch
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --buildsystem cargo
override_dh_installman:
help2man \
--name rustdoc-stripper \
--no-info \
--version-string $(DEB_VERSION_UPSTREAM) \
debian/rustdoc-stripper/usr/bin/rustdoc-stripper > debian/rustdoc-stripper.1
dh_installman -O--buildsystem=cargo
override_dh_auto_test:
dh_auto_test -- test --all
#!/usr/bin/make -f
%:
dh $@ --buildsystem cargo
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment