]> git.proxmox.com Git - dh-cargo.git/commitdiff
Don't add .pc directories to binary package, but do add debian/patches
authorXimin Luo <infinity0@debian.org>
Sun, 1 Jul 2018 00:16:05 +0000 (17:16 -0700)
committerXimin Luo <infinity0@debian.org>
Sun, 1 Jul 2018 00:16:05 +0000 (17:16 -0700)
cargo.pm
debian/changelog

index d58e55af0b57ea41f59a1adcacda110f7ebfff5a..46489c9aab9c0a0ce43ef1a2ddae9684d25decdb 100644 (file)
--- a/cargo.pm
+++ b/cargo.pm
@@ -107,7 +107,8 @@ sub pre_building_step {
 sub get_sources {
     my $this=shift;
     opendir(my $dirhandle, $this->get_sourcedir());
-    my @sources = grep { $_ ne '.' && $_ ne '..' && $_ ne '.git' && $_ ne 'debian' } readdir($dirhandle);
+    my @sources = grep { $_ ne '.' && $_ ne '..' && $_ ne '.git' && $_ ne '.pc' && $_ ne 'debian' } readdir($dirhandle);
+    push @sources, 'debian/patches' if -d $this->get_sourcedir() . '/debian/patches';
     closedir($dirhandle);
     @sources
 }
@@ -131,7 +132,7 @@ sub configure {
     }
     mkdir("$registry/$crate");
     my @sources = $this->get_sources();
-    doit("cp", "-at", "$registry/$crate", @sources);
+    doit("cp", "--parents", "-at", "$registry/$crate", @sources);
     doit("cp", $this->get_sourcepath("debian/cargo-checksum.json"), "$registry/$crate/.cargo-checksum.json");
 
     my @ldflags = split / /, $ENV{'LDFLAGS'};
@@ -176,7 +177,7 @@ sub install {
         my $target = $this->get_sourcepath("debian/" . $this->{libpkg} . "/usr/share/cargo/registry/$crate");
         my @sources = $this->get_sources();
         doit("mkdir", "-p", $target);
-        doit("cp", "-at", $target, @sources);
+        doit("cp", "--parents", "-at", $target, @sources);
         doit("rm", "-rf", "$target/target");
         doit("cp", $this->get_sourcepath("debian/cargo-checksum.json"), "$target/.cargo-checksum.json");
         # work around some stupid ftpmaster rule about files with old dates.
index bd821e3b8377914dd42b33fe8c0ad570e0613527..0b925a2bd034a2cacbfbd7c90b55dbb394bda462 100644 (file)
@@ -1,3 +1,10 @@
+dh-cargo (6) UNRELEASED; urgency=medium
+
+  * Don't add .pc directories to binary package, but do add debian/patches.
+    (Closes: #880689)
+
+ -- Ximin Luo <infinity0@debian.org>  Sat, 30 Jun 2018 17:14:33 -0700
+
 dh-cargo (5) unstable; urgency=medium
 
   * Pass `--cap-lints warn` in rustflags to avoid builds breaking when rustc